]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mfd: sec: Add support for S2MU005 PMIC
authorKaustabh Chakraborty <kauschluss@disroot.org>
Fri, 15 May 2026 21:38:36 +0000 (03:08 +0530)
committerLee Jones <lee@kernel.org>
Wed, 17 Jun 2026 10:26:30 +0000 (11:26 +0100)
commite491ebea157ff3ba18483ea0f82a9536dc393dec
tree0721a15e4f42b976eb4a4a8218086ba03bf77e08
parent2cd517ed4eaf728631eafce645ebf63d0749c679
mfd: sec: Add support for S2MU005 PMIC

Samsung's S2MU005 PMIC includes subdevices for a charger, an MUIC (Micro
USB Interface Controller), and flash and RGB LED controllers.

S2MU005's interrupt registers divided into three domains, each for the
charger, flash LEDs, and the MUIC, packed into a single regmap IRQ chip
construct.

In devices other than S2MPG1X, the revision can be retrieved from the
first register of the PMIC regmap. In S2MU005 however, the location is
in offset 0x73. Introduce a switch-case block to allow selecting the
REG_ID register. S2MU005 also has a field mask for the revision. Apply
it using FIELD_GET() and get the extracted value.

Add initial support for S2MU005 in the PMIC driver, along with its three
interrupt chips, and support for allowing to fetch revision based on the
device variant.

Co-developed-by: Łukasz Lebiedziński <kernel@lvkasz.us>
Signed-off-by: Łukasz Lebiedziński <kernel@lvkasz.us>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Link: https://patch.msgid.link/20260516-s2mu005-pmic-v7-4-73f9702fb461@disroot.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/sec-common.c
drivers/mfd/sec-i2c.c
drivers/mfd/sec-irq.c
include/linux/mfd/samsung/core.h
include/linux/mfd/samsung/irq.h
include/linux/mfd/samsung/s2mu005.h [new file with mode: 0644]