Lines Matching +full:solid +full:- +full:state
1 // SPDX-License-Identifier: GPL-2.0-only
33 trigger_to_psy_trigger(led_cdev->trigger); in power_supply_led_trigger_activate()
35 /* Sync current power-supply state to LED being activated */ in power_supply_led_trigger_activate()
36 power_supply_update_leds(psy_trig->psy); in power_supply_led_trigger_activate()
45 int ret = -ENOMEM; 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()
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()
101 dev_dbg(&psy->dev, "%s %d\n", __func__, status.intval); in power_supply_update_bat_leds()
105 led_trigger_event(psy->trig, LED_FULL); in power_supply_update_bat_leds()
106 led_trigger_event(psy->charging_trig, LED_OFF); in power_supply_update_bat_leds()
107 led_trigger_event(psy->full_trig, LED_FULL); in power_supply_update_bat_leds()
109 led_trigger_event(psy->charging_blink_full_solid_trig, LED_OFF); in power_supply_update_bat_leds()
110 led_trigger_event(psy->charging_blink_full_solid_trig, LED_FULL); in power_supply_update_bat_leds()
111 led_mc_trigger_event(psy->charging_orange_full_green_trig, in power_supply_update_bat_leds()
117 led_trigger_event(psy->trig, LED_FULL); in power_supply_update_bat_leds()
118 led_trigger_event(psy->charging_trig, LED_FULL); in power_supply_update_bat_leds()
119 led_trigger_event(psy->full_trig, LED_OFF); in power_supply_update_bat_leds()
120 led_trigger_blink(psy->charging_blink_full_solid_trig, 0, 0); in power_supply_update_bat_leds()
121 led_mc_trigger_event(psy->charging_orange_full_green_trig, in power_supply_update_bat_leds()
127 led_trigger_event(psy->trig, LED_OFF); in power_supply_update_bat_leds()
128 led_trigger_event(psy->charging_trig, LED_OFF); in power_supply_update_bat_leds()
129 led_trigger_event(psy->full_trig, LED_OFF); in power_supply_update_bat_leds()
130 led_trigger_event(psy->charging_blink_full_solid_trig, in power_supply_update_bat_leds()
132 led_trigger_event(psy->charging_orange_full_green_trig, in power_supply_update_bat_leds()
140 power_supply_unregister_led_trigger(psy->trig); in power_supply_remove_bat_triggers()
141 power_supply_unregister_led_trigger(psy->charging_trig); in power_supply_remove_bat_triggers()
142 power_supply_unregister_led_trigger(psy->full_trig); in power_supply_remove_bat_triggers()
143 power_supply_unregister_led_trigger(psy->charging_blink_full_solid_trig); in power_supply_remove_bat_triggers()
144 power_supply_unregister_led_trigger(psy->charging_orange_full_green_trig); in power_supply_remove_bat_triggers()
151 power_supply_register_led_trigger(psy, "%s-charging-or-full", in power_supply_create_bat_triggers()
152 &psy->trig, &err); in power_supply_create_bat_triggers()
153 power_supply_register_led_trigger(psy, "%s-charging", in power_supply_create_bat_triggers()
154 &psy->charging_trig, &err); in power_supply_create_bat_triggers()
155 power_supply_register_led_trigger(psy, "%s-full", in power_supply_create_bat_triggers()
156 &psy->full_trig, &err); in power_supply_create_bat_triggers()
157 power_supply_register_led_trigger(psy, "%s-charging-blink-full-solid", in power_supply_create_bat_triggers()
158 &psy->charging_blink_full_solid_trig, &err); in power_supply_create_bat_triggers()
159 power_supply_register_led_trigger(psy, "%s-charging-orange-full-green", in power_supply_create_bat_triggers()
160 &psy->charging_orange_full_green_trig, &err); in power_supply_create_bat_triggers()
176 dev_dbg(&psy->dev, "%s %d\n", __func__, online.intval); in power_supply_update_gen_leds()
179 led_trigger_event(psy->trig, LED_FULL); in power_supply_update_gen_leds()
181 led_trigger_event(psy->trig, LED_OFF); in power_supply_update_gen_leds()
186 return power_supply_register_led_trigger(psy, "%s-online", &psy->trig, NULL); in power_supply_create_gen_triggers()
191 power_supply_unregister_led_trigger(psy->trig); in power_supply_remove_gen_triggers()
198 if (psy->desc->type == POWER_SUPPLY_TYPE_BATTERY) in power_supply_update_leds()
206 if (psy->desc->type == POWER_SUPPLY_TYPE_BATTERY) in power_supply_create_triggers()
213 if (psy->desc->type == POWER_SUPPLY_TYPE_BATTERY) in power_supply_remove_triggers()