summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Pflüger <otto.pflueger@abscue.de>2026-05-28 19:18:24 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-06-02 02:37:00 +0300
commitb6c7feeb604262f31a4279bd66aa300ad0903255 (patch)
treefc869717f76102b07beb45844ffd7b8fd16487bc
parente3f669bed32287ae72c05a4ddab4a6687b0e62ca (diff)
downloadlinux-b6c7feeb604262f31a4279bd66aa300ad0903255.tar.xz
power: reset: sc27xx: Add platform_device_id table
Make the poweroff driver for SC27xx-series PMICs probe automatically. Since the device representing the poweroff functionality of the SC27xx PMIC is not supposed to have a dedicated device tree node without any corresponding DT resources [1], an of_device_id table cannot be used here. Instead, use a platform_device_id table to match the poweroff sub-device instantiated by the parent MFD driver. [1]: https://lore.kernel.org/all/20251002025344.GA2958334-robh@kernel.org/ Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> Link: https://patch.msgid.link/20260528-sc27xx-mfd-cells-v3-2-25cd685d2743@abscue.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r--drivers/power/reset/sc27xx-poweroff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
index 393bd1c33b73..6376706bf561 100644
--- a/drivers/power/reset/sc27xx-poweroff.c
+++ b/drivers/power/reset/sc27xx-poweroff.c
@@ -6,6 +6,7 @@
#include <linux/cpu.h>
#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
@@ -70,11 +71,18 @@ static int sc27xx_poweroff_probe(struct platform_device *pdev)
return 0;
}
+static const struct platform_device_id sc27xx_poweroff_id_table[] = {
+ { "sc2731-poweroff" },
+ { }
+};
+MODULE_DEVICE_TABLE(platform, sc27xx_poweroff_id_table);
+
static struct platform_driver sc27xx_poweroff_driver = {
.probe = sc27xx_poweroff_probe,
.driver = {
.name = "sc27xx-poweroff",
},
+ .id_table = sc27xx_poweroff_id_table,
};
module_platform_driver(sc27xx_poweroff_driver);