Detailed description for this pull request:
1. Clean-up extcon core without any behavior changes
- Add extcon_alloc_cables/muex/groups to improve the readability
of extcon_dev_register.
- Fix kernel doc of property and property capability fields to aovid warnings
and add missing description of struct extcon_dev.
- Use DECLARE_BITMAP macro and sysfs_emit instead of sprintf
- Use device_match_of_node helper instead of accessing the .of_node
- Use ida_alloc/free to get the unique id for extcon device
2. Update extcon-usbc-tusb320.c to support usb_role_switch and accessory detection
- Add usb_role_switch support on extcon-usbsc-tusb320.
- Add additional accessory detection for audio/debug accessory
and then pass the deteced accessory information to typec subsystem
on extcon-usbsc-tusb320.c.
- Add the support of unregistration of typec port on both error handling
and driver removal step on
3. Update extcon provider drivers (apx288/qcom-spmi-misc/palmas)
- Replace put_device with acpi_dev_put on extcon-axp288.c
- Use platform_get_irq_byname_optional for getting irq of
usb_id and usb_vbus on extcon-qcom-spmi-misc.c.
- Remove unused of_gpio.h on extcon-palmas.c.
4. Fix the devicetree binding document
- Rename misc node name to 'usb-dect@900' on pm8941-misc.yam
- Fix usb-id and usb_vbus defintion on pm8941-misc.yaml
- Drop unneeded quotes from extcon-arizona.c devicetree documentation
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAmSQYzMACgkQnM3fLN7r
z1MEmQ/+PQYDL5XBYEAunp1jURWHFVC+ee9DMq0L9gx2OSZ32nNslCAXrtElGQYF
FG/bh+frPVRUSrYklDUBT1aQ87acE3aGIElfwf+GTjUksvi/tTwY/JaA58Y5IthF
ZF86WBd1vDhTtMs0MCzfTZimfGWpckuBUEYr9yj0HJNc9ECh6tIdrJfReUF9SOtV
wZ6HGC/13jr31cGiMW11sH5kImz7y4AAe7Q1ZYlEGaut1mfmcDxLjeW9GqQLxqme
bHFThcXP+NESuB+7kLEEGtoCp3Tyyt5Je15onmVine7Vznwr0blUVv+d1NtdWNPX
85mtqCSASiRSqXaUccqabjs2fKXP7gOFE+3t0cMaBRMfn3+Zd6mscBEMVOFXskA3
WbvhFSX5UiY1pgGRW6sDMujrpItgS9KioJuFxOf3uRgZNy7tyJYQRaEp+5Dh7bBN
LksNfE5vXdMJKgMw/g/b7WalPj8REsiiYGCignCCEs1MB2gjUryrqT0WzLu/LKSC
OpH+xd08D7H7xu4jqWiD0ZkQs7OTACpj5GT1Xg7CsLwOhlthzHSs+sypi9h8+wVw
tToQXqSyfjrLgk0O6Ry+vKfzfgQoZqM4m4JjF8Pce1NctU3MWwhBU6hwRjeEj3lv
f5BppEk2VYDr6ofy1+OucrF/njR6QrTDlWdU8G+1g8PStWNrl4U=
=3D98
-----END PGP SIGNATURE-----
Merge tag 'extcon-next-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes:
Update extcon next for v6.5
Detailed description for this pull request:
1. Clean-up extcon core without any behavior changes
- Add extcon_alloc_cables/muex/groups to improve the readability
of extcon_dev_register.
- Fix kernel doc of property and property capability fields to aovid warnings
and add missing description of struct extcon_dev.
- Use DECLARE_BITMAP macro and sysfs_emit instead of sprintf
- Use device_match_of_node helper instead of accessing the .of_node
- Use ida_alloc/free to get the unique id for extcon device
2. Update extcon-usbc-tusb320.c to support usb_role_switch and accessory detection
- Add usb_role_switch support on extcon-usbsc-tusb320.
- Add additional accessory detection for audio/debug accessory
and then pass the deteced accessory information to typec subsystem
on extcon-usbsc-tusb320.c.
- Add the support of unregistration of typec port on both error handling
and driver removal step on
3. Update extcon provider drivers (apx288/qcom-spmi-misc/palmas)
- Replace put_device with acpi_dev_put on extcon-axp288.c
- Use platform_get_irq_byname_optional for getting irq of
usb_id and usb_vbus on extcon-qcom-spmi-misc.c.
- Remove unused of_gpio.h on extcon-palmas.c.
4. Fix the devicetree binding document
- Rename misc node name to 'usb-dect@900' on pm8941-misc.yam
- Fix usb-id and usb_vbus defintion on pm8941-misc.yaml
- Drop unneeded quotes from extcon-arizona.c devicetree documentation
* tag 'extcon-next-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: (26 commits)
dt-bindings: extcon: wlf,arizona: drop unneeded quotes
extcon: Switch i2c drivers back to use .probe()
extcon: Drop unneeded assignments
extcon: Use sizeof(*pointer) instead of sizeof(type)
extcon: Use unique number for the extcon device ID
extcon: Remove dup device name in the message and unneeded error check
extcon: Use dev_of_node(dev) instead of dev->of_node
extcon: Use device_match_of_node() helper
extcon: Amend kernel documentation of struct extcon_dev
extcon: Use sysfs_emit() to instead of sprintf()
extcon: Use DECLARE_BITMAP() to declare bit arrays
extcon: Fix kernel doc of property capability fields to avoid warnings
extcon: Fix kernel doc of property fields to avoid warnings
extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
extcon: usbc-tusb320: add usb_role_switch support
extcon: usbc-tusb320: add accessory detection support
extcon: Add extcon_alloc_groups to simplify extcon register function
extcon: Add extcon_alloc_muex to simplify extcon register function
extcon: Add extcon_alloc_cables to simplify extcon register function
extcon: Remove redundant null checking for class
...
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Michal Simek <michal.simek@amd.com>
Message-ID: <20230605092047.50472-3-u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hwicap_drv_remove() is only called for a device after hwicap_drv_probe()
returned 0. In that case dev_set_drvdata() was called (by hwicap_setup())
with a non-NULL value and so dev_get_drvdata() won't return NULL.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Michal Simek <michal.simek@amd.com>
Message-ID: <20230605092047.50472-2-u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hwicap_remove() is only called by hwicap_drv_remove(). Simplify by
unrolling the former into the latter function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Michal Simek <michal.simek@amd.com>
Message-ID: <20230605092047.50472-1-u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
A process can spawn a PD on DSP with some attributes that can be
associated with the PD during spawn and run. The invocation
corresponding to the create request with attributes has total
4 buffers at the DSP side implementation. If this number is not
correct, the invocation is expected to fail on DSP. Added change
to use correct number of buffer count for creating fastrpc scalar.
Fixes: d73f71c7c6 ("misc: fastrpc: Add support for create remote init process")
Cc: stable <stable@kernel.org>
Tested-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Message-ID: <1686743685-21715-1-git-send-email-quic_ekangupt@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
svc_create_memory_pool() is only called from stratix10_svc_drv_probe().
Most of resources in the probe are managed, but not this memremap() call.
There is also no memunmap() call in the file.
So switch to devm_memremap() to avoid a resource leak.
Cc: stable@vger.kernel.org
Fixes: 7ca5ce8965 ("firmware: add Intel Stratix10 service layer driver")
Link: https://lore.kernel.org/all/783e9dfbba34e28505c9efa8bba41f97fd0fa1dc.1686109400.git.christophe.jaillet@wanadoo.fr/
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Message-ID: <20230613211521.16366-1-dinguyen@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It is reasonable to declare multiple nvmem blocks. Unless a unique 'id'
is passed in for each block there may be name clashes.
Avoid this by using the magic token NVMEM_DEVID_AUTO.
Fixes: 5a3fa75a4d ("nvmem: Add driver to expose reserved memory as nvmem")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-6-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In a couple of situations like
name = kstrndup(buf, count, GFP_KERNEL);
if (!name)
return -ENOSPC;
the error is not actually "No space left on device", but "Out of memory".
It is semantically correct to return -ENOMEM in all failed kstrndup()
and kzalloc() cases in this driver, as it is not a problem with disk
space, but with kernel memory allocator failing allocation.
The semantically correct should be:
name = kstrndup(buf, count, GFP_KERNEL);
if (!name)
return -ENOMEM;
Cc: Dan Carpenter <error27@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: "Luis R. Rodriguez" <mcgrof@ruslug.rutgers.edu>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Brian Norris <briannorris@chromium.org>
Fixes: c92316bf8e ("test_firmware: add batched firmware tests")
Fixes: 0a8adf5847 ("test: add firmware_class loader test")
Fixes: 548193cba2 ("test_firmware: add support for firmware_request_platform")
Fixes: eb910947c8 ("test: firmware_class: add asynchronous request trigger")
Fixes: 061132d2b9 ("test_firmware: add test custom fallback trigger")
Fixes: 7feebfa487 ("test_firmware: add support for request_firmware_into_buf")
Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Message-ID: <20230606070808.9300-1-mirsad.todorovac@alu.unizg.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
commit 03c835f498 ("i2c: Switch .probe() to not take an id parameter")
convert back to (the new) .probe() to be able to eventually drop
.probe_new() from struct i2c_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Peter Rosin <peda@axentia.se>
Message-ID: <20230611204737.828617-1-u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This adds support for the "fixed-layout" NVMEM layout binding. It allows
defining NVMEM cells in a layout DT node named "nvmem-layout".
While NVMEM subsystem supports layout drivers it has been discussed that
"fixed-layout" may actually be supperted internally. It's because:
1. It's a very basic layout
2. It allows sharing code with legacy syntax parsing
3. It's safer for soc_device_match() due to -EPROBE_DEFER
4. This will make the syntax transition easier
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-26-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
With support for the "fixed-layout" binding it's possible and preferred
now to define fixed NVMEM cells in the layout node. Do that for the
example binding.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-25-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
With the introduction of NVMEM layouts, new NVMEM content structures
should be defined as such. We should also try to convert / migrate
existing NVMEM content bindings to layouts.
This commit handles fixed NVMEM cells. So far they had to be defined
directly - as device subnodes. With this change it's allowed to put them
in the DT node named "nvmem-layout".
Having NVMEM cells in separated node is preferred as it draws a nice
line between NVMEM device and its content. It results in cleaner
bindings.
FWIW a very similar situation has happened to MTD devices and their
partitions: see commit 5d96ea42eb ("dt-bindings: mtd: Clarify all
partition subnodes").
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-24-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add i.MX93 OCOTP support. i.MX93 OCOTP has two parts: Fuse shadow
block(fsb) and fuse managed by ELE. The FSB part could be directly
accessed with MMIO, the ELE could only be accessed with ELE API.
Currently the ELE API is not ready, so NULL function callback is used,
but it was tested with downstream ELE API.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-22-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@xilinx.com is still working but better to switch to new amd.com after
AMD/Xilinx acquisition.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-20-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add support for the OTP memory device found on the Rockchip RK3588 SoC.
While here, remove the unnecessary 'void *' casts in the OF device ID
table.
Co-developed-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tested-by: Vincent Legoll <vincent.legoll@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-14-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Enhance error handling in the probe function by making use of
dev_err_probe(), which ensures the error code is always printed, in
addition to the specified error message.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tested-by: Vincent Legoll <vincent.legoll@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-13-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In preparation to support new Rockchip OTP memory devices having
specific reset configurations, switch devm_reset_control_get() to
devm_reset_control_array_get_exclusive().
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tested-by: Vincent Legoll <vincent.legoll@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-12-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In preparation to support additional Rockchip OTP memory devices with
different register layout, generalize rockchip_otp_wait_status() to
accept a new parameter for specifying the offset of the status register.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tested-by: Vincent Legoll <vincent.legoll@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-11-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In preparation to support new Rockchip OTP memory devices with different
clock configurations and register layout, extend rockchip_data struct
with the related members: clks, num_clks, reg_read.
Additionally, to avoid managing redundant driver data, drop num_clks
member from rockchip_otp struct and update all references to point to
the equivalent member in rockchip_data.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tested-by: Vincent Legoll <vincent.legoll@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-10-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Document the OTP memory found on Rockchip RK3588 SoC.
Since RK3588 uses different clocks & resets configurations than PX30 /
RK3308, provide the required changes in the binding to be able to handle
both variants.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-9-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On RPi4 the bootloader[1] will copy the binary public key blob
(if present) into memory location specified by this node, for
use by the OS.
[1] https://www.raspberrypi.com/documentation/computers/configuration.html#nvmem-nodes
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-7-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1. Parse ASCII MAC format into byte based
2. Calculate relative addresses based on index argument
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-5-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Broadcom's NVRAM contains MACs for Ethernet interfaces. Those MACs are
usually base addresses that are also used for calculating other MACs.
For example if a router vendor decided to use gmac0 it most likely
programmed NVRAM of each unit with a proper "et0macaddr" value. That is
a base.
Ethernet interface is usually connected to switch port. Switch usually
includes few LAN ports and a WAN port. MAC of WAN port gets calculated
as relative address to the interface one. Offset varies depending on
device model.
Wireless MACs may also need to be calculated using relevant offsets.
To support all those scenarios let MAC NVMEM cells be referenced with an
index specifying MAC offset. Disallow additionalProperties while at it.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-4-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Not just i.MX8M, but all i.MX6/7 (and subtypes) need to reverse the
MAC address read from fuses. Exceptions are i.MX6SLL and i.MX7ULP which
do not support ethernet at all.
Fixes: d0221a780c ("nvmem: imx-ocotp: add support for post processing")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Tested-by: Richard Leitner <richard.leitner@skidata.com> # imx6q
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-3-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
smatch reports
drivers/nvmem/imx-ocotp.c:599:21: warning: symbol
'imx_ocotp_layout' was not declared. Should it be static?
This variable is only used in one file so should be static.
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Message-ID: <20230611140330.154222-2-srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Smatch reports:
drivers/nvmem/sunplus-ocotp.c:205 sp_ocotp_probe()
warn: 'otp->clk' from clk_prepare() not released on lines: 196.
In the function sp_ocotp_probe(struct platform_device *pdev), otp->clk may
not be released before return.
To fix this issue, using function clk_unprepare() to release otp->clk.
Fixes: 8747ec2e97 ("nvmem: Add driver for OCOTP in Sunplus SP7021")
Signed-off-by: Yi Yingao <m202271736@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Message-ID: <20230509085237.5917-1-m202271736@hust.edu.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The devices on cdx could be bound to drivers with the device
DMA managed by kernel drivers or user-space applications.
As multiple devices can be placed in the same IOMMU group, the
DMA on these devices must either be entirely under kernel control
or userspace control. Fix the CDX bus driver to acknowlege the
driver_managed_dma flag and call the appropriate iommu APIs.
Fixes: 2959ab2470 ("cdx: add the cdx bus driver")
Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Reported-by: Alex Williamson <alex.williamson@redhat.com>
Closes: https://lore.kernel.org/lkml/20230524134831.28dc97e2.alex.williamson@redhat.com/
Reviewed-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Message-ID: <20230605131009.6869-1-nipun.gupta@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds an example showing how to use PFSM devices
from a userspace application. The PMIC is armed to be triggered
by a RTC alarm to execute state transition.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Message-ID: <20230511095126.105104-7-jpanis@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds documentation for the TPS6594 PFSM driver.
The PFSM controls the operational states of the TPS6594 PMIC.
Depending on the operational mode, some power domain networks
remain energized while others can be off.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Message-ID: <20230511095126.105104-6-jpanis@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This PFSM controls the operational modes of the PMIC:
- STANDBY and LP_STANDBY,
- ACTIVE state,
- MCU_ONLY state,
- RETENTION state, with or without DDR and/or GPIO retention.
Depending on the current operational mode, some voltage domains
remain energized while others can be off.
This PFSM is also used to trigger a firmware update, and provides
R/W access to device registers.
See Documentation/misc-devices/tps6594-pfsm.rst for more
information.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Message-ID: <20230511095126.105104-5-jpanis@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds support for TPS6594 ESM (Error Signal Monitor).
This device monitors the SoC error output signal at its nERR_SOC input pin.
In error condition, ESM toggles its nRSTOUT_SOC pin to reset the SoC.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Message-ID: <20230511095126.105104-4-jpanis@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmRsblUACgkQUa+KL4f8
d2GyeBAArSgNKeDBWMrGFUmjJ/KIdiNv8kqnjzWkHF7dlgMHDuHb7WShkCHTKOuF
xHelRzdHCJO00kfoQbgMBVd/EqoQtR5iX77sTA0Er5O3ogybZnHxE2+bNOmZ900r
/7HKYqr8zpwj8b2n7VOPh5r2xMTmuQsKD+a8aePqrm53AzfHdAWuLAGHYR1jIxch
9s8eTukQpTtUsLeYN/3eDhzthM2MolnQIL10VzW+LcqK7h4n4sJbTDxpA5LgyjCO
I5I43g1/iOLpwhM1ASVor1XvNXRjZMgsSzqJa77/7yi4ZVRJ+enVzwOwttv90ytb
3O6RniqUswbOqci/rJnbffEzlC+G5rbjaiLd3A+8GFv9m11mqsdMuHZPrJgsdRVo
l56UJt9uZkqvxf1BNaZ3UjrzjTCjDivNOQeC4hxxuPrBSjym/Kxt6MGJ+GWmhcPO
kVE4erIfBBMULETSnvT0lD7hM7NCFJQgHiE0FVCw/fSoVfyhEkDxOtl29OgjXx28
ASe+K/RNeDu9oStsMgvd1SUvepFurVmy/nJ5qUgunVAKWhjGsaAV0L2bdF7/C9r9
lsR++WCXDj37Y3Ax2hPuoLxZfaQ0jLIX/+4jUoJKOsKVG95BJQKj4N+7vazn+BPZ
Mam3ADNKn4NdZzStDjM5EQwxiLlR1VTbjA7CsNsbR/7nI9exx5U=
=XohL
-----END PGP SIGNATURE-----
Merge tag 'ib-mfd-tps6594-core-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into char-misc-next
Immutable branch containing TPS6594 core (MFD) support due for the v6.5 merge window
We want this due to patches requiring this mfd support.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'ib-mfd-tps6594-core-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
mfd: tps6594: Add driver for TI TPS6594 PMIC
Biggest changes in this set include the introduction of a new Intel 8254
interface library module and the refactoring of the existing 104-quad-8
modules to migrate it to the regmap API. Some other minor cleanups
touching tools/counter and stm32-timer-cnt are also present.
Changes
* 104-quad-8
- Remove reference in Kconfig to 25-bit counter value
- Utilize bitfield access macros
- Refactor to buffer states for CMR, IOR, and IDR
- Utilize helper functions to handle PR, FLAG and PSC
- Migrate to the regmap API
* i8254
- Introduce the Intel 8254 interface library module
* stm32-timer-cnt
- Reset TIM_TISEL to its default value in probe
* tools/counter
- Add .gitignore
- Remove lingering 'include' directories on make clean
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZIihZQAKCRC1SFbKvhIj
K1wZAQCnujwsCYExil8fCHgdXufA+KsC5J4Clay7CLq5KmUdgwD+P9EJ5Hd37OeO
tAV6Pt4yEmQQBfXQgMdD2lk1yf0iGg8=
=r3E4
-----END PGP SIGNATURE-----
Merge tag 'counter-updates-for-6.5a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next
William writes:
First set of Counter updates for the 6.5 cycle
Biggest changes in this set include the introduction of a new Intel 8254
interface library module and the refactoring of the existing 104-quad-8
modules to migrate it to the regmap API. Some other minor cleanups
touching tools/counter and stm32-timer-cnt are also present.
Changes
* 104-quad-8
- Remove reference in Kconfig to 25-bit counter value
- Utilize bitfield access macros
- Refactor to buffer states for CMR, IOR, and IDR
- Utilize helper functions to handle PR, FLAG and PSC
- Migrate to the regmap API
* i8254
- Introduce the Intel 8254 interface library module
* stm32-timer-cnt
- Reset TIM_TISEL to its default value in probe
* tools/counter
- Add .gitignore
- Remove lingering 'include' directories on make clean
* tag 'counter-updates-for-6.5a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
counter: i8254: Introduce the Intel 8254 interface library module
counter: 104-quad-8: Migrate to the regmap API
counter: 104-quad-8: Utilize helper functions to handle PR, FLAG and PSC
counter: 104-quad-8: Refactor to buffer states for CMR, IOR, and IDR
counter: 104-quad-8: Utilize bitfield access macros
tools/counter: Makefile: Remove lingering 'include' directories on make clean
tools/counter: Add .gitignore
counter: stm32-timer-cnt: Reset TIM_TISEL to its default value in probe
counter: 104-quad-8: Remove reference in Kconfig to 25-bit counter value
DFL:
- Krzysztof's change constifies pointers to hwmon_channel_info
Xilinx:
- Alfonso's change ensures proper reprograming (xCAP) interface switch
All patches have been reviewed on the mailing list, and have been in the
last linux-next releases (as part of our for-next branch).
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
-----BEGIN PGP SIGNATURE-----
iIkEABYIADEWIQSgSJpClIeaArXyudb8twOBpKCM2gUCZIdJSRMceWlsdW4ueHVA
aW50ZWwuY29tAAoJEPy3A4GkoIzaBswA/A+f5Z/kkZ+KD+kL4ysOb/pGwWno3lSm
AdFxwWv9cfgcAP0UWKNoYxgequpei/wQOp48r3IxSPXureQxxXs92uCeDA==
=dLy3
-----END PGP SIGNATURE-----
Merge tag 'fpga-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next
Xu writes:
FPGA Manager changes for 6.5-rc1
DFL:
- Krzysztof's change constifies pointers to hwmon_channel_info
Xilinx:
- Alfonso's change ensures proper reprograming (xCAP) interface switch
All patches have been reviewed on the mailing list, and have been in the
last linux-next releases (as part of our for-next branch).
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
* tag 'fpga-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
fpga: zynq-fpga: Ensure proper xCAP interface switch
fpga: dfl-fme: constify pointers to hwmon_channel_info
New device support
- honeywell,mprls0025pa
* New driver and dt-bindings for this series of pressure sensors.
- invensense,mpu6050
* Add support for ICM 20600 IMU (ID, bindings and device data).
- melexis,mlx90614
* Add support for mlx90615 Infra Red Thermometer after driver cleanup
and refactoring to support the differences in this device.
- renesas,x9250
* New driver and bindings for this quad potentiometer.
- rockchip,saradc
* Add support for RK3588. Also included is a bunch of refactoring and
cleanup for that driver.
- rohm,bu27008
* New driver bindings etc for this 5 photodiode color sensor.
- st,lsm9ds0/st,st-sensors
* ID added for LSM303D accelerometer and magnetometer including ACPI binding.
- ti,opt4001
* New driver and bindings for this ambient light sensor.
Features
- core
* Introduce iio_validate_own_trigger() for cases where a driver can only
consumer a trigger it registered (detected via same parent device).
Use it in the kionix,kx022a driver and new rohm,by27008 driver.
- dynaimage,al3320a
* ACPI binding CALS0001 seen on Lenovo Yoga Table 2 devices.
- kionix,kx002a
* Enable asynchronous probe.
- rohm,bu27034
* Enable asynchronous probe.
- ti,tmp006
* Explicit support for DT including binding documentation.
Cleanups, minor fixes and misc improvements.
- treewide
* Switch I2C drivers from probe_new() back to probe() - part of the
long process of getting rid of a parameter from probe()
* Various whitespace and typo fixes not otherwise called out.
- core
* industrialio-buffer,Style cleanup.
* Add documentation to extend_name field of struct iio_chan_spec to
direct people using it towards the label infrastructure instead.
extend_name was a design mistake a long time back so directly people
away from it may be useful.
- adi,ad7606
* Add HAS_IOPORT dependency to prepare for some Kconfig changes.
- bosch,bma400
* Drop pointless print of ret in a dev_err_probe() message.
- invensense,icm42600
* Rework timestamp handling to reduce jitter.
- mediatek,mt7986-auxdac
* Add DT binding for this part.
- qcom,spmi-vadc
* Allow for 1/16th prescaling used on a few devices.
* Various changes to channel labeling and naming, including dropping
use of fwnode_name which generates odd channel names. Small ABI
change as a result, but not thought to be a problem for users of this
platform.
- st,lsm6dsx
* dt-binding: Use common schema for mount-matrix via a reference.
- st,stm32
* Add a debug print for when legacy channel config is used.
- ti,palmas-adc
* Drop unused i2c.h include.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmSF83ARHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0Foi+NRAAi8E2NRkzxteTuiFRsAokm/8HbAc/9rDq
2Xyj8zT5B6jmqpbNKPtIbxxAxLV/JY+3HBIorvDNcOVfmOfshMpT31eaKpehxPJ3
A00WaJ6bi7CTp0h/7QOZnZ27yr3tuJ2jpCiGKWERmTZ60kn3S/5JRrXWbfKVccyU
DR1SrsiVSbtDhD9w6kA7HBRsL0EmTQOP/ARlUcO4SB5BOC7rj9akaN6Q6LYSafOa
BFfTd2suekRA94mB/ugm25xAWLsl4Rdr1iNkHyaGcXaMOJZ/zWXq14y1eLbqIJIc
am8Wu2zvo+umNzuG5DMi3gxP2B57Zhcieh6sJ5egdbxB4kh5z3jrsAFiw/MLTEME
4Tc7uHBPFuXDdb8saxtmV2FVbC43+31FgCLivD0BGHtv0DndP7i//KCdp2aztmHo
juyxRCw40xiul5Ihzh3NjukM0pb1inuhgblcEZVKOyaCjhur8NXoTEEcSqXczDVU
BLHBmhQY2cKwqKWt1hbLXDs9iGlJBg0+P+P0VBsvy7WWOlvc9Hw8SryYwyBRJMYH
LW/Wh85eIcyKaaGGEd+HQAyXwGSlrhycUSJzwdcc1IrK8TrIxn5k4BpQpeToQPjJ
wBRRDigeciIN0K7L09N4hg+qTxtpLwFY945meAS0N60o5hZM4P40hnzL8m/Co0pH
gx8SugY1NGk=
=0gJ9
-----END PGP SIGNATURE-----
Merge tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
1st set of IIO new device support, features and cleanup for the 6.5 cycle.
New device support
- honeywell,mprls0025pa
* New driver and dt-bindings for this series of pressure sensors.
- invensense,mpu6050
* Add support for ICM 20600 IMU (ID, bindings and device data).
- melexis,mlx90614
* Add support for mlx90615 Infra Red Thermometer after driver cleanup
and refactoring to support the differences in this device.
- renesas,x9250
* New driver and bindings for this quad potentiometer.
- rockchip,saradc
* Add support for RK3588. Also included is a bunch of refactoring and
cleanup for that driver.
- rohm,bu27008
* New driver bindings etc for this 5 photodiode color sensor.
- st,lsm9ds0/st,st-sensors
* ID added for LSM303D accelerometer and magnetometer including ACPI binding.
- ti,opt4001
* New driver and bindings for this ambient light sensor.
Features
- core
* Introduce iio_validate_own_trigger() for cases where a driver can only
consumer a trigger it registered (detected via same parent device).
Use it in the kionix,kx022a driver and new rohm,by27008 driver.
- dynaimage,al3320a
* ACPI binding CALS0001 seen on Lenovo Yoga Table 2 devices.
- kionix,kx002a
* Enable asynchronous probe.
- rohm,bu27034
* Enable asynchronous probe.
- ti,tmp006
* Explicit support for DT including binding documentation.
Cleanups, minor fixes and misc improvements.
- treewide
* Switch I2C drivers from probe_new() back to probe() - part of the
long process of getting rid of a parameter from probe()
* Various whitespace and typo fixes not otherwise called out.
- core
* industrialio-buffer,Style cleanup.
* Add documentation to extend_name field of struct iio_chan_spec to
direct people using it towards the label infrastructure instead.
extend_name was a design mistake a long time back so directly people
away from it may be useful.
- adi,ad7606
* Add HAS_IOPORT dependency to prepare for some Kconfig changes.
- bosch,bma400
* Drop pointless print of ret in a dev_err_probe() message.
- invensense,icm42600
* Rework timestamp handling to reduce jitter.
- mediatek,mt7986-auxdac
* Add DT binding for this part.
- qcom,spmi-vadc
* Allow for 1/16th prescaling used on a few devices.
* Various changes to channel labeling and naming, including dropping
use of fwnode_name which generates odd channel names. Small ABI
change as a result, but not thought to be a problem for users of this
platform.
- st,lsm6dsx
* dt-binding: Use common schema for mount-matrix via a reference.
- st,stm32
* Add a debug print for when legacy channel config is used.
- ti,palmas-adc
* Drop unused i2c.h include.
* tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (59 commits)
dt-bindings: iio: rockchip: Fix 'oneOf' condition failed warning
dt-bindings: iio: afe: voltage-divider: Spelling s/curcuit/circuit/
dt-bindings: iio: adc: Add rockchip,rk3588-saradc string
iio: adc: rockchip_saradc: Use dev_err_probe
iio: adc: rockchip_saradc: Match alignment with open parenthesis
iio: adc: rockchip_saradc: Use of_device_get_match_data
iio: adc: rockchip_saradc: Make use of devm_clk_get_enabled
iio: adc: rockchip_saradc: Add support for RK3588
iio: adc: rockchip_saradc: Add callback functions
iio: temperature: tmp006: Add OF device matching support
dt-bindings: iio: temperature: Add support for tmp006
staging: iio: Switch i2c drivers back to use .probe()
iio: amplifiers: ad8366 Fix whitespace issue
iio: imu: inv_icm42600: avoid frequent timestamp jitter
MAINTAINERS: Add ROHM BU27008
iio: light: ROHM BU27008 color sensor
iio: kx022a: Use new iio_validate_own_trigger()
iio: trigger: Add simple trigger_validation helper
dt-bindings: iio: light: ROHM BU27008
iio: mlx90614: Add MLX90615 support
...
Given how late this pull request is, I'm expecting these to get queued
up for the 6.5 merge window.
- adi,ad7192
* Fix a null pointer as spi_set_drvdata() is no longer called.
* Fix wrong check prior to using internal clock.
* Fix dt-binding to make it clear the voltage reference is required.
- adi,ad74413
* DIN_SINK should not be set for functions other than digital inputs.
Enforce that in the driver.
- amlogic,meson-saradc
* Fix clock divider mask length - affects only meson 8 family.
- freescale,fxls8962af
* Fix endian type and shift of channels to match with default device setup.
* Narrow errata handling to FXLS8962AF only as doesn't affect other devices
supported by this driver.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmSF9lMRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0Fohnwg//XxQw7xNTXfH359zXZQmE6G7QVLJWmw/H
PM08tMYgafeMrNM2ntJ1ZN199yjWyVooqHf6r9Jn7lHaQRLpu0hAbCUG+7FDVMIB
twsguiVrnZBZt717e4TQDAo6FDzp3fI/cCz6Zebfm38OBUweYANbqK/yuBZ9VDo2
Rn1ZgYOA8yeSqcC5bJNpmWEfbFHt+DqVSCVn1rEP6pqtpaaoIIHCs7lKFUNJDmfp
Sh5HvwZHNj/lJ2+Bkw9S802iq6pFp1mpVvvjnFCo/bkvYOTQ5t+GzrGCemI2EoA1
32+RcWY2FV3NA5S9HYst8jy6Gna0EpR6Pz2FHTuB5MKtnhOHX3BMn+/v7Io6FaYy
JNY3BMVv+hOeSn7twTmP2+n4KrhntUOEl+INw46icHOaGGIrPJi3Dxv0cEAAKs9R
nSgYY7pKwkq1+RrZpNgazBF+XQjgPQAb3rdG1yKhS3JW00ucJSb1pMOqMgBwk6au
XaQY4I+oC0dRuxBKp2s9YNdfZ57saavIwJv6VJt5B7qbt2KGQ+t32rlFupX8R1d3
r90NyrWB3tkIkMrX9SQmcV8QpogwU+HQLjoQwsehcEd3CfXkbS+rrFhv4pHIXgX3
08JYBtbhF4vE/c6GAtY1wz7ZcxxLKGRU1EqPw7ocf6r7i8Zw8oYjxMfrvzK9zrKx
PoIFhm2Yi+g=
=QmKH
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-6.4b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
2nd set of IIO fixes for the 6.4 cycle.
Given how late this pull request is, I'm expecting these to get queued
up for the 6.5 merge window.
- adi,ad7192
* Fix a null pointer as spi_set_drvdata() is no longer called.
* Fix wrong check prior to using internal clock.
* Fix dt-binding to make it clear the voltage reference is required.
- adi,ad74413
* DIN_SINK should not be set for functions other than digital inputs.
Enforce that in the driver.
- amlogic,meson-saradc
* Fix clock divider mask length - affects only meson 8 family.
- freescale,fxls8962af
* Fix endian type and shift of channels to match with default device setup.
* Narrow errata handling to FXLS8962AF only as doesn't affect other devices
supported by this driver.
* tag 'iio-fixes-for-6.4b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
meson saradc: fix clock divider mask length
iio: accel: fxls8962af: errata bug only applicable for FXLS8962AF
iio: accel: fxls8962af: fixup buffer scan element type
dt-bindings: iio: ad7192: Add mandatory reference voltage source
iio: adc: ad7192: Fix internal/external clock selection
iio: adc: ad7192: Fix null ad7192_state pointer access
iio: addac: ad74413: don't set DIN_SINK for functions other than digital input
rk3588-saradc isn't compatible with the rk3399-saradc variant,
hence, fix the following dtbs_check warning for 'oneOf' condition
failure.
DTC_CHK arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtb
/home/shreeya/linux/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtb:
saradc@fec10000: compatible: 'oneOf' conditional failed,
one must be fixed:
['rockchip,rk3588-saradc'] is too short
'rockchip,saradc' was expected
'rockchip,rk3066-tsadc' was expected
'rockchip,rk3399-saradc' was expected
Fixes: 2daf2ae979 ("dt-bindings: iio: adc: Add rockchip,rk3588-saradc string")
Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230610143601.173307-1-shreeya.patel@collabora.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>