Loading drivers/power/battery_current_limit.c +19 −0 Original line number Diff line number Diff line Loading @@ -853,6 +853,7 @@ show_bcl(ibat_state, bcl_ibat_state, "%d\n") show_bcl(hotplug_mask, bcl_hotplug_mask, "%d\n") show_bcl(hotplug_soc_mask, bcl_soc_hotplug_mask, "%d\n") show_bcl(hotplug_status, bcl_hotplug_request, "%d\n") show_bcl(soc_low_thresh, soc_low_threshold, "%d\n") static ssize_t mode_show(struct device *dev, struct device_attribute *attr, char *buf) Loading Loading @@ -1207,6 +1208,23 @@ static ssize_t hotplug_soc_mask_store(struct device *dev, return count; } static ssize_t soc_low_thresh_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int val = 0; int ret = 0; ret = convert_to_int(buf, &val); if (ret) return ret; soc_low_threshold = val; pr_info("bcl soc low threshold updated to %d\n", soc_low_threshold); return count; } /* * BCL device attributes */ Loading Loading @@ -1249,6 +1267,7 @@ static struct device_attribute btm_dev_attr[] = { __ATTR(hotplug_mask, 0644, hotplug_mask_show, hotplug_mask_store), __ATTR(hotplug_soc_mask, 0644, hotplug_soc_mask_show, hotplug_soc_mask_store), __ATTR(soc_low_thresh, 0644, soc_low_thresh_show, soc_low_thresh_store), }; static int create_bcl_sysfs(struct bcl_context *bcl) Loading Loading
drivers/power/battery_current_limit.c +19 −0 Original line number Diff line number Diff line Loading @@ -853,6 +853,7 @@ show_bcl(ibat_state, bcl_ibat_state, "%d\n") show_bcl(hotplug_mask, bcl_hotplug_mask, "%d\n") show_bcl(hotplug_soc_mask, bcl_soc_hotplug_mask, "%d\n") show_bcl(hotplug_status, bcl_hotplug_request, "%d\n") show_bcl(soc_low_thresh, soc_low_threshold, "%d\n") static ssize_t mode_show(struct device *dev, struct device_attribute *attr, char *buf) Loading Loading @@ -1207,6 +1208,23 @@ static ssize_t hotplug_soc_mask_store(struct device *dev, return count; } static ssize_t soc_low_thresh_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int val = 0; int ret = 0; ret = convert_to_int(buf, &val); if (ret) return ret; soc_low_threshold = val; pr_info("bcl soc low threshold updated to %d\n", soc_low_threshold); return count; } /* * BCL device attributes */ Loading Loading @@ -1249,6 +1267,7 @@ static struct device_attribute btm_dev_attr[] = { __ATTR(hotplug_mask, 0644, hotplug_mask_show, hotplug_mask_store), __ATTR(hotplug_soc_mask, 0644, hotplug_soc_mask_show, hotplug_soc_mask_store), __ATTR(soc_low_thresh, 0644, soc_low_thresh_show, soc_low_thresh_store), }; static int create_bcl_sysfs(struct bcl_context *bcl) Loading