From patchwork Fri Sep 13 12:31:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 13803397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A3808EEE26C for ; Fri, 13 Sep 2024 12:31:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 8D23AC4AF0C; Fri, 13 Sep 2024 12:31:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B8DFC4CEC6; Fri, 13 Sep 2024 12:31:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726230700; bh=z93xiTAMxlUviES4pfH+eJe8L643415tkjwDtltsdU4=; h=From:To:List-Id:Cc:Subject:Date:In-Reply-To:References:From; b=j4d87rWz9defTpFqRY2TK/3V8RB7SqF4kw0KuBe5JQf6Won8dt8W7oBWsGiaMLUGB LPb70aB2LwrpCXz9mB7jUD1yQ4Kx/XHKQYoQuScGYOgfx8QcJ3omEMdxVDI0z6E23r neAhTWwaYyk6d5wogIQKINUCM0/TPt15OktCSOuD0LXPqQ4GtaywhoD+2JN/4GoTXV h4L30YTwy99jdq2QPxP+RrGc8jwJnNfI1HAk7uAI5kTVs1Macjp+E7B3w6TVEsAA94 SCUKlrbnTz/LK77/BAJ95SRlgPjuCSvMNY+BiFiiGFnatMZ5d55KUG/xUvC4spNkVW Gbg08LDesN1OQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Lee Jones List-Id: Cc: Pavel Machek , linux-leds@vger.kernel.org, Arnd Bergmann , soc@kernel.org, Gregory CLEMENT , arm@kernel.org, Andy Shevchenko , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, =?utf-8?q?M?= =?utf-8?q?arek_Beh=C3=BAn?= Subject: [PATCH leds v3 08/11] leds: turris-omnia: Inform about missing LED gamma correction feature in the MCU driver Date: Fri, 13 Sep 2024 14:31:00 +0200 Message-ID: <20240913123103.21226-9-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240913123103.21226-1-kabel@kernel.org> References: <20240913123103.21226-1-kabel@kernel.org> MIME-Version: 1.0 If the LED gamma correction feature is missing in the MCU firmware, inform about this in the MCU firmware probe function instead of LED driver probe function, so that all the feature checks are in one place. Signed-off-by: Marek BehĂșn --- drivers/leds/leds-turris-omnia.c | 6 ------ drivers/platform/cznic/turris-omnia-mcu-base.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c index a87cdb58e476..570f7a69709c 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -429,12 +429,6 @@ static int omnia_leds_probe(struct i2c_client *client) } leds->has_gamma_correction = ret & OMNIA_FEAT_LED_GAMMA_CORRECTION; - if (!leds->has_gamma_correction) { - dev_info(dev, - "Your board's MCU firmware does not support the LED gamma correction feature.\n"); - dev_info(dev, - "Consider upgrading MCU firmware with the omnia-mcutool utility.\n"); - } if (ret & OMNIA_FEAT_BRIGHTNESS_INT) { ret = devm_request_any_context_irq(dev, client->irq, diff --git a/drivers/platform/cznic/turris-omnia-mcu-base.c b/drivers/platform/cznic/turris-omnia-mcu-base.c index 3bb4a3cfdb29..770e680b96f9 100644 --- a/drivers/platform/cznic/turris-omnia-mcu-base.c +++ b/drivers/platform/cznic/turris-omnia-mcu-base.c @@ -259,6 +259,7 @@ static int omnia_mcu_read_features(struct omnia_mcu *mcu) _DEF_FEAT(POWEROFF_WAKEUP, "poweroff and wakeup"), _DEF_FEAT(TRNG, "true random number generator"), _DEF_FEAT(BRIGHTNESS_INT, "LED panel brightness change interrupt"), + _DEF_FEAT(LED_GAMMA_CORRECTION, "LED gamma correction"), #undef _DEF_FEAT }; struct i2c_client *client = mcu->client;