Lines Matching refs:twl4030_madc_bat

188 	struct twl4030_madc_battery *twl4030_madc_bat;  in twl4030_madc_battery_probe()  local
193 twl4030_madc_bat = devm_kzalloc(&pdev->dev, sizeof(*twl4030_madc_bat), in twl4030_madc_battery_probe()
195 if (!twl4030_madc_bat) in twl4030_madc_battery_probe()
198 twl4030_madc_bat->channel_temp = iio_channel_get(&pdev->dev, "temp"); in twl4030_madc_battery_probe()
199 if (IS_ERR(twl4030_madc_bat->channel_temp)) { in twl4030_madc_battery_probe()
200 ret = PTR_ERR(twl4030_madc_bat->channel_temp); in twl4030_madc_battery_probe()
204 twl4030_madc_bat->channel_ichg = iio_channel_get(&pdev->dev, "ichg"); in twl4030_madc_battery_probe()
205 if (IS_ERR(twl4030_madc_bat->channel_ichg)) { in twl4030_madc_battery_probe()
206 ret = PTR_ERR(twl4030_madc_bat->channel_ichg); in twl4030_madc_battery_probe()
210 twl4030_madc_bat->channel_vbat = iio_channel_get(&pdev->dev, "vbat"); in twl4030_madc_battery_probe()
211 if (IS_ERR(twl4030_madc_bat->channel_vbat)) { in twl4030_madc_battery_probe()
212 ret = PTR_ERR(twl4030_madc_bat->channel_vbat); in twl4030_madc_battery_probe()
224 twl4030_madc_bat->pdata = pdata; in twl4030_madc_battery_probe()
225 platform_set_drvdata(pdev, twl4030_madc_bat); in twl4030_madc_battery_probe()
226 psy_cfg.drv_data = twl4030_madc_bat; in twl4030_madc_battery_probe()
227 twl4030_madc_bat->psy = power_supply_register(&pdev->dev, in twl4030_madc_battery_probe()
230 if (IS_ERR(twl4030_madc_bat->psy)) { in twl4030_madc_battery_probe()
231 ret = PTR_ERR(twl4030_madc_bat->psy); in twl4030_madc_battery_probe()
238 iio_channel_release(twl4030_madc_bat->channel_vbat); in twl4030_madc_battery_probe()
240 iio_channel_release(twl4030_madc_bat->channel_ichg); in twl4030_madc_battery_probe()
242 iio_channel_release(twl4030_madc_bat->channel_temp); in twl4030_madc_battery_probe()