summaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
2021-11-10Merge tag 'tag-chrome-platform-for-v5.16' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "cros_ec_typec: - Clean up use of cros_ec_check_features cros_ec_*: - Rename and move cros_ec_pd_command to cros_ec_command, and make changes to cros_ec_typec and cros_ec_proto to use the new common command, reducing duplication. sensorhub: - simplify getting .driver_data in cros_ec_sensors_core and cros_ec_sensorhub misc: - Maintainership change. Enric Balletbo i Serra has moved on from Collabora, so removing him from chrome/platform maintainers. Thanks for all of your hard work maintaining this, Enric, and best of luck to you in your new role! - Add Prashant Malani as driver maintainer for cros_ec_typec.c and cros_usbpd_notify. He was already principal contributor of these drivers" * tag 'tag-chrome-platform-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_proto: Use ec_command for check_features platform/chrome: cros_ec_proto: Use EC struct for features MAINTAINERS: Chrome: Drop Enric Balletbo i Serra platform/chrome: cros_ec_typec: Use cros_ec_command() platform/chrome: cros_ec_proto: Add version for ec_command platform/chrome: cros_ec_proto: Make data pointers void platform/chrome: cros_usbpd_notify: Move ec_command() platform/chrome: cros_usbpd_notify: Rename cros_ec_pd_command() platform/chrome: cros_ec: Fix spelling mistake "responsed" -> "response" platform/chrome: cros_ec_sensorhub: simplify getting .driver_data iio: common: cros_ec_sensors: simplify getting .driver_data platform/chrome: cros-ec-typec: Cleanup use of check_features platform/chrome: cros_ec_proto: Fix check_features ret val MAINTAINERS: Add Prashant's maintainership of cros_ec drivers
2021-11-10Merge tag 'linux-watchdog-5.16-rc1' of ↵Linus Torvalds
git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - f71808e_wdt: convert to watchdog framework - db8500_wdt: Rename driver (was ux500_wdt.c) - sunxi: Add compatibles for R329 and D1 - mtk: add disable_wdt_extrst support - several other small fixes and improvements * tag 'linux-watchdog-5.16-rc1' of git://www.linux-watchdog.org/linux-watchdog: (30 commits) watchdog: db8500_wdt: Rename symbols watchdog: db8500_wdt: Rename driver watchdog: ux500_wdt: Drop platform data watchdog: bcm63xx_wdt: fix fallthrough warning watchdog: iTCO_wdt: No need to stop the timer in probe watchdog: s3c2410: describe driver in KConfig watchdog: sp5100_tco: Add support for get_timeleft watchdog: mtk: add disable_wdt_extrst support dt-bindings: watchdog: mtk-wdt: add disable_wdt_extrst support watchdog: rza_wdt: Use semicolons instead of commas watchdog: mlx-wdt: Use regmap_write_bits() watchdog: rti-wdt: Make use of the helper function devm_platform_ioremap_resource() watchdog: iTCO_wdt: Make use of the helper function devm_platform_ioremap_resource() watchdog: ar7_wdt: Make use of the helper function devm_platform_ioremap_resource_byname() watchdog: sunxi_wdt: Add support for D1 dt-bindings: watchdog: sunxi: Add compatibles for D1 ar7: fix kernel builds for compiler test dt-bindings: watchdog: sunxi: Add compatibles for R329 watchdog: meson_gxbb_wdt: add timeout parameter watchdog: meson_gxbb_wdt: add nowayout parameter ...
2021-11-05mfd: simple-mfd-i2c: Select MFD_CORE to fix build errorRobert Marko
MFD_SIMPLE_MFD_I2C should select the MFD_CORE to a prevent build error: aarch64-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe': drivers/mfd/simple-mfd-i2c.c:55: undefined reference to `devm_mfd_add_devices' Cc: <stable@vger.kernel.org> Fixes: c753ea31781aa ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells") Signed-off-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211102100420.112215-1-robert.marko@sartura.hr
2021-11-05mfd: tps80031: Remove driverDmitry Osipenko
Driver was upstreamed in 2013 and never got a user, remove it. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211021192258.21968-4-digetx@gmail.com
2021-11-05mfd: wcd934x: Replace legacy gpio interface for gpiodMaíra Canal
Considering the current transition of the GPIO subsystem, remove all dependencies of the legacy GPIO interface (linux/gpio.h and linux /of_gpio.h) and replace it with the descriptor-based GPIO approach. Signed-off-by: Maíra Canal <maira.canal@usp.br> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/YXDEBCiSnXYRQPXt@fedora
2021-11-05mfd: dln2: Add cell for initializing DLN2 ADCJack Andersen
This patch extends the DLN2 driver; adding cell for adc_dln2 module. The original patch[1] fell through the cracks when the driver was added so ADC has never actually been usable. That patch did not have ACPI support which was added in v5.9, so the oldest supported version this current patch can be backported to is 5.10. [1] https://www.spinics.net/lists/linux-iio/msg33975.html Cc: <stable@vger.kernel.org> # 5.10+ Signed-off-by: Jack Andersen <jackoalan@gmail.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211018112541.25466-1-noralf@tronnes.org
2021-11-05mfd: qcom-spmi-pmic: Add missing PMICs supported by socinfoBjorn Andersson
The Qualcomm socinfo driver has eight more PMICs described, add these to the SPMI PMIC driver as well. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211017161218.2378176-4-bjorn.andersson@linaro.org
2021-11-05mfd: qcom-spmi-pmic: Sort compatibles in the driverBjorn Andersson
Sort the compatibles in the driver, to make it easier to validate that the DT binding and driver are in sync. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211017161218.2378176-2-bjorn.andersson@linaro.org
2021-11-05mfd: janz-cmoio: Replace snprintf in show functions with sysfs_emitQing Wang
show() must not use snprintf() when formatting the value to be returned to user space. Fix the following coccicheck warning: drivers/mfd/janz-cmodio.c:157: WARNING: use scnprintf or sprintf. Use sysfs_emit instead of scnprintf or sprintf makes more sense. Signed-off-by: Qing Wang <wangqing@vivo.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/1634280592-4722-1-git-send-email-wangqing@vivo.com
2021-11-05mfd: altera-a10sr: Include linux/module.hArnd Bergmann
Without the header, the MODULE_DEVICE_TABLE() declaration fails: drivers/mfd/altera-a10sr.c:153:1: error: data definition has no type or storage class [-Werror] 153 | MODULE_DEVICE_TABLE(of, altr_a10sr_spi_of_match); Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211013144402.2292128-1-arnd@kernel.org
2021-11-05mfd: tps65912: Make tps65912_device_exit() return voidUwe Kleine-König
Up to now tps65912_device_exit() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211012153945.2651412-11-u.kleine-koenig@pengutronix.de
2021-11-05mfd: stmpe: Make stmpe_remove() return voidUwe Kleine-König
Up to now stmpe_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211012153945.2651412-10-u.kleine-koenig@pengutronix.de
2021-11-05mfd: mc13xxx: Make mc13xxx_common_exit() return voidUwe Kleine-König
Up to now mc13xxx_common_exit() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211012153945.2651412-9-u.kleine-koenig@pengutronix.de
2021-11-05mfd: altera-sysmgr: Fix a mistake caused by resource_size conversionKai Song
The resource_size defines that: res->end - res->start + 1; The origin original code is: sysmgr_config.max_register = res->end - res->start - 3; So, the correct fix is that: sysmgr_config.max_register = resource_size(res) - 4; Fixes: d12edf9661a4 ("mfd: altera-sysmgr: Use resource_size function on resource object") Signed-off-by: Kai Song <songkai01@inspur.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211006141926.6120-1-songkai01@inspur.com
2021-11-05mfd: arizona: Split of_match table into I2C and SPI versionsCharles Keepax
The Arizona driver has both some devices which only have an I2C interface and some which only have a SPI interface. Currently both of these share an of_match table, but this means inapproriate compatibles are available for each interface. Tidy this up by creating a table for each interface listing only the appropriate compatibles. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210928163035.23960-1-ckeepax@opensource.cirrus.com
2021-11-05mfd: qcom-pm8xxx: switch away from using chained IRQ handlersDmitry Baryshkov
PM8xxx PMIC family uses GPIO as parent IRQ. Using it together with the irq_set_chained_handler_and_data() results in warnings from the GPIOLIB (see 461c1a7d4733 ("gpiolib: override irq_enable/disable")) as in this path the IRQ resources are not allocated (and thus the corresponding GPIO is not marked as used for the IRQ. Use request_irq so that the IRQ resources are proprely setup. [ 0.803271] ------------[ cut here ]------------ [ 0.803338] WARNING: CPU: 3 PID: 1 at drivers/gpio/gpiolib.c:3207 gpiochip_enable_irq+0xa4/0xa8 [ 0.803470] Modules linked in: [ 0.803542] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc6-next-20210820-postmarketos-qcom-apq8064+ #1 [ 0.803645] Hardware name: Generic DT based system [ 0.803710] Backtrace: [ 0.803777] [<c0e3493c>] (dump_backtrace) from [<c0e34d00>] (show_stack+0x20/0x24) [ 0.803911] r7:00000c87 r6:c07062dc r5:60000093 r4:c11d0f54 [ 0.803980] [<c0e34ce0>] (show_stack) from [<c0e38314>] (dump_stack_lvl+0x48/0x54) [ 0.804097] [<c0e382cc>] (dump_stack_lvl) from [<c0e38338>] (dump_stack+0x18/0x1c) [ 0.804217] r5:00000009 r4:c11fe208 [ 0.804274] [<c0e38320>] (dump_stack) from [<c03219c8>] (__warn+0xfc/0x114) [ 0.804387] [<c03218cc>] (__warn) from [<c0e35334>] (warn_slowpath_fmt+0x74/0xd0) [ 0.804509] r7:c07062dc r6:00000c87 r5:c11fe208 r4:00000000 [ 0.804577] [<c0e352c4>] (warn_slowpath_fmt) from [<c07062dc>] (gpiochip_enable_irq+0xa4/0xa8) [ 0.804716] r8:c27b6200 r7:c27aec00 r6:c27aec18 r5:cf77a448 r4:c02225f0 [ 0.804789] [<c0706238>] (gpiochip_enable_irq) from [<c0706348>] (gpiochip_irq_enable+0x28/0x38) [ 0.804921] r5:cf77a448 r4:c27aec18 [ 0.804977] [<c0706320>] (gpiochip_irq_enable) from [<c03897a0>] (irq_enable+0x48/0x78) [ 0.805111] r5:00000000 r4:c27aec00 [ 0.805167] [<c0389758>] (irq_enable) from [<c0389850>] (__irq_startup+0x80/0xbc) [ 0.805286] r5:00000000 r4:c27aec00 [ 0.805343] [<c03897d0>] (__irq_startup) from [<c038996c>] (irq_startup+0xe0/0x18c) [ 0.805468] r7:c27aec00 r6:00000001 r5:00000000 r4:c27aec00 [ 0.805535] [<c038988c>] (irq_startup) from [<c0389a54>] (irq_activate_and_startup+0x3c/0x74) [ 0.805669] r7:c27aec00 r6:00000001 r5:c27aec00 r4:00000000 [ 0.805736] [<c0389a18>] (irq_activate_and_startup) from [<c0389b58>] (__irq_do_set_handler+0xcc/0x1c0) [ 0.805875] r7:c27aec00 r6:c0383710 r5:c08a16b0 r4:00000001 [ 0.805943] [<c0389a8c>] (__irq_do_set_handler) from [<c0389d80>] (irq_set_chained_handler_and_data+0x60/0x98) [ 0.806087] r7:c27b5c10 r6:c27aed40 r5:c08a16b0 r4:c27aec00 [ 0.806154] [<c0389d20>] (irq_set_chained_handler_and_data) from [<c08a1660>] (pm8xxx_probe+0x1fc/0x24c) [ 0.806298] r6:0000003a r5:0000003a r4:c27b5c00 [ 0.806359] [<c08a1464>] (pm8xxx_probe) from [<c0871420>] (platform_probe+0x6c/0xc8) [ 0.806495] r10:c2507080 r9:e8bea2cc r8:c165e0e0 r7:c165e0e0 r6:c15f08f8 r5:c27b5c10 [ 0.806582] r4:00000000 [ 0.806632] [<c08713b4>] (platform_probe) from [<c086e280>] (really_probe+0xe8/0x460) [ 0.806769] r7:c165e0e0 r6:c15f08f8 r5:00000000 r4:c27b5c10 [ 0.806837] [<c086e198>] (really_probe) from [<c086e6a8>] (__driver_probe_device+0xb0/0x22c) [ 0.806975] r7:c27b5c10 r6:cf70fba4 r5:c15f08f8 r4:c27b5c10 [ 0.807042] [<c086e5f8>] (__driver_probe_device) from [<c086e868>] (driver_probe_device+0x44/0xe0) [ 0.807188] r9:e8bea2cc r8:00000000 r7:c27b5c10 r6:cf70fba4 r5:c16ae4b4 r4:c16ae4b0 [ 0.807271] [<c086e824>] (driver_probe_device) from [<c086ecd8>] (__device_attach_driver+0xb4/0x12c) [ 0.807421] r9:e8bea2cc r8:c15eec08 r7:c27b5c10 r6:cf70fba4 r5:c15f08f8 r4:00000001 [ 0.807506] [<c086ec24>] (__device_attach_driver) from [<c086c06c>] (bus_for_each_drv+0x94/0xe4) [ 0.807651] r7:c16ae484 r6:c086ec24 r5:cf70fba4 r4:00000000 [ 0.807718] [<c086bfd8>] (bus_for_each_drv) from [<c086e0e0>] (__device_attach+0x104/0x19c) [ 0.807852] r6:00000001 r5:c27b5c54 r4:c27b5c10 [ 0.807913] [<c086dfdc>] (__device_attach) from [<c086eef4>] (device_initial_probe+0x1c/0x20) [ 0.808050] r6:c27b5c10 r5:c15ef1b0 r4:c27b5c10 [ 0.808111] [<c086eed8>] (device_initial_probe) from [<c086d00c>] (bus_probe_device+0x94/0x9c) [ 0.808240] [<c086cf78>] (bus_probe_device) from [<c086a60c>] (device_add+0x404/0x8f4) [ 0.808370] r7:c16ae484 r6:c251ba10 r5:00000000 r4:c27b5c10 [ 0.808439] [<c086a208>] (device_add) from [<c0a82f50>] (of_device_add+0x44/0x4c) [ 0.808581] r10:c144c854 r9:00000001 r8:e8bea314 r7:c251ba10 r6:00000000 r5:00000000 [ 0.808669] r4:c27b5c00 [ 0.808718] [<c0a82f0c>] (of_device_add) from [<c0a836cc>] (of_platform_device_create_pdata+0xa0/0xc8) [ 0.808850] [<c0a8362c>] (of_platform_device_create_pdata) from [<c0a83908>] (of_platform_bus_create+0x1f0/0x514) [ 0.809005] r9:00000001 r8:c251ba10 r7:00000000 r6:00000000 r5:00000000 r4:e8bea2b0 [ 0.809086] [<c0a83718>] (of_platform_bus_create) from [<c0a83e04>] (of_platform_populate+0x98/0x128) [ 0.809233] r10:c144c854 r9:00000001 r8:c251ba10 r7:00000000 r6:00000000 r5:e8bea170 [ 0.809321] r4:e8bea2b0 [ 0.809371] [<c0a83d6c>] (of_platform_populate) from [<c0a83f20>] (devm_of_platform_populate+0x60/0xa8) [ 0.809521] r9:0000011d r8:c165e0e0 r7:e8bea170 r6:c2c34f40 r5:c2cac140 r4:c251ba10 [ 0.809604] [<c0a83ec0>] (devm_of_platform_populate) from [<c08a212c>] (ssbi_probe+0x138/0x16c) [ 0.809738] r6:c2c34f40 r5:c251ba10 r4:ff822700 [ 0.809800] [<c08a1ff4>] (ssbi_probe) from [<c0871420>] (platform_probe+0x6c/0xc8) [ 0.809923] r7:c165e0e0 r6:c15f0a80 r5:c251ba10 r4:00000000 [ 0.809989] [<c08713b4>] (platform_probe) from [<c086e280>] (really_probe+0xe8/0x460) [ 0.810120] r7:c165e0e0 r6:c15f0a80 r5:00000000 r4:c251ba10 [ 0.810187] [<c086e198>] (really_probe) from [<c086e6a8>] (__driver_probe_device+0xb0/0x22c) [ 0.810325] r7:c251ba10 r6:c15f0a80 r5:c15f0a80 r4:c251ba10 [ 0.810393] [<c086e5f8>] (__driver_probe_device) from [<c086e868>] (driver_probe_device+0x44/0xe0) [ 0.810539] r9:0000011d r8:00000000 r7:c251ba10 r6:c15f0a80 r5:c16ae4b4 r4:c16ae4b0 [ 0.810623] [<c086e824>] (driver_probe_device) from [<c086ee2c>] (__driver_attach+0xdc/0x188) [ 0.810766] r9:0000011d r8:c144c834 r7:00000000 r6:c15f0a80 r5:c251ba10 r4:00000000 [ 0.810849] [<c086ed50>] (__driver_attach) from [<c086bf60>] (bus_for_each_dev+0x88/0xd4) [ 0.810985] r7:00000000 r6:c086ed50 r5:c15f0a80 r4:00000000 [ 0.811052] [<c086bed8>] (bus_for_each_dev) from [<c086dad4>] (driver_attach+0x2c/0x30) [ 0.811182] r6:c15ef1b0 r5:c2c34e80 r4:c15f0a80 [ 0.811243] [<c086daa8>] (driver_attach) from [<c086d2dc>] (bus_add_driver+0x180/0x21c) [ 0.811364] [<c086d15c>] (bus_add_driver) from [<c086fa6c>] (driver_register+0x84/0x118) [ 0.811492] r7:00000000 r6:ffffe000 r5:c1428210 r4:c15f0a80 [ 0.811558] [<c086f9e8>] (driver_register) from [<c0871174>] (__platform_driver_register+0x2c/0x34) [ 0.811683] r5:c1428210 r4:c16524a0 [ 0.811739] [<c0871148>] (__platform_driver_register) from [<c1428234>] (ssbi_driver_init+0x24/0x28) [ 0.811868] [<c1428210>] (ssbi_driver_init) from [<c0302394>] (do_one_initcall+0x68/0x2c8) [ 0.811990] [<c030232c>] (do_one_initcall) from [<c140147c>] (kernel_init_freeable+0x1dc/0x23c) [ 0.812135] r7:cf7b0400 r6:c130339c r5:00000007 r4:c147f6a0 [ 0.812204] [<c14012a0>] (kernel_init_freeable) from [<c0e40e60>] (kernel_init+0x20/0x138) [ 0.812345] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0e40e40 [ 0.812433] r4:00000000 [ 0.812483] [<c0e40e40>] (kernel_init) from [<c0300150>] (ret_from_fork+0x14/0x24) [ 0.812596] Exception stack(0xcf70ffb0 to 0xcf70fff8) [ 0.812684] ffa0: 00000000 00000000 00000000 00000000 [ 0.812809] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 0.812923] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 0.813008] r5:c0e40e40 r4:00000000 [ 0.813075] ---[ end trace ad2443eee078d094 ]--- Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: David Heidelberg <david@ixit.cz> # on Nexus 7 (deb) Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210925234333.2430755-1-dmitry.baryshkov@linaro.org
2021-11-05mfd: sprd: Add SPI device ID tableMark Brown
Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding a SPI device ID table. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210924143347.14721-4-broonie@kernel.org
2021-11-05mfd: cpcap: Add SPI device ID tableMark Brown
Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding a SPI device ID table. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210924143347.14721-3-broonie@kernel.org
2021-11-05mfd: altr_a10sr: Add SPI device ID tableMark Brown
Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding a SPI device ID table. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210924143347.14721-2-broonie@kernel.org
2021-11-05mfd: exynos-lpass: Describe driver in KConfigKrzysztof Kozlowski
Describe better which driver applies to which SoC, to make configuring kernel for Samsung SoC easier. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210924133332.112092-1-krzysztof.kozlowski@canonical.com
2021-11-05mfd: core: Add missing of_node_put for loop iterationKrzysztof Kozlowski
Early exits from for_each_child_of_node() should decrement the node reference counter. Reported by Coccinelle: drivers/mfd/mfd-core.c:197:2-24: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 209. Fixes: c94bb233a9fe ("mfd: Make MFD core code Device Tree and IRQ domain aware") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210528115126.18370-1-krzysztof.kozlowski@canonical.com
2021-11-05mfd: intel-lpss: Add support for MacBookPro16,2 ICL-N UARTOrlando Chamberlain
Added 8086:38a8 to the intel_lpss_pci driver. It is an Intel Ice Lake PCH-N UART controler present on the MacBookPro16,2. Signed-off-by: Orlando Chamberlain <redecorating@protonmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211002111449.12674-1-redecorating@protonmail.com
2021-11-05mfd: max14577: Do not enforce (incorrect) interrupt trigger typeKrzysztof Kozlowski
Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge falling - but instead rely on Devicetree to configure it. The Maxim 14577/77836 datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. The interrupt line is shared between PMIC and charger driver, so using level sensitive interrupt is here especially important to avoid races. With an edge configuration in case if first PMIC signals interrupt followed shortly after by the RTC, the interrupt might not be yet cleared/acked thus the second one would not be noticed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210602110445.33536-4-krzysztof.kozlowski@canonical.com
2021-11-05mfd: max77693: Do not enforce (incorrect) interrupt trigger typeKrzysztof Kozlowski
Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge falling - but instead rely on Devicetree to configure it. The Maxim 77693 datasheet describes the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. The interrupt line is shared between PMIC and RTC driver, so using level sensitive interrupt is here especially important to avoid races. With an edge configuration in case if first PMIC signals interrupt followed shortly after by the RTC, the interrupt might not be yet cleared/acked thus the second one would not be noticed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210602110445.33536-3-krzysztof.kozlowski@canonical.com
2021-11-05mfd: max77686: Do not enforce (incorrect) interrupt trigger typeKrzysztof Kozlowski
Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge falling - but instead rely on Devicetree to configure it. The Maxim 77686 datasheet describes the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. The interrupt line is shared between PMIC and RTC driver, so using level sensitive interrupt is here especially important to avoid races. With an edge configuration in case if first PMIC signals interrupt followed shortly after by the RTC, the interrupt might not be yet cleared/acked thus the second one would not be noticed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210602110445.33536-2-krzysztof.kozlowski@canonical.com
2021-11-05mfd: sec-irq: Do not enforce (incorrect) interrupt trigger typeKrzysztof Kozlowski
Interrupt line can be configured on different hardware in different way, even inverted. Therefore driver should not enforce specific trigger type - edge falling - but instead rely on Devicetree to configure it. The Samsung PMIC drivers are used only on Devicetree boards. Additionally, the PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. Marek Szyprowski reports that together with DTS change (proper level in DTS) it fixes RTC alarm failure that he observed from time to time on TM2e board. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210602110445.33536-1-krzysztof.kozlowski@canonical.com
2021-11-05mfd: cros_ec: Drop unneeded MODULE_ALIASKrzysztof Kozlowski
The MODULE_DEVICE_TABLE already creates proper alias. Having another MODULE_ALIAS causes the alias to be duplicated: $ modinfo cros_ec_dev.ko alias: platform:cros-ec-dev srcversion: F84A69D2156719A4F717A76 alias: platform:cros-ec-dev Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05mfd: Kconfig: Fix typo in PMIC_ADP5520 from AD5520 to ADP5520Ramona Alexandra Nechita
The description mentioned AD5520, which is a different device. Fixed the typo. Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05mfd: sprd: Add support for SC2730 PMICChunyan Zhang
SC2730 is a PMIC SoC integrated in UMS512. Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05mfd: da9063: Add support for latest EA silicon revisionCarlos de Paula
This update adds new regmap to support the latest EA silicon which will be selected based on the chip and variant information read from the device. Signed-off-by: Carlos de Paula <me@carlosedp.com> Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05mfd: rk808: Add support for power off on RK817Ondrej Jirman
RK817 has a power-off bit in SYS_CFG3. Add support for powering off the PMIC. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05mfd: intel_pmt: Only compile on x86Prarit Bhargava
The intel_pmt driver shows up as a compile option for all arches but is 32-bit and 64-bit x86 specific. Add a CONFIG dependency on X86 for intel_pmt. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Reviewed-by: David E. Box <david.e.box@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05mfd: ti_am335x_tscadc: Fix spelling mistake "atleast" -> "at least"Colin Ian King
There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-11-05Merge branches 'ib-mfd-iio-touchscreen-clk-5.16', ↵Lee Jones
'ib-mfd-misc-regulator-5.16' and 'tb-mfd-from-regulator-5.16' into ibs-for-mfd-merged
2021-11-01watchdog: db8500_wdt: Rename symbolsLinus Walleij
For conistency and clarity, rename all symbols and strings from ux500 to db8500 in the driver. Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210922230947.1864357-3-linus.walleij@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2021-11-01watchdog: ux500_wdt: Drop platform dataLinus Walleij
Drop the platform data passing from the PRCMU driver. This platform data was part of the ambition to support more SoCs, which in turn were never mass produced. Only a name remains of the MFD cell so switch to MFD_CELL_NAME(). Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210922230947.1864357-1-linus.walleij@linaro.org Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2021-10-31platform/chrome: cros_ec_proto: Use EC struct for featuresPrashant Malani
The Chrome EC's features are returned through an ec_response_get_features struct, but they are stored in an independent array. Although the two are effectively the same at present (2 unsigned 32 bit ints), there is the possibility that they could go out of sync. Avoid this by only using the EC struct to store the features. Signed-off-by: Prashant Malani <pmalani@chromium.org> Link: https://lore.kernel.org/r/20211004170716.86601-1-pmalani@chromium.org Signed-off-by: Benson Leung <bleung@chromium.org>
2021-10-21mfd: ti_am335x_tscadc: Support the correctly spelled DT propertyMiquel Raynal
There was in the past a typo in the coordinate readouts property. The bindings have been updated, the touchscreen driver as well and now supports both. However, the MFD driver that is in charge of verifying the validity of the property only checks the bogus one. Add support for the correctly spelled DT property. Fixes: c9aeb249bf72 ("Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding") Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-38-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Add ADC1/magnetic reader supportMiquel Raynal
Introduce a new compatible that has another set of driver data, targeting am437x SoCs with a magnetic reader instead of the touchscreen and a more featureful set of registers. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-37-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Introduce a helper to deal with the type of hardwareMiquel Raynal
One way of knowing which hardware we are dealing with is to check the compatible string. When this must be done at several places, it's best and certainly more clear to use a helper for that. Introduce ti_adc_with_touchscreen() to indicate if there is a touchscreen controller available (meaning it's an am33xx-like ADC). This helper does not indicate if it is actually used (that is the purpose of the use_tsc boolean). Introducing this helper helps making a difference in the code between what is generic to both types of ADCs and what is specific to the am33xx hardware before introducing support for the am437x hardware. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-36-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Add a boolean to clarify the presence of a touchscreenMiquel Raynal
Just checking the number of wires will soon not be enough, add a boolean to indicate the actual use or not of the touchscreen. Certain checks only make sense when there is a touchscreen wired. Make these checks explicitly depend on the presence of the touchscreen. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-35-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Fix an error messageMiquel Raynal
The error message if we cannot retrieve the clock tells us that the touchscreen controller clock was unavailable. This is wrong, this is the "main" clock for the hardware block, it is not specific to the touchscreen and won't change when we will introduce ADC1/magnetic reader support so let's correct this comment. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-34-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Rename a variableMiquel Raynal
We need to retrieve the number of wires used by the "secondary" device (the touchscreen or the magnetic reader). Let's rename tsc_wires to become tscmag_wires to clarify the fact that this variable can be used in both situations. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-33-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Add TSC prefix in certain macrosMiquel Raynal
While the register list (and names) between ADC0 and ADC1 are pretty close, the bits inside changed a little bit. To avoid any future confusion, let's add the TSC prefix when some bits are in a register that is common to both revisions of the ADC, but are specific to the am33xx hardware. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-32-miquel.raynal@bootlin.com
2021-10-21mfd: ti_am335x_tscadc: Rename the subsystem enable macroMiquel Raynal
This bit is common to all devices (ADC, Touchscreen, Magnetic reader) so make it clear that it can be used from any location by operating a mechanical rename: s/CNTRLREG_TSCSSENB/CNTRLREG_SSENB/ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-31-miquel.raynal@bootlin.com
2021-10-20mfd: ti_am335x_tscadc: Gather the ctrl register logic in one placeMiquel Raynal
Instead of deriving in the probe and in the resume path the value of the ctrl register, let's do it only once in the probe, save the value of this register (all but the subsystem enable bit) in the driver's structure and use it from the resume callback. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-23-miquel.raynal@bootlin.com
2021-10-20mfd: ti_am335x_tscadc: Reorder the initialization stepsMiquel Raynal
TI AM335X TRM [1] states that most of the configuration should be set in the control register in the first place, before actually enabling the hardware with the subsystem enable bit. So far only half of the configuration was made in the first step (before enabling the "subsystem"), which does not make really sense. Also, the probe and the resume patch were acting differently. Let's harmonize all this by following these steps: 1/ Configure the CLKDIV register 2/ Configure the CTRL register 3/ Configure the idle configuration 4/ Really enable the device by rewriting the CTRL register with the subsystem enable bit set. [1] https://www.ti.com/lit/pdf/spruh73 Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-22-miquel.raynal@bootlin.com
2021-10-20mfd: ti_am335x_tscadc: Always provide an idle configurationMiquel Raynal
The idle register is valid no matter if the touchscreen is used or not, let's always configure it. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-21-miquel.raynal@bootlin.com
2021-10-20mfd: ti_am335x_tscadc: Drop useless variables from the driver structureMiquel Raynal
Keeping the count of tsc_cells and adc_cells is completely redundant, we can derive this information from other variables. Plus, these variables are not used anywhere else now. Let's get rid of them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-20-miquel.raynal@bootlin.com
2021-10-20mfd: ti_am335x_tscadc: Mimic the probe from resume()Miquel Raynal
Use the number of touchscreen wires (tsc_wires) instead of the flag indicating a touchscreen cell (tsc_cell) to mimic the logic from the probe. Besides keeping a certain harmony in the driver, the main benefit is that we are going to simplify the number of entries in the main MFD structure and tsc_cell can now be removed more easily. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-19-miquel.raynal@bootlin.com