Skip to content

Commit 2de889e

Browse files
elkablolag-linaro
authored andcommitted
leds: turris-omnia: Inform about missing LED gamma correction feature in the MCU driver
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 <kabel@kernel.org> Link: https://lore.kernel.org/r/20241111100355.6978-10-kabel@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 1783b76 commit 2de889e

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

drivers/leds/leds-turris-omnia.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,6 @@ static int omnia_leds_probe(struct i2c_client *client)
507507
}
508508

509509
leds->has_gamma_correction = ret & OMNIA_FEAT_LED_GAMMA_CORRECTION;
510-
if (!leds->has_gamma_correction) {
511-
dev_info(dev,
512-
"Your board's MCU firmware does not support the LED gamma correction feature.\n");
513-
dev_info(dev,
514-
"Consider upgrading MCU firmware with the omnia-mcutool utility.\n");
515-
}
516510

517511
if (ret & OMNIA_FEAT_BRIGHTNESS_INT) {
518512
ret = omnia_request_brightness_irq(leds);

drivers/platform/cznic/turris-omnia-mcu-base.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ static int omnia_mcu_read_features(struct omnia_mcu *mcu)
259259
_DEF_FEAT(POWEROFF_WAKEUP, "poweroff and wakeup"),
260260
_DEF_FEAT(TRNG, "true random number generator"),
261261
_DEF_FEAT(BRIGHTNESS_INT, "LED panel brightness change interrupt"),
262+
_DEF_FEAT(LED_GAMMA_CORRECTION, "LED gamma correction"),
262263
#undef _DEF_FEAT
263264
};
264265
struct i2c_client *client = mcu->client;

0 commit comments

Comments
 (0)