From 73a85502bd2a4373d82f638b1b4c3e1f79e394e3 Mon Sep 17 00:00:00 2001 From: Kaustabh Chakraborty Date: Fri, 17 Oct 2025 20:58:17 +0530 Subject: power: pmic: s2mps11: add support for allowing multiple device variants There are multiple PMICs by Samsung which are similar in architecture (register layout, interface, etc.) and is possible to be driven by a single driver. Variant specific code and data should be managed properly in the driver. And an enum which describes all supported variants. Pass the enum as the device driver data. Introduce a switch-case block on the enum for any variant specific code. Signed-off-by: Kaustabh Chakraborty Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- include/power/s2mps11.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/power/s2mps11.h b/include/power/s2mps11.h index 22b38fff703..c08bea5a516 100644 --- a/include/power/s2mps11.h +++ b/include/power/s2mps11.h @@ -161,4 +161,9 @@ enum { OP_ON, }; +enum { + VARIANT_NONE, + VARIANT_S2MPS11, +}; + #endif -- cgit v1.3.1