Commit Graph

5366 Commits

Author SHA1 Message Date
Jason Liu
239f62168d This is the 6.6.51 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmbisF0ACgkQONu9yGCS
 aT5Y8xAAqS/rmrC+/qlFvbtAqK+KXLq9BIGvDHW2QHfCyMpSZ6isehVhh64apHE/
 /XvJ6a+2iPVp5o52iDTUKzbcDr3Jx/QwhS8Xa/HyQQy1rXIPpJNJb8Vuvkn/B2Cq
 cPCfTtfPZUUQTd09uAdBhy5NT8hsT2kSVpmSXDnahn9ih8k0tR40udw5Qf7xpWcf
 HqljbfonLP86mF/SB9m+VhDGF9fekujyb+0iS0OPE+TdvSjKB9ySoeL4PIeTSxrz
 goZdp9ygAYy8Bks825ztbfQszqIwceHU/xZRaUrGfOOk4A5kwTmbdUQu7ooMc+5F
 kbpifbewmY1UGn2KTxgj59xCjQ7HLQe+sqacy0/gALzRSajUNyjLn0n4w3UqaJWb
 pf+gwqHBLgDRfvWctggEdY2ApKgOlM9D7TTpWWB9uv1oR/g3PGfgehZgrMMPgPUw
 EZ8JiwnITfRaRFiH/vSR3aJKRj6qjb4mX3/U8HgGcACtyFfHgtuI7jzhnX36fRNO
 FG38bxSUMrJnlohghfBl6zyaruZBMHVaoQzs6MYZ7qrVvCbt3CHivJdaQ85nw0h7
 YHa2zYFfT0ztyaSMzWq6JatgI7BZfd8PjobhbRZADBBD39KC8aL8XLoDPnpzWMUY
 UDlK8n96gOKo0t8ILDWcIisCVGNogcHJlGppC8Fu7ZyKzYsMhN4=
 =OEL/
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.51' into lf-6.6.y

This is the 6.6.51 stable release

* tag 'v6.6.51': (2369 commits)
  Linux 6.6.51
  Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync
  Bluetooth: hci_sync: Fix UAF on create_le_conn_complete
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

 Conflicts:
	arch/arm64/boot/dts/freescale/imx8mp.dtsi
	arch/arm64/boot/dts/freescale/imx93.dtsi
	drivers/dma/fsl-edma-common.c
	drivers/dma/fsl-edma-common.h
	drivers/dma/fsl-edma.c
	drivers/irqchip/irq-imx-irqsteer.c
	drivers/perf/fsl_imx9_ddr_perf.c
	drivers/spi/spi-fsl-lpspi.c
	sound/soc/sof/imx/imx8m.c
2024-09-24 11:49:41 +08:00
Javier Carrasco
5b042b7b3f mfd: omap-usb-tll: Use struct_size to allocate tll
[ Upstream commit 40176714c8 ]

Commit 16c2004d9e ("mfd: omap-usb-tll: Allocate driver data at once")
changed the memory allocation of 'tll' to consolidate it into a single
allocation, introducing an incorrect size calculation.

In particular, the allocation for the array of pointers was converted
into a single-pointer allocation.

The memory allocation used to occur in two steps:

tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL);
tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch,
                           GFP_KERNEL);

And it turned that into the following allocation:

tll = devm_kzalloc(dev, sizeof(*tll) + sizeof(tll->ch_clk[nch]),
                   GFP_KERNEL);

sizeof(tll->ch_clk[nch]) returns the size of a single pointer instead of
the expected nch pointers.

This bug went unnoticed because the allocation size was small enough to
fit within the minimum size of a memory allocation for this particular
case [1].

The complete allocation can still be done at once with the struct_size
macro, which comes in handy for structures with a trailing flexible
array.

Fix the memory allocation to obtain the original size again.

Link: https://lore.kernel.org/all/202406261121.2FFD65647@keescook/ [1]
Fixes: 16c2004d9e ("mfd: omap-usb-tll: Allocate driver data at once")
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Fixes: commit 16c2004d9e ("mfd: omap-usb-tll: Allocate driver data at once")
Link: https://lore.kernel.org/r/20240626-omap-usb-tll-counted_by-v2-1-4bedf20d1b51@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:54 +02:00
Arnd Bergmann
05e4efd12f mfd: rsmu: Split core code into separate module
[ Upstream commit c879a8c39d ]

Linking a file into two modules can have unintended side-effects
and produces a W=1 warning:

scripts/Makefile.build:236: drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi

Make this one a separate module instead.

Fixes: a1867f85e0 ("mfd: Add Renesas Synchronization Management Unit (SMU) support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240529094856.1869543-1-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:53 +02:00
Jason Liu
039a4cdb2c Linux 6.6.23
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAmYDTh8ACgkQ3qZv95d3
 LNzBbhAAwSqAoBZBxApda8QQEVvF012dZG0btn0wJv2H3Bu8wasAhfD2pD5LxFZf
 Ru3EVgrBeupMKhZk/aeN5d2qSxn5mCiU4WnAwqDvjtsIicjmeeRaqcGGFFmZ6TyM
 KrK+NjxHu77L6dlkMZRLRugP/7WGGUI3G0fGj2HvJOlMRFHJSx8o4JeX1Yc10xDz
 MbySZBj4ZctjvP16dxehA44Grw08CTxnoPgrHn52TgncLGuQfcx+w+fXEDJfdRzP
 vS8D+8C4G8iwjyfKLnb/jytZR0jlVii3DkQXcIjUzGRQ4UEhfzvSn9C07zu80cPV
 iskQCo/IS1/2gD5M6OgVOjfR0yfF/NCOm692omEH6oQHjNu6QOxM2PpFpIYzm34r
 /4wnTMg58AMsNGp/D5bipl3X5B93pWDoCLq939ZU9688EaR1n/Xsh5+EXG0lKIux
 Eb4tk2z7zJt54/UQM+J2qhtJrqriflSl1dTBxpuZb2abUrq5ewQgNyqhb0hXBc5f
 F5SU5O+dkntQGcUQ1GBSWk5B5q8oXmqY9reIeuhhRYI0w0Y+Xt+jeQHhQSU0j7ne
 DLv5uG32HTR9p8z1jidJJY8VL3MuCpMzrfFkZsEUEut0haF8FhpGIxZ+YjNYcgRt
 f57z1Sf5Gzr+fpM1q8TesHI8+7MEh7Fel+elyWpvnidJfMNx4t8=
 =mu/j
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.23' into lf-6.6.y

Linux 6.6.23

* tag 'v6.6.23': (630 commits)
  Linux 6.6.23
  x86/efistub: Don't clear BSS twice in mixed mode
  x86/efistub: Clear decompressor BSS in native EFI entrypoint
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

 Conflicts:
	arch/arm64/boot/dts/freescale/imx8mp-evk.dts
	drivers/gpio/Kconfig
	drivers/spi/spi-imx.c
2024-04-01 11:00:10 +08:00
Maciej Strozek
8ee19caaaa mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults
[ Upstream commit 78334c343b ]

Two regs have wrong values in existing fields, change them to match
the datasheet.

Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240301101547.2136948-1-mstrozek@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:55 -04:00
Maciej Strozek
30d1366b48 mfd: cs42l43: Fix wrong register defaults
[ Upstream commit c9e1e505cd ]

A few regs have unnecessary values in defaults, change them to match the
datasheet

Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240229155616.118457-1-mstrozek@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:54 -04:00
Peter Griffin
18421148ee mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
[ Upstream commit e28c28a34e ]

of_parse_phandle() returns a device_node with refcount incremented, which
the callee needs to call of_node_put() on when done. We should only call
of_node_put() when the property argument is provided though as otherwise
nothing has taken a reference on the node.

Fixes: f36e789a1f ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20240220115012.471689-4-peter.griffin@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:51 -04:00
Peter Griffin
1b01e66c1c mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
[ Upstream commit d2b0680cf3 ]

of_parse_phandle() returns a device_node with refcount incremented, which
the callee needs to call of_node_put() on when done. We should only call
of_node_put() when the property argument is provided though as otherwise
nothing has taken a reference on the node.

Fixes: 45330bb434 ("mfd: syscon: Allow property as NULL in syscon_regmap_lookup_by_phandle")
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20240220115012.471689-2-peter.griffin@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:51 -04:00
Jason Liu
8eb8dd316c This is the 6.6.20 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmXjYIIACgkQONu9yGCS
 aT5mvw/9GnG2BWbZp9BgVzBnT00CXnIpiGlsoSU0I0Uiso3XqpNYBu7jIZ+vmsqz
 3H2bpkToEwJgg40I+w3iRaY84FWJZtl6HWtXydVQghQzXdA7qSuKBmbqQdUGKqZq
 Uqy7SFabkqQmlmF+RX1tYsgj7Vg3tqThERLUKQRhZIRa+Xek6Izi16RKEXcBNoXv
 vN+Q6AJ6vgjzHdw/UndsTH48bA/NofLlGapf7ZRGaSO7vY6bO5N23Xeg8gBIUh3M
 RHYf0ubKOvOw6LfZrE8BAbLd9Om2IHRAwHTqvDUNaIOl6y7exwCCIMK2lDdlzQ3W
 7gug4HzlQjVz93OtL8MjLnfINOO7en65gyqvwit9N7O7nJKvuIMtt5vVam+h4ikB
 xF/QmFj95GNeRLwBmOJxOS89KyC8BrjE3PfYtL1mUO9joH8vZBccon6WIV7C2u5M
 d+0UglxC4lNTJ3s3FcnrzEKCn5YaE8WvFYQX0xvFQL3GWGDkyrNaafqoz19a8yd2
 ndf3xUh5QKYWI2UGhqV6FdfYC9BolEh/niMKrJYCEJ6BroO3nzh1L8keC+MHbJwp
 Yuu9FCT+vNDKfR/HQwUhUGX/3wyBKb8jqzDXUB2s4FLPUSBX+/RAso13FWua1TGd
 E432ZXaobuUx3+kHsqB+0dc99QVblnMFMPEoM4ye3lYHzq8PDJ0=
 =7IL4
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.20' into lf-6.6.y

This is the 6.6.20 stable release

* tag 'v6.6.20': (3154 commits)
  Linux 6.6.20
  fs/ntfs3: fix build without CONFIG_NTFS3_LZX_XPRESS
  Linux 6.6.19
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

 Conflicts:
	arch/arm64/boot/dts/freescale/imx8mm.dtsi
	arch/arm64/boot/dts/freescale/imx8mq.dtsi
	drivers/clk/imx/clk-imx8qxp.c
	drivers/dma/fsl-edma.c
	drivers/firmware/arm_scmi/perf.c
	drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
	drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
	drivers/net/ethernet/freescale/fec_main.c
	drivers/scsi/scsi_error.c
	drivers/spi/spi-imx.c
	sound/soc/fsl/fsl_sai.c
2024-03-11 14:59:44 +08:00
Peter Robinson
c27d9af41a mfd: ti_am335x_tscadc: Fix TI SoC dependencies
[ Upstream commit 284d16c456 ]

The ti_am335x_tscadc is specific to some TI SoCs, update
the dependencies for those SoCs and compile testing.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Link: https://lore.kernel.org/r/20231220155643.445849-1-pbrobinson@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:14:31 +00:00
Andy Shevchenko
fa1a1bad0f mfd: intel-lpss: Fix the fractional clock divider flags
[ Upstream commit 03d790f04f ]

The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags
in the parameters and hence miscalculates the values in the clock
divider. Fix this by applying the flag to the proper parameter.

Fixes: 82f53f9ee5 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Alex Vinarskis <alex.vinarskis@gmail.com>
Link: https://lore.kernel.org/r/20231211111441.3910083-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:49 -08:00
Kunwu Chan
f53d8c6c6e mfd: tps6594: Add null pointer check to tps6594_device_init()
[ Upstream commit 825906f2eb ]

devm_kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure.

Fixes: 325bec7157 ("mfd: tps6594: Add driver for TI TPS6594 PMIC")
Suggested-by: Lee Jones <lee@kernel.org>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20231208033320.49345-1-chentao@kylinos.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:49 -08:00
Kunwu Chan
3ef1130dee mfd: syscon: Fix null pointer dereference in of_syscon_register()
[ Upstream commit 41673c66b3 ]

kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure.

Fixes: e15d7f2b81 ("mfd: syscon: Use a unique name with regmap_config")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20231204092443.2462115-1-chentao@kylinos.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:49 -08:00
Charles Keepax
9fc58cb207 mfd: cs42l43: Correct SoundWire port list
[ Upstream commit 47b1b03dc5 ]

Two ports are missing from the port list, and the wrong port is set
to 4 channels. Also the attempt to list them by function is rather
misguided, there is nothing in the hardware that fixes a particular
port to one function. Factor out the port properties to an actual
struct, fixing the missing ports and correcting the port set to 4
channels.

Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231130115712.669180-1-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:49 -08:00
Neil Armstrong
3c90b3b043 mfd: rk8xx: fixup devices registration with PLATFORM_DEVID_AUTO
[ Upstream commit 4aedcd4aa6 ]

Since commit 210f418f8a ("mfd: rk8xx: Add rk806 support"), devices are
registered with "0" as id, causing devices to not have an automatic device id
and prevents having multiple RK8xx PMICs on the same system.

Properly pass PLATFORM_DEVID_AUTO to devm_mfd_add_devices() and since
it will ignore the cells .id with this special value, also cleanup
by removing all now ignored cells .id values.

Now we have the same behaviour as before rk806 introduction and rk806
retains the intended behavior.

This fixes a regression while booting the Odroid Go Ultra on v6.6.1:
sysfs: cannot create duplicate filename '/bus/platform/devices/rk808-clkout'
CPU: 3 PID: 97 Comm: kworker/u12:2 Not tainted 6.6.1 #1
Hardware name: Hardkernel ODROID-GO-Ultra (DT)
Workqueue: events_unbound deferred_probe_work_func
Call trace:
dump_backtrace+0x9c/0x11c
show_stack+0x18/0x24
dump_stack_lvl+0x78/0xc4
dump_stack+0x18/0x24
sysfs_warn_dup+0x64/0x80
sysfs_do_create_link_sd+0xf0/0xf8
sysfs_create_link+0x20/0x40
bus_add_device+0x114/0x160
device_add+0x3f0/0x7cc
platform_device_add+0x180/0x270
mfd_add_device+0x390/0x4a8
devm_mfd_add_devices+0xb0/0x150
rk8xx_probe+0x26c/0x410
rk8xx_i2c_probe+0x64/0x98
i2c_device_probe+0x104/0x2e8
really_probe+0x184/0x3c8
__driver_probe_device+0x7c/0x16c
driver_probe_device+0x3c/0x10c
__device_attach_driver+0xbc/0x158
bus_for_each_drv+0x80/0xdc
__device_attach+0x9c/0x1ac
device_initial_probe+0x14/0x20
bus_probe_device+0xac/0xb0
deferred_probe_work_func+0xa0/0xf4
process_one_work+0x1bc/0x378
worker_thread+0x1dc/0x3d4
kthread+0x104/0x118
ret_from_fork+0x10/0x20
rk8xx-i2c 0-001c: error -EEXIST: failed to add MFD devices
rk8xx-i2c: probe of 0-001c failed with error -17

Fixes: 210f418f8a ("mfd: rk8xx: Add rk806 support")
Reported-by: Adam Green <greena88@gmail.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20231116-topic-amlogic-upstream-fix-rk8xx-devid-auto-v2-1-3f1bad68ab9d@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:49 -08:00
Jason Liu
f75d905095 Merge tag 'v6.6.3' into lf-6.6.y
This is the 6.6.3 stable release

* tag 'v6.6.3': (526 commits)
  Linux 6.6.3
  drm/amd/display: Change the DMCUB mailbox memory location from FB to inbox
  drm/amd/display: Clear dpcd_sink_ext_caps if not set
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

 Conflicts:
	arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
	drivers/usb/dwc3/core.c
2023-11-30 09:41:12 -06:00
Jason Liu
6d09067baf Merge tag 'v6.6.2' into lf-6.6.y
This is the 6.6.2 stable release

* tag 'v6.6.2': (634 commits)
  Linux 6.6.2
  btrfs: make found_logical_ret parameter mandatory for function queue_scrub_stripe()
  btrfs: use u64 for buffer sizes in the tree search ioctls
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

Conflicts:
	drivers/clk/imx/clk-imx8mq.c
	drivers/clk/imx/clk-imx8qxp.c
	drivers/media/i2c/ov5640.c
	drivers/misc/pci_endpoint_test.c
2023-11-30 09:40:58 -06:00
Johan Hovold
affae18838 mfd: qcom-spmi-pmic: Fix revid implementation
commit 7b439aaa62 upstream.

The Qualcomm SPMI PMIC revid implementation is broken in multiple ways.

First, it assumes that just because the sibling base device has been
registered that means that it is also bound to a driver, which may not
be the case (e.g. due to probe deferral or asynchronous probe). This
could trigger a NULL-pointer dereference when attempting to access the
driver data of the unbound device.

Second, it accesses driver data of a sibling device directly and without
any locking, which means that the driver data may be freed while it is
being accessed (e.g. on driver unbind).

Third, it leaks a struct device reference to the sibling device which is
looked up using the spmi_device_from_of() every time a function (child)
device is calling the revid function (e.g. on probe).

Fix this mess by reimplementing the revid lookup so that it is done only
at probe of the PMIC device; the base device fetches the revid info from
the hardware, while any secondary SPMI device fetches the information
from the base device and caches it so that it can be accessed safely
from its children. If the base device has not been probed yet then probe
of a secondary device is deferred.

Fixes: e9c11c6e3a ("mfd: qcom-spmi-pmic: expose the PMIC revid information to clients")
Cc: stable@vger.kernel.org      # 6.0
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20231003152927.15000-3-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:20:03 +00:00
Johan Hovold
df148c18b5 mfd: qcom-spmi-pmic: Fix reference leaks in revid helper
commit a0fa44c261 upstream.

The Qualcomm SPMI PMIC revid implementation is broken in multiple ways.

First, it totally ignores struct device_node reference counting and
leaks references to the parent bus node as well as each child it
iterates over using an open-coded for_each_child_of_node().

Second, it leaks references to each spmi device on the bus that it
iterates over by failing to drop the reference taken by the
spmi_device_from_of() helper.

Fix the struct device_node leaks by reimplementing the lookup using
for_each_child_of_node() and adding the missing reference count
decrements. Fix the sibling struct device leaks by dropping the
unnecessary lookups of devices with the wrong USID.

Note that this still leaves one struct device reference leak in case a
base device is found but it is not the parent of the device used for the
lookup. This will be addressed in a follow-on patch.

Fixes: e9c11c6e3a ("mfd: qcom-spmi-pmic: expose the PMIC revid information to clients")
Cc: stable@vger.kernel.org	# 6.0
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20231003152927.15000-2-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:20:03 +00:00
Jarkko Nikula
6b1e61f7d0 mfd: intel-lpss: Add Intel Lunar Lake-M PCI IDs
[ Upstream commit e53b22b10c ]

Add Intel Lunar Lake-M SoC PCI IDs.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20231002083344.75611-1-jarkko.nikula@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:44 +00:00
Dong Aisheng
8f737b359d Merge branch 'regulator/next' into next
* regulator/next: (27 commits)
  MLK-26158-2: regulator: pf5300: add new PMIC pf5300 driver
  MLK-26158-1: dt-bindings: regulator: pf5300: add new PMIC pf5300 support
  MLK-26139-2: regulator: pf0900: add new PMIC pf0900 driver
  MLK-26139-1: dt-bindings: regulator: pf0900: add new PMIC pf0900 support
  LF-8943-3: regulator: pca9450: Support pmic pca9452
  ...
2023-11-22 17:04:57 +08:00
Dong Aisheng
4ee7464398 Merge branch 'mxc/next' into next
* mxc/next: (519 commits)
  MGS-7343 [#nxp] fix the compile warning
  LF-10253: arm64: vpu : h1: solve encode hang
  MGS-7413 [#nxp] reorder the directory
  LF-10543-8: mxc: vpu: wave6: make sequence of decoder capture buffer monotonically increasing
  LF-10543-7: mxc: vpu: wave6: init seq in a separate task
  ...
2023-11-22 17:04:52 +08:00
Dong Aisheng
372d078b9e Merge branch 'i2c/next' into next
* i2c/next: (48 commits)
  LF-10339-2 Revert "i2c: imx-lpi2c: avoid taking clk_prepare mutex in PM callbacks"
  MLK-10893: i2c: imx: add irqf_no_suspend
  MA-20999 i2c: imx: flexio: Fix fall-through warning for Clang
  LF-8343-6: devicetree: bindings: mfd: nxp imx flexio
  LF-8343-2: driver: i2c: buses: flexio: rework to use mfd
  ...
2023-11-22 17:04:48 +08:00
Dong Aisheng
ea11113cef Merge branch 'gpio/next' into next
* gpio/next: (16 commits)
  drivers: gpio: add QIXIS CPLD gpio controller
  gpio: regmap: add the .get_direction() callback
  mfd: simple-mfd-i2c: add compatible string for LX2160A QIXIS CPLD
  dt-bindings: mfd: add bindings for QIXIS CPLD
  MA-19811-7 gpio: vf610: Support building gpio-vf610 driver as module
  ...
2023-11-22 17:04:48 +08:00
Dong Aisheng
d0e3e968af Merge branch 'display/next' into next
* display/next: (640 commits)
  LF-10583-2: drm: bridge: imx: Add i.MX95 LVDS Display Bridge(LDB) driver
  LF-10583-1: dt-bindings: display: bridge: Add i.MX95 LVDS display bridge binding
  LF-10620: drm: bridge: it6263: add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR
  LF-10617-2 drm/panel: Add Raydium RM692C9 MIPI DSI panel support
  LF-10617-1 dt-bindings: display: panel: Add Raydium RM692C9
  ...
2023-11-22 17:04:46 +08:00
Hans de Goede
1815d4007e mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs
[ Upstream commit 831d1af851 ]

Commit 9e86b2ad4c changed the channel used for HPDET detection
(headphones vs lineout detection) from being hardcoded to
ARIZONA_ACCDET_MODE_HPL (HP left channel) to it being configurable
through arizona_pdata.hpdet_channel the DT/OF parsing added for
filling arizona_pdata on devicetree platforms ensures that
arizona_pdata.hpdet_channel gets set to ARIZONA_ACCDET_MODE_HPL
when not specified in the devicetree-node.

But on ACPI platforms where arizona_pdata is filled by
arizona_spi_acpi_probe() arizona_pdata.hpdet_channel was not
getting set, causing it to default to 0 aka ARIZONA_ACCDET_MODE_MIC.

This causes headphones to get misdetected as line-out on some models.
Fix this by setting hpdet_channel = ARIZONA_ACCDET_MODE_HPL.

Fixes: e933836744 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231014205414.59415-1-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:24 +01:00
Dinghao Liu
e7a7ffeb92 mfd: dln2: Fix double put in dln2_probe
[ Upstream commit 759c409bc5 ]

The dln2_free() already contains usb_put_dev(). Therefore,
the redundant usb_put_dev() before dln2_free() may lead to
a double free.

Fixes: 96da8f1483 ("mfd: dln2: Fix memory leak in dln2_probe()")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20230925024134.9683-1-dinghao.liu@zju.edu.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:24 +01:00
Herve Codina
82fa83fbcc mfd: core: Ensure disabled devices are skipped without aborting
[ Upstream commit 7ba7bdef4d ]

The loop searching for a matching device based on its compatible
string is aborted when a matching disabled device is found.
This abort prevents to add devices as soon as one disabled device
is found.

Continue searching for an other device instead of aborting on the
first disabled one fixes the issue.

Fixes: 22380b65dc ("mfd: mfd-core: Ensure disabled devices are ignored without error")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/528425d6472176bb1d02d79596b51f8c28a551cc.1692376361.git.christophe.leroy@csgroup.eu
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:24 +01:00
Zhipeng Wang
2f455bcc12 MA-21077 mfd: Remove __init from fp9931_exit
The function fp9931_exit is defined with the __init annotation, which
means that it can only be called during the initialization phase of
the module. However, this function is registered as the
module exit function using the module_exit macro.

To fix this issue, remove the __init annotation from the
fp9931_exit function.

Change-Id: I7bc17298577c44a9a67445be4a479234f7298a36
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
2023-10-30 16:09:25 +08:00
Robby Cai
e36acf9685 LF-3299-1 mfd: add core driver for FP9931 PMIC
FP9931 is a PMIC IC which comes from Fitipower Corp. It can
be used to for voltages power on or down sequence and timing
configuration for different e-ink panels, and also it has a
thermistor for temperature detection. Add this core driver
to handle regulators device and hwmon device.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: G.n. Zhou <guoniu.zhou@nxp.com>
2023-10-30 16:09:24 +08:00
Robby Cai
f2c844fb07 mfd: max17135: fix kernel warning at boot time when max17135 is not detecteded
in 5451781dad commit, it added the check that
the regulator need to be disabled before calling regulator_put().
If not do so, the kernel will print warning message as below.

To fix this, need to disable regulator before probe function return if this
PMIC is not found. regulator_put() will be called when probe fails in this case
as devm_regulator_get() already called in probe function.

[    0.269916] i2c i2c-2: Max17135 PMIC not found!
[    0.270004] ------------[ cut here ]------------
[    0.270145] WARNING: CPU: 0 PID: 1 at drivers/regulator/core.c:2039 _regulator_put.part.4+0x100/0x120
[    0.270166] Modules linked in:
[    0.270196] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.3.0-rc3-next-20190809-02777-g23dc3ed #22
[    0.270214] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[    0.270250] [<c0112868>] (unwind_backtrace) from [<c010cd9c>] (show_stack+0x10/0x14)
[    0.270281] [<c010cd9c>] (show_stack) from [<c0d26ad4>] (dump_stack+0xd8/0x110)
[    0.270310] [<c0d26ad4>] (dump_stack) from [<c01362c4>] (__warn.part.3+0xa8/0xe8)
[    0.270335] [<c01362c4>] (__warn.part.3) from [<c013645c>] (warn_slowpath_null+0x40/0x4c)
[    0.270361] [<c013645c>] (warn_slowpath_null) from [<c05e6520>] (_regulator_put.part.4+0x100/0x120)
[    0.270385] [<c05e6520>] (_regulator_put.part.4) from [<c05e656c>] (regulator_put+0x2c/0x3c)
[    0.270414] [<c05e656c>] (regulator_put) from [<c06dce90>] (release_nodes+0x1ac/0x1f8)
[    0.270444] [<c06dce90>] (release_nodes) from [<c06d8968>] (really_probe+0x104/0x340)
[    0.270467] [<c06d8968>] (really_probe) from [<c06d8d50>] (driver_probe_device+0x84/0x194)
[    0.270492] [<c06d8d50>] (driver_probe_device) from [<c06d6e44>] (bus_for_each_drv+0x7c/0xc4)
[    0.270516] [<c06d6e44>] (bus_for_each_drv) from [<c06d87e8>] (__device_attach+0xcc/0x140)
[    0.270539] [<c06d87e8>] (__device_attach) from [<c06d7b00>] (bus_probe_device+0x88/0x90)
[    0.270563] [<c06d7b00>] (bus_probe_device) from [<c06d49d0>] (device_add+0x608/0x754)
[    0.270591] [<c06d49d0>] (device_add) from [<c088c4a0>] (i2c_new_client_device+0x12c/0x20c)
[    0.270615] [<c088c4a0>] (i2c_new_client_device) from [<c088c588>] (i2c_new_device+0x8/0x14)
[    0.270641] [<c088c588>] (i2c_new_device) from [<c088f5e0>] (of_i2c_register_devices+0x90/0x110)
[    0.270666] [<c088f5e0>] (of_i2c_register_devices) from [<c088c950>] (i2c_register_adapter+0x148/0x3ec)
[    0.270691] [<c088c950>] (i2c_register_adapter) from [<c0892b24>] (i2c_imx_probe+0x37c/0x830)
[    0.270719] [<c0892b24>] (i2c_imx_probe) from [<c06dac38>] (platform_drv_probe+0x48/0x98)
[    0.270747] [<c06dac38>] (platform_drv_probe) from [<c06d8a40>] (really_probe+0x1dc/0x340)
[    0.270773] [<c06d8a40>] (really_probe) from [<c06d8d50>] (driver_probe_device+0x84/0x194)
[    0.270797] [<c06d8d50>] (driver_probe_device) from [<c06d9044>] (device_driver_attach+0x58/0x60)
[    0.270821] [<c06d9044>] (device_driver_attach) from [<c06d90a4>] (__driver_attach+0x58/0xd0)
[    0.270844] [<c06d90a4>] (__driver_attach) from [<c06d6d70>] (bus_for_each_dev+0x70/0xb4)
[    0.270867] [<c06d6d70>] (bus_for_each_dev) from [<c06d7d9c>] (bus_add_driver+0x198/0x1d0)
[    0.270890] [<c06d7d9c>] (bus_add_driver) from [<c06d9d30>] (driver_register+0x74/0x108)
[    0.270916] [<c06d9d30>] (driver_register) from [<c0103078>] (do_one_initcall+0x80/0x338)
[    0.270946] [<c0103078>] (do_one_initcall) from [<c1301214>] (kernel_init_freeable+0x2fc/0x3d8)
[    0.270973] [<c1301214>] (kernel_init_freeable) from [<c0d3f59c>] (kernel_init+0x8/0x110)
[    0.270997] [<c0d3f59c>] (kernel_init) from [<c01010b4>] (ret_from_fork+0x14/0x20)
[    0.271015] Exception stack(0xec0e9fb0 to 0xec0e9ff8)
[    0.271038] 9fa0:                                     00000000 00000000 00000000 00000000
[    0.271059] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.271077] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.271094] irq event stamp: 70901
[    0.271125] hardirqs last  enabled at (70909): [<c019be00>] console_unlock+0x418/0x5f4
[    0.271149] hardirqs last disabled at (70916): [<c019ba70>] console_unlock+0x88/0x5f4
[    0.271173] softirqs last  enabled at (69156): [<c01024e4>] __do_softirq+0x2c4/0x514
[    0.271198] softirqs last disabled at (68881): [<c013da4c>] irq_exit+0x100/0x188
[    0.271268] ---[ end trace 579e47ca40f2be36 ]---

Signed-off-by: Robby Cai <robby.cai@nxp.com>
2023-10-30 16:09:24 +08:00
Julien Olivain
6852169e50 MLK-13470 mfd: max17135: export symbols to fix build error as a module
export symbols to fix build error as a module:

ERROR: "max17135_reg_read" [drivers/hwmon/max17135-hwmon.ko] undefined!

Signed-off-by: Julien Olivain <julien.olivain@nxp.com>
Acked-by: Robby Cai <robby.cai@nxp.com>
2023-10-30 16:09:23 +08:00
Fugang Duan
551d0cd33a MLK-11908 mfd: MAX17135: don't free i2c device client
i2c device client shouldn't be freed by i2c device driver, there have
problems in below cases:
- one device match to different drivers, the second matched driver will
  cannot access i2c device client if it is freed by the first matched
  driver.
- one module driver insmod: the first insmod fail free client due to system
  low memory, after kswapd system free pages and has enough free pages, the
  second insmod will cause match failed.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2023-10-30 16:09:23 +08:00
Robby Cai
853944c518 MLK-11556-1 pmic: max17135: add hwmon, mfd and regulator drivers for this pmic
Add PMIC 'MAX17135' module drivers to 4.1.y kernel. These are necessary
to supply power for E-ink panel display functions.

Signed-off-by: Robby Cai <r63905@freescale.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2023-10-30 16:09:23 +08:00
Sandor Yu
7d05b46147 driver: mfd: hdmi: Add hdmi core and cec driver
Add imx6 hdmi code and cec driver.
This patch forwards imx6 HDMI code driver from imx_4.19.y kernel.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
[ Robby Cai: Update class_create() api ]
Signed-off-by: Robby Cai <robby.cai@nxp.com>
2023-10-30 15:56:00 +08:00
Adrian Alonso
e00634ceb8 LF-8343-1: drivers: mfd: imx flexio core driver support
Multi function driver for flexible io driver found
on imx8ulp, imx9x SoC

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
2023-10-30 15:49:44 +08:00
Ioana Ciornei
e1823d8d46 mfd: simple-mfd-i2c: add compatible string for LX2160A QIXIS CPLD
The QIXIS CPLD found on the LX2160A-RDB and LX2160A-QDS boards deals
with power-on-reset timing, muxing etc. Use the simple-mfd-i2c as its
core driver by adding an individual compatible string for each board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
2023-10-30 15:48:46 +08:00
Haibo Chen
8059835bee MLK-25917-1 mfd: adp5585: add ADI adp5585 core support
ADP5585 support multi function, include expander GPIO, pwm, keypad controller.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
(cherry picked from commit ad20e1cc8a)
2023-10-30 15:48:46 +08:00
Laurentiu Palcu
56ce69ebbb LF-10269-5: mfd: add Maxim SerDes link manager layer
Since GMSL link setup and initialization requires procedures that need
to be executed in a precise sequence, we cannot successfully finish the
setup during drivers' probe() routines as, at some point, we need to
instruct the serializer to reset the GMSL links after the deserializer
GMSL parameters were set. This layer will take care of finishing the
GMSL links' initialization after all SerDes chip probe() routines
completed.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2023-10-30 15:34:22 +08:00
Laurentiu Palcu
7c433d1a97 LF-10269-2: mfd: Add support for MAX96752 deserializer with LVDS support
The MAX96752/MAX96754 deserializers convert a single or dual-link GMSL
serial input to single or dual OLDI. They also send and receive
side-channel and peripheral control data, enabling full-duplex,
single-wire transmission of video and bidirectional data.

This driver adds the core support with separate drivers adding
support for video or audio.

GPIO support is included in the core part as this is not a GPIO
controller in the Linux sense. It performs GPIO tunneling, translating
GPIO pin transitions from local side to the remote side and viceversa.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2023-10-30 15:34:21 +08:00
Laurentiu Palcu
346d37854e LF-10269-1: mfd: Add support for max96789 MIPI-DSI serializer
The MAX96789/MAX96791 family of serializers convert dual MIPI DSI,
four-lane input port data to dual Maxim Integrated’s GMSL 1 or 2
high-speed serial link protocol.  They also send and receive
side-channel and peripheral control data, enabling full-duplex,
single-wire, transmission of video and bidirectional data.

This driver adds the core support with separate drivers adding support
for video or audio.

GPIO support is included in the core part as this is not a GPIO
controller in the Linux sense. It performs GPIO tunneling, translating
GPIO pin transitions from local side to the remote side and viceversa.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2023-10-30 15:34:21 +08:00
Shengjiu Wang
63aaa674a6 MLK-22355: mfd: si476x: Use system_freezable_wq instead of system_wq
There is issue that system can't enter suspend while the si476x is
working.

The reason is that with the workqueue thread is still working after
i2c enter suspend, then cause the cpu_suspend function failed.

This patch is to use the system_freezable_wq instead of the system_wq,
that the workqueue will be freeze before system enter suspend.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2023-10-30 15:19:47 +08:00
Shengjiu Wang
0ed10a3666 MLK-10055-2: mfd: si476x-i2c: sound is registered when no FM module attached
The si476x_core_get_revision_info will send i2c command to FM module, if it
return error, there is no FM modules attached, so we need't to register the
sound card. otherwise, the pulseaudio will access this sound card, but
return a lot of i2c error.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 4c8e991612)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2023-10-30 15:19:47 +08:00
Zidan Wang
bea820f59f MLK-10038-1: mfd: si476x-i2c: Add support of si476x-rev4.0 board
Currently, si476x-rev1.0 and si476x-rev4.0 board just support A10
compatible command set. For si476x-rev1.0 board, its firmware revision is
unsupported and will revert to A10 compatible function. For si476x-rev4.0
board, its firmware revision is two and will use A30 function, but A30
command set function can't work for the rev4.0 board.
So make the command set configurable in dts. If "revision-a10" is present,
set the revision to SI476X_REVISION_A10 to use A10 compatible commit set.
Otherwise, get the revision from si476x register.

Signed-off-by: Zidan Wang <b50113@freescale.com>
(cherry picked from commit b648714c3b)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2023-10-30 15:19:47 +08:00
Shengjiu Wang
728bf081f3 MLK-9684-1: mfd: si476x-i2c: add of_compatible for si476x-codec
Add of_compatible for si476x-codec, then si476x-codec driver will have
codec_of_node, So machine driver can use the codec_of_node.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit e2ec44f91a21b127e155e8317d06e8ead7fd2678)
(cherry picked from commit ac6decaf54)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2023-10-30 15:19:47 +08:00
Nicolin Chen
5395ddcbb5 MLK-11429-23: mfd: si476x: Use default configuration when no platform data
cherry-pick below patch from imx_3.14.y
ENGR00276567-6 mfd: si476x: Use default configuration when no platform data

This would allow the driver to work normally without specific platform
data, when using devicetree for example.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 23e369b88b546d7b699ca9ec46e195a05c61b717)
(cherry picked from commit a2449e1d30)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
2023-10-30 15:19:47 +08:00
Nicolin Chen
728a21e575 MLK-11429-22: mfd: si476x: Fix power up failure
cherry-pick below patch from imx_3.14.y
ENGR00276567-4 mfd: si476x: Fix power up failure

This's some logical error in power-up code, thus fix it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
(cherry picked from commit 77d97ad1bb77c0e3c60b9781a06b61d4b4667de1)
(cherry picked from commit b656522da2)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2023-10-30 15:19:47 +08:00
Linus Torvalds
bc622f16c1 Couple of small fixes, including:
- Potential build failure in CS42L43
   - Device Tree bindings clean-up for a superseded patch
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmUe1V0ACgkQUa+KL4f8
 d2FhOA/9G0L0+sCd5kYKInfNcZklY/R9XKNoX5g5DQA8vyVllWIycbPL6VlPli0d
 IRyw7uQLdWba4mlNWXql5pU7wGWgBqr268VwFhCGK6/vbJLpMFYEWGmOq306x6wz
 poSrKmAKJeFswb0GSEyLeDtt/3c0k9bYV+ZUxavNTwoYmLaApP0NKQmNuH0mptA6
 pZ825PCEWbNS++FI5lv+dPfOzWDlh691n8ea41HRD/svGDdNCS+EpTLcX9L+81P+
 EIx+GWtW7CUGNYP2jJhMU7WW4/+3Uxdyrojmx+t9vkiD6t6sZkclDBxMzf7x+vLt
 NtcWpUdeHR0phAFTUxR74w7vIgfiHb2HWNdpmzNB7ZWuGsClQDIVU8KL2JtvDZ6X
 hcByEKnz7QwOXaZo5qwfWmmc5rVQkZG5CKrVN23/DVHlseyFShmllI4yw7fjfAGn
 JWAF5IwrfZFgVPAeTmmZwmuNFx4pZiPj4ajBLmEvF5OxuHsaNjE1W7WOZnITwRdn
 22EL9Q/DRsdzDci4eW7AHDwqwMJhUW7HIVMWEOMknuS/aEdrtJhNB2X8TDC9/zBi
 p50K+mxGs/RB/uvHDDCce/fVgDpTDhuovAJRncigGZmDvWgXHMR7+UIgNW9opHwl
 i8833UANGOEfBi68quVcAr7EI3CnTsMtr0b/JTibmTcrV0vZb10=
 =g4wJ
 -----END PGP SIGNATURE-----

Merge tag 'mfd-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD fixes from Lee Jones:
 "A couple of small fixes:

   - Potential build failure in CS42L43

   - Device Tree bindings clean-up for a superseded patch"

* tag 'mfd-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  dt-bindings: mfd: Revert "dt-bindings: mfd: maxim,max77693: Add USB connector"
  mfd: cs42l43: Fix MFD_CS42L43 dependency on REGMAP_IRQ
2023-10-05 11:03:20 -07:00
Charles Keepax
eb72d52070 mfd: cs42l43: Use correct macro for new-style PM runtime ops
The code was accidentally mixing new and old style macros, update the
macros used to remove an unused function warning whilst building with
no PM enabled in the config.

Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/all/20230822114914.340359-1-ckeepax@opensource.cirrus.com/
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-09-23 11:10:23 -07:00
Woody Zhang
9ef4dc24eb mfd: cs42l43: Fix MFD_CS42L43 dependency on REGMAP_IRQ
MFD_CS42L43 depends on REGMAP_IRQ as it uses devm_regmap_add_irq_chip.
Otherwise the build may fail with following log.

  AR      drivers/built-in.a
  AR      built-in.a
  AR      vmlinux.a
  LD      vmlinux.o
  OBJCOPY modules.builtin.modinfo
  GEN     modules.builtin
  MODPOST Module.symvers
ERROR: modpost: "devm_regmap_add_irq_chip" [drivers/mfd/cs42l43.ko] undefined!

Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Woody Zhang <woodylab@foxmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/tencent_E54C7156F583E15FFE320E576E3389C39A08@qq.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-09-19 15:05:20 +01:00