Loading Documentation/devicetree/bindings/regulator/fan53555.txt +5 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ Optional properties: voltage. The other one is used for the runtime voltage setting Possible values are either <0> or <1> - vin-supply: regulator supplying the vin pin - fcs,disable-suspend: Boolean flag which specifies if suspend voltage configuration should be avoided. If this property is present, then the voltage selector register defined by fcs,suspend-voltage-selector should not be modified at runtime. Example: Loading @@ -29,4 +33,5 @@ Example: regulator-min-microvolt = <600000>; regulator-max-microvolt = <1230000>; fcs,suspend-voltage-selector = <1>; fcs,disable-suspend; }; drivers/regulator/fan53555.c +6 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ struct fan53555_device_info { unsigned int slew_rate; /* Sleep voltage cache */ unsigned int sleep_vol_cache; /* Disable suspend */ bool disable_suspend; }; static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) Loading @@ -106,6 +108,8 @@ static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) struct fan53555_device_info *di = rdev_get_drvdata(rdev); int ret; if (di->disable_suspend) return 0; if (di->sleep_vol_cache == uV) return 0; ret = regulator_map_voltage_linear(rdev, uV, uV); Loading Loading @@ -368,6 +372,8 @@ static int fan53555_parse_dt(struct fan53555_device_info *di, if (!ret) pdata->sleep_vsel_id = tmp; di->disable_suspend = of_property_read_bool(np, "fcs,disable-suspend"); return ret; } Loading Loading
Documentation/devicetree/bindings/regulator/fan53555.txt +5 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ Optional properties: voltage. The other one is used for the runtime voltage setting Possible values are either <0> or <1> - vin-supply: regulator supplying the vin pin - fcs,disable-suspend: Boolean flag which specifies if suspend voltage configuration should be avoided. If this property is present, then the voltage selector register defined by fcs,suspend-voltage-selector should not be modified at runtime. Example: Loading @@ -29,4 +33,5 @@ Example: regulator-min-microvolt = <600000>; regulator-max-microvolt = <1230000>; fcs,suspend-voltage-selector = <1>; fcs,disable-suspend; };
drivers/regulator/fan53555.c +6 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ struct fan53555_device_info { unsigned int slew_rate; /* Sleep voltage cache */ unsigned int sleep_vol_cache; /* Disable suspend */ bool disable_suspend; }; static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) Loading @@ -106,6 +108,8 @@ static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) struct fan53555_device_info *di = rdev_get_drvdata(rdev); int ret; if (di->disable_suspend) return 0; if (di->sleep_vol_cache == uV) return 0; ret = regulator_map_voltage_linear(rdev, uV, uV); Loading Loading @@ -368,6 +372,8 @@ static int fan53555_parse_dt(struct fan53555_device_info *di, if (!ret) pdata->sleep_vsel_id = tmp; di->disable_suspend = of_property_read_bool(np, "fcs,disable-suspend"); return ret; } Loading