summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h
diff options
context:
space:
mode:
authorHal Feng <hal.feng@starfivetech.com>2023-09-05 20:21:05 +0800
committerLinus Walleij <linus.walleij@linaro.org>2023-09-12 10:09:40 +0200
commit64061b67335e958e6328bcb5bb2b5490d57f3f59 (patch)
treea2db2d2420b0b2b134a284fe3b961701237738d6 /drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h
parent8406d6b5916663b4edc604b3effbf4935b61c2da (diff)
downloadlinux-stable-64061b67335e958e6328bcb5bb2b5490d57f3f59.tar.gz
linux-stable-64061b67335e958e6328bcb5bb2b5490d57f3f59.tar.bz2
linux-stable-64061b67335e958e6328bcb5bb2b5490d57f3f59.zip
pinctrl: starfive: jh7110: Add system pm ops to save and restore context
Add system pm ops to save and restore pinctrl registers when suspending and resuming the driver, respectively. Signed-off-by: Hal Feng <hal.feng@starfivetech.com> Link: https://lore.kernel.org/r/20230905122105.117000-3-hal.feng@starfivetech.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h')
-rw-r--r--drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h
index 3f20b7ff96dd..a33d0d4e1382 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.h
@@ -21,6 +21,7 @@ struct jh7110_pinctrl {
/* register read/write mutex */
struct mutex mutex;
const struct jh7110_pinctrl_soc_info *info;
+ u32 *saved_regs;
};
struct jh7110_gpio_irq_reg {
@@ -50,6 +51,8 @@ struct jh7110_pinctrl_soc_info {
const struct jh7110_gpio_irq_reg *irq_reg;
+ unsigned int nsaved_regs;
+
/* generic pinmux */
int (*jh7110_set_one_pin_mux)(struct jh7110_pinctrl *sfp,
unsigned int pin,
@@ -66,5 +69,6 @@ void jh7110_set_gpiomux(struct jh7110_pinctrl *sfp, unsigned int pin,
unsigned int din, u32 dout, u32 doen);
int jh7110_pinctrl_probe(struct platform_device *pdev);
struct jh7110_pinctrl *jh7110_from_irq_desc(struct irq_desc *desc);
+extern const struct dev_pm_ops jh7110_pinctrl_pm_ops;
#endif /* __PINCTRL_STARFIVE_JH7110_H__ */