Commit Graph

4 Commits

Author SHA1 Message Date
Christophe JAILLET
950a3c38f7 mfd: 88pm886: Constify struct regmap_irq_chip and some other structures
'struct regmap_irq_chip' is not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

While at it, also constify some other structures.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
   5032	   3304	     64	   8400	   20d0	drivers/mfd/88pm886.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
   5800	   2536	     64	   8400	   20d0	drivers/mfd/88pm886.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/1681629840761e30494cb8920668710df60a81b8.1746996137.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:49:14 +01:00
Krzysztof Kozlowski
6d0b2398b2 mfd: 88pm886: Fix wakeup source leaks on device unbind
Device can be unbound, so driver must also release memory for the wakeup
source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-1-318e14bdba0a@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-23 08:49:06 +01:00
Karel Balej
156d87b679 mfd: 88pm886: Add the RTC cell
Add a MFD cell for the chip's Real-Time Clock (RTC).

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20241012193345.18594-1-balejk@matfyz.cz
Signed-off-by: Lee Jones <lee@kernel.org>
2024-11-12 14:45:03 +00:00
Karel Balej
860f8e3bea mfd: Add driver for Marvell 88PM886 PMIC
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-28 15:41:05 +01:00