summaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
2024-07-04mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_byJavier Carrasco
Use the __counted_by compiler attribute for the "struct clk *ch_clk[]" flexible array member to improve the results of array bound sanitizers. The comments for the variables are no longer needed as it is now clear what is what. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240620-omap-usb-tll-counted_by-v1-1-77797834bb9a@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode()Yang Li
Abaci Robot reports: drivers/mfd/tps6594-core.c:516:2-3: Unneeded semicolon Let's remove it. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9346 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20240618011854.109426-1-yang.lee@linux.alibaba.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: lm3533: Move to new GPIO descriptor-based APIsAndy Shevchenko
Legacy GPIO APIs are subject to remove. Convert the driver to new APIs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240605191458.2536819-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: tps65912: Use devm helper functions to simplify probeAndrew Davis
This simplifies probe and also allows us to remove the remove callbacks from the core and interface drivers. Do that here. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240613175430.57698-1-afd@ti.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: madera: Simplify with spi_get_device_match_data()Krzysztof Kozlowski
Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240606142457.130553-2-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: arizona: Simplify with spi_get_device_match_data()Krzysztof Kozlowski
Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240606142457.130553-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning (again)Krzysztof Kozlowski
'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: wm8994-core.c:625:17: error: cast to smaller integer type 'enum wm8994_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240606143648.152668-3-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again)Krzysztof Kozlowski
'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: mxs-lradc.c:140:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240606143648.152668-2-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again)Krzysztof Kozlowski
'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: max14577.c:400:23: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240606143648.152668-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: Add missing MODULE_DESCRIPTION() macrosJeff Johnson
On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/arizona.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/pcf50633-gpio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/timberdale.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/ssbi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/rt4831.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/intel_soc_pmic_bxtwc.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes mfd-core.c and vexpress-sysreg.c which, although they did not produce a warning with the x86 allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Acked-by: Andy Shevchenko <andy@kernel.org> # for Intel Broxton PMIC Link: https://lore.kernel.org/r/20240609-md-drivers-mfd-v1-1-47cdd0b394e9@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: qcom-pm8008: Add missing MODULE_DESCRIPTION() macroJeff Johnson
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/qcom-pm8008.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240603-md-drivers-mfd-qcom-v1-1-88e48013eccc@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: intel-lpss: Rename SPI intel_lpss_platform_info structsIlpo Järvinen
The driver has intel_lpss_platform_info structs for I2C, SPI, and UART. The I2C and UART structs are named with "i2c" and "uart" in the variable name, whereas SPI ones do not mention "spi". Rename the SPI related info structs to include "spi" in their names for consistency and to make it obvious in the device ID list what kind of device the line relates to. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240531142505.1888-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: core: Make use of device_set_node()Andy Shevchenko
Use device_set_node() instead of assigning pdev->dev.of_node directly because it also sets the firmware node. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20240530115147.1112498-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: mt6397-core: Add support for AUXADCs on MT6357/58/59 PMICsAngeloGioacchino Del Regno
Add the relevant AUXADC driver entries to the MFD cells of the MT6357, MT6358, MT6359 PMICs to support their Auxiliary ADCs. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240530093410.112716-4-angelogioacchino.delregno@collabora.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: rsmu: Split core code into separate moduleArnd Bergmann
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: a1867f85e06e ("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>
2024-07-04mfd: cros_ec: Register hardware monitoring subdeviceThomas Weißschuh
Add ChromeOS EC-based hardware monitoring as EC subdevice. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-3-5cdf0c5db50a@weissschuh.net Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: cros_ec: Register charge control subdeviceThomas Weißschuh
Add ChromeOS EC-based charge control as EC subdevice. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240528-cros_ec-charge-control-v2-3-81fb27e1cff4@weissschuh.net Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: intel_soc_pmic_crc: Use PWM_LOOKUP_WITH_MODULE() for the PWM lookupHans de Goede
The primary use of the CRC PMIC's PWM is for LCD panel backlight control by the i915 driver. Due to its complexity the probe() function of the i915 driver does not support -EPROBE_DEFER handling. So far the pwm-crc driver must be built into the kernel to ensure that the pwm_get() done by the i915 driver succeeds at once (rather then returning -EPROBE_DEFER). But the PWM core can load the module from pwm_get() if a module-name is provided in the pwm_lookup associated with the consumer device. Switch to using PWM_LOOKUP_WITH_MODULE() for the lookup added for the Intel integrated GPU, so that the PWM core can load the module from pwm_get() as needed allowing the pwm-crc driver to be safely built as module. This has been successfully tested on an Asus T100TAM with pwm-crc build as a module. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11081 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240527114950.326659-1-hdegoede@redhat.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: Drop explicit initialization of struct i2c_device_id::driver_data to 0Uwe Kleine-König
These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. While add it, also remove commas after the sentinel entries. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240510211011.2273978-2-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: menelaus: Remove unused linux/gpio.hAndy Shevchenko
linux/gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240508114033.952578-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04mfd: omap-usb-host: Remove unused linux/gpio.hAndy Shevchenko
linux/gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240508114321.964374-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-07-04Merge branch 'ib-mfd-soc-samsung-6.11' into ibs-for-mfd-mergedLee Jones
2024-07-04Merge branch 'ib-mfd-regulator-watchdog-6.11' into ibs-for-mfd-mergedLee Jones
2024-07-04Merge branch 'ib-mfd-regulator-pm8008-6.11' into ibs-for-mfd-mergedLee Jones
2024-07-04Merge branch 'ib-mfd-leds-platform-6.11' into ibs-for-mfd-mergedLee Jones
2024-07-04Merge branch 'ib-mfd-input-regulator-6.11' into ibs-for-mfd-mergedLee Jones
2024-07-04Merge branch 'ib-mfd-firmware-input-sound-soc-6.11' into ibs-for-mfd-mergedLee Jones
2024-07-03driver core: have match() callback in struct bus_type take a const *Greg Kroah-Hartman
In the match() callback, the struct device_driver * should not be changed, so change the function callback to be a const *. This is one step of many towards making the driver core safe to have struct device_driver in read-only memory. Because the match() callback is in all busses, all busses are modified to handle this properly. This does entail switching some container_of() calls to container_of_const() to properly handle the constant *. For some busses, like PCI and USB and HV, the const * is cast away in the match callback as those busses do want to modify those structures at this point in time (they have a local lock in the driver structure.) That will have to be changed in the future if they wish to have their struct device * in read-only-memory. Cc: Rafael J. Wysocki <rafael@kernel.org> Reviewed-by: Alex Elder <elder@kernel.org> Acked-by: Sumit Garg <sumit.garg@linaro.org> Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-28mfd: Add driver for Marvell 88PM886 PMICKarel Balej
Marvell 88PM886 is a PMIC which provides various functions such as onkey, battery, charger and regulators. It is found for instance in the samsung,coreprimevelte smartphone with which this was tested. Implement basic support to allow for the use of regulators and onkey. Signed-off-by: Karel Balej <balejk@matfyz.cz> Link: https://lore.kernel.org/r/20240531175109.15599-3-balejk@matfyz.cz Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-28mfd: cs40l50: Add support for CS40L50 core driverJames Ogletree
Introduce support for Cirrus Logic Device CS40L50: a haptic driver with waveform memory, integrated DSP, and closed-loop algorithms. The MFD component registers and initializes the device. Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com> Reviewed-by: Jeff LaBundy <jeff@labundy.com> Link: https://lore.kernel.org/r/20240620161745.2312359-4-jogletre@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-27mfd: support ROHM BD96801 PMIC coreMatti Vaittinen
The ROHM BD96801 PMIC is highly customizable automotive grade PMIC which integrates regulator and watchdog funtionalities. Provide INTB IRQ and register accesses for regulator/watchdog drivers. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/c5260e2dd222e3c64cdf410802bba195637ccb93.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-26mfd: syscon: Add of_syscon_register_regmap() APIPeter Griffin
The of_syscon_register_regmap() API allows an externally created regmap to be registered with syscon. This regmap can then be returned to client drivers using the syscon_regmap_lookup_by_phandle() APIs. The API is used by platforms where mmio access to the syscon registers is not possible, and a underlying soc driver like exynos-pmu provides a SoC specific regmap that can issue a SMC or hypervisor call to write the register. This approach keeps the SoC complexities out of syscon, but allows common drivers such as syscon-poweroff, syscon-reboot and friends that are used by many SoCs already to be re-used. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Tested-by: Will McVicker <willmcvicker@google.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240621115544.1655458-2-peter.griffin@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-21mfd: cros_ec: Register LED subdeviceThomas Weißschuh
Add ChromeOS EC-based LED control as EC subdevice. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-5-500b50f41e0f@weissschuh.net Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-14mfd: cros_ec: Register keyboard backlight subdeviceThomas Weißschuh
Load cros_kbd_led_backlight when the EC reports EC_FEATURE_PWM_KEYB. This makes cros_kbd_led_backlight work on machines without specific ACPI or OF support for the keyboard backlight. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-4-ee577415a521@weissschuh.net Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-14mfd: axp20x: AXP717: Fix missing IRQ status registers rangeAndre Przywara
While we list the "IRQ status *and acknowledge*" registers as volatile in the MFD description, they are missing from the writable range array, so acknowledging any interrupts was met with an -EIO error. This error propagates up, leading to the whole AXP717 driver failing to probe, which is fatal to most systems using this PMIC, since most peripherals refer one of the PMIC voltage rails. This wasn't noticed on the initial submission, since the interrupt was completely missing at this point, but the DTs now merged describe the interrupt, creating the problem. Add the five registers that hold those bits to the writable array. This fixes the boot on the Anbernic systems using the AXP717 PMIC. Fixes: b5bfc8ab2484 ("mfd: axp20x: Add support for AXP717 PMIC") Reported-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: John Watts <contact@jookia.org> Link: https://lore.kernel.org/r/20240613233104.17529-1-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Rework to match new DT bindingJohan Hovold
Rework the pm8008 driver to match the new devicetree binding which no longer describes internal details like interrupts and register offsets (including which of the two consecutive I2C addresses the registers belong to). Instead make the interrupt controller implementation internal and pass interrupts to the subdrivers using MFD cell resources. Note that subdrivers may either get their resources, like register block offsets, from the parent MFD or this can be included in the subdrivers directly. In the current implementation, the temperature alarm driver is generic enough to just get its base address and alarm interrupt from the parent driver, which already uses this information to implement the interrupt controller. The regulator driver, however, needs additional information like parent supplies and regulator characteristics so in that case it is easier to just augment its table with the regulator register base addresses. Similarly, the current GPIO driver already holds the number of pins and that lookup table can therefore also be extended with register offsets. Note that subdrivers can now access the two regmaps by name, even if the primary regmap is registered last so that it is returned by default when no name is provided in lookups. Finally, note that the temperature alarm and GPIO subdrivers need some minor rework before they can be used with non-SPMI devices like the PM8008. The temperature alarm MFD cell name specifically uses a "qpnp" rather than "spmi" prefix to prevent binding until the driver has been updated. Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-11-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Drop unused driver dataJohan Hovold
The i2c client driver data pointer has never been used so drop the unnecessary assignment. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-8-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Rename irq chipJohan Hovold
Drop the redundant "irq" suffix from the irq chip name. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-7-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Use lower case hex notationJohan Hovold
Use lower case hex notation for consistency. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-6-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Mark regmap structures as constJohan Hovold
The regmap irq chip structures can be const so mark them as such. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-5-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Deassert reset on probeJohan Hovold
Request and deassert any (optional) reset gpio during probe in case it has been left asserted by the boot firmware. Note the reset line is not asserted to avoid reverting to the default I2C address in case the firmware has configured an alternate address. Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-4-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-13mfd: pm8008: Fix regmap irq chip initialisationJohan Hovold
The regmap irq array is potentially shared between multiple PMICs and should only contain static data. Use a custom macro to initialise also the type fields and drop the unnecessary updates on each probe. Fixes: 6b149f3310a4 ("mfd: pm8008: Add driver for QCOM PM8008 PMIC") Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20240608155526.12996-3-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: rsmu: support I2C SMBus accessMin Li
8a3400x device implements its own reg_read and reg_write, which only supports I2C bus access. This patch adds support for SMBus access. Signed-off-by: Min Li <min.li.xe@renesas.com> Link: https://lore.kernel.org/r/LV3P220MB12021342F302AADEB6C1601CA0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: ssbi: Remove unused field 'slave' from 'struct ssbi'Christophe JAILLET
In 'struct ssbi, the 'slave' field is unused. Remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/8a76de25cefb533d94dfe35062bbd9a8e72f4bb9.1713971415.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: kempld: Remove custom DMI matching codeAndy Shevchenko
The ->init() open codes the functionality of DMI matching code. Moreover, all DMI quirks are using the same callback and driver_data. With this in mind, refactor the DMI matching code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240423210706.3709568-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: cs42l43: Update patching revision checkCharles Keepax
The firmware can only be patched once. The current code checks if the firmware supports the features required by the driver and then patches if it does not. This could lead to the device being patched twice if the device was patched before the driver took control, but with a firmware that doesn't support the features the driver requires. This would fail but potentially in unpredictable ways. The check should actually check the device is at the ROM version, and patch the device if it is. Then a separate later check should error out if the devices firmware is still too old to be supported. This will at least fail in a clean way with a nice error message. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20240423102339.2363400-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: timberdale: Remove redundant assignment to variable errColin Ian King
The variable err is being assigned -ENODEV and then err is being re-assigned the same error value via the error exit label err_mfd. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/mfd/timberdale.c:768:3: warning: Value stored to 'err' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240415102632.484411-1-colin.i.king@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: axp20x: Convert to use Maple Tree register cachewangkaiyuan
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: wangkaiyuan <wangkaiyuan@inspur.com> Link: https://lore.kernel.org/r/20240429024547.27724-1-wangkaiyuan@inspur.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: intel-m10-bmc: Change staging size to a variableIlpo Järvinen
The secure update driver does a sanity-check of the image size in comparison to the size of the staging area in FLASH. Instead of hard-wiring M10BMC_STAGING_SIZE, move the staging size to the m10bmc_csr_map structure to make the size assignment more flexible. Co-developed-by: Russ Weight <russell.h.weight@intel.com> Signed-off-by: Russ Weight <russell.h.weight@intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Peter Colberg <peter.colberg@intel.com> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20240402184925.1065932-1-peter.colberg@intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-10mfd: Tidy Kconfig dependency's parenthesesJean Delvare
Drop unneeded parentheses for clarity and consistency. Signed-off-by: Jean Delvare <jdelvare@suse.de> Link: https://lore.kernel.org/r/20240407112445.503bcbc6@endymion.delvare Signed-off-by: Lee Jones <lee@kernel.org>