[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220121165436.30956-22-sampaio.ime@gmail.com>
Date: Fri, 21 Jan 2022 13:54:26 -0300
From: Luiz Sampaio <sampaio.ime@...il.com>
To: Sebastian Reichel <sre@...nel.org>
Cc: linux-kernel@...r.kernel.org, Luiz Sampaio <sampaio.ime@...il.com>,
linux-pm@...r.kernel.org
Subject: [PATCH 21/31] power: supply: changing LED_* from enum led_brightness to actual value
The enum led_brightness, which contains the declaration of LED_OFF,
LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
max_brightness.
---
drivers/power/supply/power_supply_leds.c | 26 ++++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/power/supply/power_supply_leds.c b/drivers/power/supply/power_supply_leds.c
index d69880cc3593..16f25179f710 100644
--- a/drivers/power/supply/power_supply_leds.c
+++ b/drivers/power/supply/power_supply_leds.c
@@ -31,25 +31,25 @@ static void power_supply_update_bat_leds(struct power_supply *psy)
switch (status.intval) {
case POWER_SUPPLY_STATUS_FULL:
- led_trigger_event(psy->charging_full_trig, LED_FULL);
- led_trigger_event(psy->charging_trig, LED_OFF);
- led_trigger_event(psy->full_trig, LED_FULL);
+ led_trigger_event(psy->charging_full_trig, 255);
+ led_trigger_event(psy->charging_trig, 0);
+ led_trigger_event(psy->full_trig, 255);
led_trigger_event(psy->charging_blink_full_solid_trig,
- LED_FULL);
+ 255);
break;
case POWER_SUPPLY_STATUS_CHARGING:
- led_trigger_event(psy->charging_full_trig, LED_FULL);
- led_trigger_event(psy->charging_trig, LED_FULL);
- led_trigger_event(psy->full_trig, LED_OFF);
+ led_trigger_event(psy->charging_full_trig, 255);
+ led_trigger_event(psy->charging_trig, 255);
+ led_trigger_event(psy->full_trig, 0);
led_trigger_blink(psy->charging_blink_full_solid_trig,
&delay_on, &delay_off);
break;
default:
- led_trigger_event(psy->charging_full_trig, LED_OFF);
- led_trigger_event(psy->charging_trig, LED_OFF);
- led_trigger_event(psy->full_trig, LED_OFF);
+ led_trigger_event(psy->charging_full_trig, 0);
+ led_trigger_event(psy->charging_trig, 0);
+ led_trigger_event(psy->full_trig, 0);
led_trigger_event(psy->charging_blink_full_solid_trig,
- LED_OFF);
+ 0);
break;
}
}
@@ -120,9 +120,9 @@ static void power_supply_update_gen_leds(struct power_supply *psy)
dev_dbg(&psy->dev, "%s %d\n", __func__, online.intval);
if (online.intval)
- led_trigger_event(psy->online_trig, LED_FULL);
+ led_trigger_event(psy->online_trig, 255);
else
- led_trigger_event(psy->online_trig, LED_OFF);
+ led_trigger_event(psy->online_trig, 0);
}
static int power_supply_create_gen_triggers(struct power_supply *psy)
--
2.34.1
Powered by blists - more mailing lists