Thread (29 messages) 29 messages, 5 authors, 2018-08-06

[PATCH v8 5/6] regulator: pfuze100-regulator: provide pm_power_off_prepare handler

From: Robin Gong <hidden>
Date: 2018-08-06 02:51:46
Also in: linux-clk, linux-devicetree, lkml

quoted
quoted
+static struct pfuze_chip *syspm_pfuze_chip;
+
+static void pfuze_power_off_prepare(void)
+	dev_info(syspm_pfuze_chip->dev, "Configure standy mode for power
+off");
Add 'if (syspm_pfuze_chip ->chip_id == PFUZE100))' here is easy for
extend Support on pfuze200/3000.. in the feature.
There is already:
static int pfuze_power_off_prepare_init(struct pfuze_chip *pfuze_chip) {
        if (pfuze_chip->chip_id != PFUZE100) {
                dev_warn(pfuze_chip->dev, "Requested
pm_power_off_prepare handler for not supported chip\n");
                return -ENODEV;
        }


No need to add it in pfuze_power_off_prepare()
I saw you add chip check in pfuze_power_off_prepare_init(), but I'm saying
In the future case pfuze200/3000 may should still support this feature, but registers
are different between different chips, thus, move checking chip into pfuze_power_off_prepare()
could make the later patch for pfuze200/3000 more clear, less and easier.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help