mediatek: do not use gpiod_set_raw_value()
authorSven Wegener <sven.wegener@stealer.net>
Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 18 Sep 2022 14:39:41 +0000 (15:39 +0100)
The polarity of the signal is set in the device dts.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
(cherry picked from commit 56c2d15587dfe5285f1cf3bfb236c827bc446465)

target/linux/mediatek/files-5.10/drivers/leds/leds-ubnt-ledbar.c

index 9c68d40eec830c2b9c2a3fe6b7f57e85739442f4..c5d668836b7bd1a08731027b6ad8b7683f42e792 100644 (file)
@@ -68,7 +68,7 @@ static int ubnt_ledbar_apply_state(struct ubnt_ledbar *ledbar)
        led_msg[UBNT_LEDBAR_TRANSACTION_GREEN_IDX] = ledbar->led_green.brightness;
        led_msg[UBNT_LEDBAR_TRANSACTION_RED_IDX] = ledbar->led_red.brightness;
 
-       gpiod_set_raw_value(ledbar->enable_gpio, 1);
+       gpiod_set_value(ledbar->enable_gpio, 1);
 
        msleep(10);
 
@@ -88,7 +88,7 @@ static int ubnt_ledbar_apply_state(struct ubnt_ledbar *ledbar)
 
        msleep(10);
 out_gpio:
-       gpiod_set_raw_value(ledbar->enable_gpio, 0);
+       gpiod_set_value(ledbar->enable_gpio, 0);
 
        mutex_unlock(&ledbar->lock);