Lines Matching refs:psy_trig
32 struct power_supply_led_trigger *psy_trig = in power_supply_led_trigger_activate() local
36 power_supply_update_leds(psy_trig->psy); in power_supply_led_trigger_activate()
44 struct power_supply_led_trigger *psy_trig; in power_supply_register_led_trigger() local
51 psy_trig = kzalloc(sizeof(*psy_trig), GFP_KERNEL); in power_supply_register_led_trigger()
52 if (!psy_trig) in power_supply_register_led_trigger()
55 psy_trig->trig.name = kasprintf(GFP_KERNEL, name_template, psy->desc->name); in power_supply_register_led_trigger()
56 if (!psy_trig->trig.name) in power_supply_register_led_trigger()
59 psy_trig->trig.activate = power_supply_led_trigger_activate; in power_supply_register_led_trigger()
60 psy_trig->psy = psy; in power_supply_register_led_trigger()
62 ret = led_trigger_register(&psy_trig->trig); in power_supply_register_led_trigger()
66 *tp = &psy_trig->trig; in power_supply_register_led_trigger()
70 kfree(psy_trig->trig.name); in power_supply_register_led_trigger()
72 kfree(psy_trig); in power_supply_register_led_trigger()
81 struct power_supply_led_trigger *psy_trig; in power_supply_unregister_led_trigger() local
86 psy_trig = trigger_to_psy_trigger(trig); in power_supply_unregister_led_trigger()
87 led_trigger_unregister(&psy_trig->trig); in power_supply_unregister_led_trigger()
88 kfree(psy_trig->trig.name); in power_supply_unregister_led_trigger()
89 kfree(psy_trig); in power_supply_unregister_led_trigger()