mfd: Add support for tps65910 device sleep
[firefly-linux-kernel-4.4.55.git] / include / linux / mfd / tps65910.h
index 1c6c2860d1a60a6350ff46e7d45321ed8be95a80..56903ad04283a8876031e240f25e0da721ad1cae 100644 (file)
 #define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3           0x4
 #define TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP         0x8
 
+/*
+ * Sleep keepon data: Maintains the state in sleep mode
+ * @therm_keepon: Keep on the thermal monitoring in sleep state.
+ * @clkout32k_keepon: Keep on the 32KHz clock output in sleep state.
+ * @i2chs_keepon: Keep on high speed internal clock in sleep state.
+ */
+struct tps65910_sleep_keepon_data {
+       unsigned therm_keepon:1;
+       unsigned clkout32k_keepon:1;
+       unsigned i2chs_keepon:1;
+};
+
 /**
  * struct tps65910_board
  * Board platform data may be used to initialize regulators.
@@ -794,6 +806,8 @@ struct tps65910_board {
        int irq_base;
        int vmbch_threshold;
        int vmbch2_threshold;
+       bool en_dev_slp;
+       struct tps65910_sleep_keepon_data *slp_keepon;
        bool en_gpio_sleep[TPS6591X_MAX_NUM_GPIO];
        unsigned long regulator_ext_sleep_control[TPS65910_NUM_REGS];
        struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS];