regulator: add missing description for set_over_current_protection
[cascardo/linux.git] / include / linux / regulator / driver.h
index 16ac9e1..1392022 100644 (file)
@@ -93,6 +93,11 @@ struct regulator_linear_range {
  * @get_current_limit: Get the configured limit for a current-limited regulator.
  * @set_input_current_limit: Configure an input limit.
  *
+ * @set_over_current_protection: Support capability of automatically shutting
+ *                               down when detecting an over current event.
+ *
+ * @set_active_discharge: Set active discharge enable/disable of regulators.
+ *
  * @set_mode: Set the configured operating mode for the regulator.
  * @get_mode: Get the configured operating mode for the regulator.
  * @get_status: Return actual (not as-configured) status of regulator, as a
@@ -149,6 +154,7 @@ struct regulator_ops {
 
        int (*set_input_current_limit) (struct regulator_dev *, int lim_uA);
        int (*set_over_current_protection) (struct regulator_dev *);
+       int (*set_active_discharge) (struct regulator_dev *, bool enable);
 
        /* enable/disable regulator */
        int (*enable) (struct regulator_dev *);
@@ -252,6 +258,8 @@ enum regulator_type {
  *
  * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_
  * @vsel_mask: Mask for register bitfield used for selector
+ * @csel_reg: Register for TPS65218 LS3 current regulator
+ * @csel_mask: Mask for TPS65218 LS3 current regulator
  * @apply_reg: Register for initiate voltage change on the output when
  *                using regulator_set_voltage_sel_regmap
  * @apply_bit: Register bitfield used for initiate voltage change on the
@@ -266,6 +274,14 @@ enum regulator_type {
  * @bypass_mask: Mask for control when using regmap set_bypass
  * @bypass_val_on: Enabling value for control when using regmap set_bypass
  * @bypass_val_off: Disabling value for control when using regmap set_bypass
+ * @active_discharge_off: Enabling value for control when using regmap
+ *                       set_active_discharge
+ * @active_discharge_on: Disabling value for control when using regmap
+ *                      set_active_discharge
+ * @active_discharge_mask: Mask for control when using regmap
+ *                        set_active_discharge
+ * @active_discharge_reg: Register for control when using regmap
+ *                       set_active_discharge
  *
  * @enable_time: Time taken for initial enable of regulator (in uS).
  * @off_on_delay: guard time (in uS), before re-enabling a regulator
@@ -315,6 +331,10 @@ struct regulator_desc {
        unsigned int bypass_mask;
        unsigned int bypass_val_on;
        unsigned int bypass_val_off;
+       unsigned int active_discharge_on;
+       unsigned int active_discharge_off;
+       unsigned int active_discharge_mask;
+       unsigned int active_discharge_reg;
 
        unsigned int enable_time;
 
@@ -447,6 +467,8 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
 int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable);
 int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable);
 
+int regulator_set_active_discharge_regmap(struct regulator_dev *rdev,
+                                         bool enable);
 void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
 
 #endif