From patchwork Mon Nov 4 14:19:21 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: 13861483 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.subspace.kernel.org (Postfix) with ESMTPS id 3D6FB2AD0C for ; Mon, 4 Nov 2024 14:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730730009; cv=none; b=gGBupVVhss9eb3owL7iR2e3LB68KMSFbzXtKrkVD4Ct7DbTHbOYt2Qj9W3vkvaSmjQ7hl0RzqQsyVKcK2PIeDXRA9rd2nG0+qFMIOn2dRUJZWU5qKqZC3rEBUPf71Ah2dUqyb8Hzz4RL6BtMO9PCQPrl4/izjeavyQS58h2npuw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730730009; c=relaxed/simple; bh=v+4wpYKP4Bkc9/Tq8/Zeq+f2mOiKlspjFg9hSrNjaqU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RQPSB0XMrA5HAlCeUlT6Dy7/vpOwMfkPMzxkUGXMp/O3eZmh8bEHzUhFcAgSAngNlecfCxGVtB7qRfUDPz8NQgXm5SGIND3I3lwXss0MxqnbxK56LToxhf1+7cyPtwtGD82L9xV97/Ryx5HVKfeMFWFk9TxH4ULMwBmoP80/WeE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZofDMtKp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZofDMtKp" Received: by smtp.kernel.org (Postfix) id 12C75C4AF0D; Mon, 4 Nov 2024 14:20:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B405C4CED1; Mon, 4 Nov 2024 14:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730730009; bh=v+4wpYKP4Bkc9/Tq8/Zeq+f2mOiKlspjFg9hSrNjaqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZofDMtKphrH6ovc2vdFOjYuB0xC6o/btw0y7qB98/aC0Ks+62pS5yNRQST24035U9 Kh6lxcfFtachiLrxv6NzMj9yInyHZ1J5nAj1y+pgQDlGfaG22S0XsTSjjsbIa+UdbU RZ59BhPVesnClB4LrNh8bdppdB2tUtAELqglh5lmsveB/100yWi5rvEdnqncYRFeXs UIRKy16WobohMsBCelGxMa4F3/wURDLTH0DL8J8vXJiZi4kxic+tgg23J9yQDLv21w dw+B8jiA98ttYi0fbrYR1olwYDa0OR8rtu45TOQ/Z7FI957A6BpqCP7FRKemA7XptO sSa4plbI1cHLA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Lee Jones 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 v5 09/12] leds: turris-omnia: Inform about missing LED gamma correction feature in the MCU driver Date: Mon, 4 Nov 2024 15:19:21 +0100 Message-ID: <20241104141924.18816-10-kabel@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104141924.18816-1-kabel@kernel.org> References: <20241104141924.18816-1-kabel@kernel.org> Precedence: bulk X-Mailing-List: soc@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 168ce362fd14..d26200d34237 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -479,12 +479,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 (client->irq && (ret & OMNIA_FEAT_BRIGHTNESS_INT)) { ret = devm_request_threaded_irq(dev, client->irq, NULL, 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;