aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/abx500_chargalg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/abx500_chargalg.c')
-rw-r--r--drivers/power/abx500_chargalg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c
index ab54b8dea670..0da4415cbc10 100644
--- a/drivers/power/abx500_chargalg.c
+++ b/drivers/power/abx500_chargalg.c
@@ -2047,6 +2047,7 @@ static int abx500_chargalg_probe(struct platform_device *pdev)
2047{ 2047{
2048 struct device_node *np = pdev->dev.of_node; 2048 struct device_node *np = pdev->dev.of_node;
2049 struct abx500_bm_data *plat = pdev->dev.platform_data; 2049 struct abx500_bm_data *plat = pdev->dev.platform_data;
2050 struct power_supply_config psy_cfg = {};
2050 struct abx500_chargalg *di; 2051 struct abx500_chargalg *di;
2051 int ret = 0; 2052 int ret = 0;
2052 2053
@@ -2080,11 +2081,12 @@ static int abx500_chargalg_probe(struct platform_device *pdev)
2080 di->chargalg_psy.properties = abx500_chargalg_props; 2081 di->chargalg_psy.properties = abx500_chargalg_props;
2081 di->chargalg_psy.num_properties = ARRAY_SIZE(abx500_chargalg_props); 2082 di->chargalg_psy.num_properties = ARRAY_SIZE(abx500_chargalg_props);
2082 di->chargalg_psy.get_property = abx500_chargalg_get_property; 2083 di->chargalg_psy.get_property = abx500_chargalg_get_property;
2083 di->chargalg_psy.supplied_to = supply_interface;
2084 di->chargalg_psy.num_supplicants = ARRAY_SIZE(supply_interface),
2085 di->chargalg_psy.external_power_changed = 2084 di->chargalg_psy.external_power_changed =
2086 abx500_chargalg_external_power_changed; 2085 abx500_chargalg_external_power_changed;
2087 2086
2087 psy_cfg.supplied_to = supply_interface;
2088 psy_cfg.num_supplicants = ARRAY_SIZE(supply_interface);
2089
2088 /* Initilialize safety timer */ 2090 /* Initilialize safety timer */
2089 hrtimer_init(&di->safety_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); 2091 hrtimer_init(&di->safety_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
2090 di->safety_timer.function = abx500_chargalg_safety_timer_expired; 2092 di->safety_timer.function = abx500_chargalg_safety_timer_expired;
@@ -2115,7 +2117,7 @@ static int abx500_chargalg_probe(struct platform_device *pdev)
2115 di->chg_info.prev_conn_chg = -1; 2117 di->chg_info.prev_conn_chg = -1;
2116 2118
2117 /* Register chargalg power supply class */ 2119 /* Register chargalg power supply class */
2118 ret = power_supply_register(di->dev, &di->chargalg_psy); 2120 ret = power_supply_register(di->dev, &di->chargalg_psy, &psy_cfg);
2119 if (ret) { 2121 if (ret) {
2120 dev_err(di->dev, "failed to register chargalg psy\n"); 2122 dev_err(di->dev, "failed to register chargalg psy\n");
2121 goto free_chargalg_wq; 2123 goto free_chargalg_wq;