summaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
2022-12-07mfd: wcd934x: Convert irq chip to config regsAidan MacDonald
Type registers are deprecated and will eventually be removed from regmap-irq. The same functionality can be replicated with config registers. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-19-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: tps65090: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-18-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: sun4i-gpadc: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-17-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: stpmic1: Fix swapped mask/unmask in irq chipAidan MacDonald
The usual behavior of mask registers is writing a '1' bit to disable (mask) an interrupt; similarly, writing a '1' bit to an unmask register enables (unmasks) an interrupt. Due to a longstanding issue in regmap-irq, mask and unmask registers were inverted when both kinds of registers were present on the same chip, ie. regmap-irq actually wrote '1's to the mask register to enable an IRQ and '1's to the unmask register to disable an IRQ. This was fixed by commit e8ffb12e7f06 ("regmap-irq: Fix inverted handling of unmask registers") but the fix is opt-in via mask_unmask_non_inverted = true because it requires manual changes for each affected driver. The new behavior will become the default once all drivers have been updated. The STPMIC1 has a normal mask register with separate set and clear registers. The driver intends to use the set & clear registers with regmap-irq and has compensated for regmap-irq's inverted behavior, and should currently be working properly. Thus, swap mask_base and unmask_base, and opt in to the new non-inverted behavior. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-16-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: sprd-sc27xx-spi: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-15-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: rt5120: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-14-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: rt5033: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-13-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: rohm-bd718x7: Drop useless mask_invert flag on irqchipAidan MacDonald
Setting mask_invert to false is pointless because that's the default. The flag is also deprecated, so drop it. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-12-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: rohm-bd71828: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-11-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: rn5t618: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-10-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: max77843: Drop useless mask_invert flag on irqchipAidan MacDonald
Setting mask_invert to false is pointless because that's the default. The flag is also deprecated, so drop it. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-9-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: max77693: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-8-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: max77650: Remove useless type_invert flagAidan MacDonald
The type_invert flag does nothing when type_in_mask is set, and it's part of deprecated functionality in regmap-irq. Remove it. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-7-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: max14577: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-6-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: gateworks-gsc: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-5-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: axp20x: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-4-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: atc260x: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-3-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: 88pm800: Replace irqchip mask_invert with unmask_baseAidan MacDonald
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221112151835.39059-2-aidanmacdonald.0x0@gmail.com
2022-12-07mfd: timberdale: Remove linux/msi.h includeThomas Gleixner
Nothing in this file needs anything from linux/msi.h Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221113202428.312137892@linutronix.de
2022-12-07mfd: tc6393xb: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: tc3589x: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: stmpe: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: stmfx: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: sprd-sc27xx: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: motorola-cpcap: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: max77686: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: max14577: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: arizona: Remove #ifdef guards for PM related functionsPaul Cercueil
Only export the arizona_pm_ops if CONFIG_PM is set, but leave the suspend/resume functions (and related code) outside #ifdef guards. If CONFIG_PM is not set, the arizona_pm_ops will be defined as "static __maybe_unused", and the structure plus all the callbacks will be automatically dropped by the compiler. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: t7l66xb: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: max77620: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: wm8994: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new RUNTIME_PM_OPS() and pm_ptr() macros to handle the .runtime_suspend/.runtime_resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Note that this driver should probably use the new DEFINE_RUNTIME_DEV_PM_OPS() macro instead, which will provide .suspend/.resume callbacks, pointing to pm_runtime_force_suspend() and pm_runtime_force_resume() respectively; unless those callbacks really aren't needed. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: tps6586x: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .irq_set_wake() callback. This macro allows the mt6397_irq_set_wake() function to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: tc6387xb: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: sm501: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: sec: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: mcp-sa11x0: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .suspend/.resume callbacks. This macro allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: 88pm860x: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: ucb1x00: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: stpmic1: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: rc5t583-irq: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .irq_set_wake() callback. This macro allows the mt6397_irq_set_wake() function to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: pcf50633: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: mt6397-irq: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new pm_sleep_ptr() macro to handle the .irq_set_wake() callback. This macro allows the mt6397_irq_set_wake() function to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: max8925-i2c: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: adp5520: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: aat2870: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: 88pm80x: Remove #ifdef guards for PM related functionsPaul Cercueil
Use the new EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07mfd: axp20x: Do not sleep in the power off handlerSamuel Holland
Since commit 856c288b0039 ("ARM: Use do_kernel_power_off()"), the function axp20x_power_off() now runs inside a RCU read-side critical section, so it is not allowed to call msleep(). Use mdelay() instead. Fixes: 856c288b0039 ("ARM: Use do_kernel_power_off()") Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221105212909.6526-1-samuel@sholland.org
2022-12-07mfd: mc13xxx-spi: Fix typo ("transfert")Jonathan Neuschäfer
That spelling is only correct in French :-) Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221101165045.1017822-1-j.neuschaefer@gmx.net
2022-12-07mfd: intel_soc_pmic: Allow COMPILE_TEST or I2C_DESIGNWARE_PLATFORMRandy Dunlap
Linus expressed a desire to have intel_soc_pmic_crc.o (INTEL_SOC_PMIC, for Crystal Cove) be built on an "allmodconfig" build, when I2C_DESIGNWARE_PLATFORM=m, to enhance build test coverage. The PMIC driver won't work in this case since it requires I2C_DESIGNWARE_PLATFORM=y to operate properly, but adding "|| COMPILE_TEST" does improve the build test coverage. Link: https://lore.kernel.org/all/CAHk-=wg=hh8xkPjiySnjAyR66AG64eyZ1Y9gHw+MCs8uuSZReA@mail.gmail.com/ Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221101055433.16891-1-rdunlap@infradead.org
2022-12-07mfd: rk808: Permit having multiple PMIC instancesNeil Armstrong
This set each cells id to PLATFORM_DEVID_NONE to allow multiple instances of each cell in case multiple PMICs handled by the rk808 driver are probed. This fixes probing a RK818 and a RK817 on the Odroid Go Ultra devices. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221025-rk808-multi-v2-0-d292d51ada81@linaro.org