Lines Matching refs:tosa_bat_jacket
48 static struct tosa_bat tosa_bat_jacket; variable
198 tosa_bat_update(&tosa_bat_jacket); in tosa_bat_work()
270 static struct tosa_bat tosa_bat_jacket = { variable
347 tosa_bat_jacket.gpiod_charge_off = devm_gpiod_get(dev, "jacket charge off", GPIOD_OUT_HIGH); in tosa_bat_probe()
348 if (IS_ERR(tosa_bat_jacket.gpiod_charge_off)) in tosa_bat_probe()
349 return dev_err_probe(dev, PTR_ERR(tosa_bat_jacket.gpiod_charge_off), in tosa_bat_probe()
357 tosa_bat_jacket.gpiod_bat = devm_gpiod_get(dev, "jacket battery", GPIOD_OUT_LOW); in tosa_bat_probe()
358 if (IS_ERR(tosa_bat_jacket.gpiod_bat)) in tosa_bat_probe()
359 return dev_err_probe(dev, PTR_ERR(tosa_bat_jacket.gpiod_bat), in tosa_bat_probe()
371 tosa_bat_jacket.gpiod_full = devm_gpiod_get(dev, "jacket battery full", GPIOD_IN); in tosa_bat_probe()
372 if (IS_ERR(tosa_bat_jacket.gpiod_full)) in tosa_bat_probe()
373 return dev_err_probe(dev, PTR_ERR(tosa_bat_jacket.gpiod_full), in tosa_bat_probe()
381 tosa_bat_jacket.gpiod_temp = devm_gpiod_get(dev, "jacket battery temp", GPIOD_OUT_LOW); in tosa_bat_probe()
382 if (IS_ERR(tosa_bat_jacket.gpiod_temp)) in tosa_bat_probe()
383 return dev_err_probe(dev, PTR_ERR(tosa_bat_jacket.gpiod_temp), in tosa_bat_probe()
409 mutex_init(&tosa_bat_jacket.work_lock); in tosa_bat_probe()
422 jacket_psy_cfg.drv_data = &tosa_bat_jacket; in tosa_bat_probe()
423 tosa_bat_jacket.psy = power_supply_register(dev, in tosa_bat_probe()
426 if (IS_ERR(tosa_bat_jacket.psy)) { in tosa_bat_probe()
427 ret = PTR_ERR(tosa_bat_jacket.psy); in tosa_bat_probe()
446 ret = request_irq(gpiod_to_irq(tosa_bat_jacket.gpiod_full), in tosa_bat_probe()
449 "jacket full", &tosa_bat_jacket); in tosa_bat_probe()
456 "jacket detect", &tosa_bat_jacket); in tosa_bat_probe()
462 free_irq(gpiod_to_irq(tosa_bat_jacket.gpiod_full), &tosa_bat_jacket); in tosa_bat_probe()
468 power_supply_unregister(tosa_bat_jacket.psy); in tosa_bat_probe()
481 free_irq(gpiod_to_irq(jacket_detect), &tosa_bat_jacket); in tosa_bat_remove()
482 free_irq(gpiod_to_irq(tosa_bat_jacket.gpiod_full), &tosa_bat_jacket); in tosa_bat_remove()
486 power_supply_unregister(tosa_bat_jacket.psy); in tosa_bat_remove()