Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1409150pxb; Fri, 21 Jan 2022 18:00:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9ndObgL4Oi7Fe1rTbzWgeOm2CMUQaoAmtAxnco4Lzkj2tLF0mC+3bkJxWe1Rv5AfDI53I X-Received: by 2002:a17:903:2447:b0:14b:20ad:c1b1 with SMTP id l7-20020a170903244700b0014b20adc1b1mr4001255pls.82.1642816847935; Fri, 21 Jan 2022 18:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816847; cv=none; d=google.com; s=arc-20160816; b=rB3aGMkRhh0Y7JgilAyTWyrJS7d9NGIl71i7averVt5NR8gJCmJt6VVgY6tx7VuG4m 5P6kuZZlW6gPjuLbTYT/XWDcN5wcT5haJ+dpdGIaxRMTLmS5BMXMekZWizxUSwQ2Zv0/ oqAIdog9dhJFXRHQQ8Uh9TE1GWQEtUUDtqEUm/eP80zEoxi59JZwy0UlYs5+5TU0L/EQ EgaGqL49V+YDKHmFgKzf6Rak2+p7EaepPru/4dwrVNXSx/pL2skDgT7Ux5CRtKZYt6jy vgrVeYtWfKlEB/05HgX+B4+OAdrqzJwXXyToPOkVqKcgP0s3c6B50KTywLfLkx5SVI54 VSrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4weifrQ7PTCoGujS0yQMKZpi8lSBUanoNpSA0DdSt+Y=; b=0zCRv4C/rvaicoXNlzVBq8KTtqvuIB3FJWIMeUEoNpVBb5lNuFgVI5jfKctp3uz8kL iH6ZlQ3dc9yP6wAP6SU7O/6mfQIv4quA1P9+iwwhn3+Z1fqdNZAT0Nyy6L9w0Eqiqvpd /QJUVVzyeYlnrbL4CS74m+E2vNqgTfXBjv1q0EWPo+KWcyX4NcgmgNUMGi4vh7UISUWJ pk9+FzpzcnUGN+BspLzXClwyBTs7mg/zYEJ6lrt4iz36T6lVAhPfL7SRtlT2fM0O+d1/ O6Q3w7nmLuyzDhdWFzRtXyPojD5FM/t1o5B4rYkCpkFCuQ8N6w2z9am9Z5sCLn91m8MX EgLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OF1LGc0e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm18si912185pgb.109.2022.01.21.18.00.36; Fri, 21 Jan 2022 18:00:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OF1LGc0e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379643AbiAUQ55 (ORCPT + 99 others); Fri, 21 Jan 2022 11:57:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379849AbiAUQ4t (ORCPT ); Fri, 21 Jan 2022 11:56:49 -0500 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 755DBC061763; Fri, 21 Jan 2022 08:55:34 -0800 (PST) Received: by mail-oi1-x22f.google.com with SMTP id w188so14290830oiw.13; Fri, 21 Jan 2022 08:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4weifrQ7PTCoGujS0yQMKZpi8lSBUanoNpSA0DdSt+Y=; b=OF1LGc0evnBIhNNz84FPs7c8hsoF1r+/WS4fAuOmilgSYZYbT6CrqaPs1OIO/6LIxh aCfomttS8vaYkKjlBhGRnCkK5sNSvB90MhaAykJPVz096eYCnJ7kncwalddJLbZmYVe5 MjebfomEvGhfTf2h1MgGTNSTVznz9gV0EWT14LVTZ24nZGykPBIKktLkT/rP1v3y60e1 Z6yTLr7ejol0GHlZUCZY41ckrUnhyqaRW1JwMN5GZK5O2k8qBmD5DCBxAozgWYBBu1uF 5RSJhj6dkBWt0EeCIIdyLjgqmWG4OcP7EQD/B7dkBMCqcGG2P0YCfdnVn2Gyds3JND8A yv3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4weifrQ7PTCoGujS0yQMKZpi8lSBUanoNpSA0DdSt+Y=; b=x+li9HbDXQxNSfkR5zgpJikqvGrAYCErkUYGH9I5UfkQQCf1U17sx/roNCXoDm411l BZclYBsCnwRC1gLj6Y8kDxmWfULut50+ZKnVP1JpyMb36dfHJWM8l/sdQON2F9jw6coW sYgEzsKs8JzU71ELMlRk/CFcjK4Z/DDKNZ8BQ79MqAEL+VyjNxRNedhBWMHbcdKYzQbf pgphObiWid10/FsYZViA3CWwGNuMYXD4OMAzeWSfLZPee1S2LBAkvQDYpe+uCbMGrmCa tvAxKp4vZeDflKS0MmJV67b8cSlk40cM5ha1LV/sp0g2Vc7tKNTtJiVpml4kn4cekY3w zWSg== X-Gm-Message-State: AOAM5328Le80sLSk3NGsLg4blFjC2dRtgEx06Ps5cugKvls4BHdkbhL9 jKm8j0ZRnfnfhvjjHkUGUflbyJnnq9I= X-Received: by 2002:a54:4e9a:: with SMTP id c26mr1250134oiy.159.1642784133886; Fri, 21 Jan 2022 08:55:33 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:33 -0800 (PST) From: Luiz Sampaio To: Sebastian Reichel Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-pm@vger.kernel.org Subject: [PATCH 21/31] power: supply: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:26 -0300 Message-Id: <20220121165436.30956-22-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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