kernel: update leds-bcm63138 driver

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki 2022-07-18 15:06:11 +02:00
parent af8771751c
commit bb2a2b1dbe
6 changed files with 173 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 13b64a0c19059b38150c79d65d350ae44034c5df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 17 Jul 2022 14:42:46 +0200
Subject: [PATCH] dt-bindings: leds: leds-bcm63138: unify full stops in
descriptions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Description of "reg" doesn't have full stop at the end. It makes sense
as it's a one-sentence only. Use the same style for "active-low".
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
Documentation/devicetree/bindings/leds/leds-bcm63138.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
@@ -54,7 +54,7 @@ patternProperties:
active-low:
type: boolean
- description: Makes LED active low.
+ description: Makes LED active low
required:
- reg

View File

@ -0,0 +1,25 @@
From bcc607cdbb1f931111196699426f0cb83bfb296a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 17 Jul 2022 14:42:47 +0200
Subject: [PATCH] leds: add help info about BCM63138 module name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It's what we do for all other LEDs drivers.
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
drivers/leds/blink/Kconfig | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/leds/blink/Kconfig
+++ b/drivers/leds/blink/Kconfig
@@ -9,3 +9,5 @@ config LEDS_BCM63138
This option enables support for LED controller that is part of
BCM63138 SoC. The same hardware block is known to be also used
in BCM4908, BCM6848, BCM6858, BCM63148, BCM63381 and BCM68360.
+
+ If compiled as module it will be called leds-bcm63138.

View File

@ -0,0 +1,30 @@
From 92cfc71ee2ddfb499ed53e21b28bdf8739bc70bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 17 Jul 2022 14:42:48 +0200
Subject: [PATCH] leds: leds-bcm63138: get rid of LED_OFF
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The whole "enum led_brightness" is marked as obsolete. Replace it with a
(non-)zero check.
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
drivers/leds/blink/leds-bcm63138.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/leds/blink/leds-bcm63138.c
+++ b/drivers/leds/blink/leds-bcm63138.c
@@ -113,8 +113,7 @@ static void bcm63138_leds_enable_led(str
{
u32 bit = BIT(led->pin);
- bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit,
- value == LED_OFF ? 0 : bit);
+ bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit, value ? bit : 0);
}
/*

View File

@ -0,0 +1,30 @@
From 13b64a0c19059b38150c79d65d350ae44034c5df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 17 Jul 2022 14:42:46 +0200
Subject: [PATCH] dt-bindings: leds: leds-bcm63138: unify full stops in
descriptions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Description of "reg" doesn't have full stop at the end. It makes sense
as it's a one-sentence only. Use the same style for "active-low".
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
Documentation/devicetree/bindings/leds/leds-bcm63138.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
@@ -54,7 +54,7 @@ patternProperties:
active-low:
type: boolean
- description: Makes LED active low.
+ description: Makes LED active low
required:
- reg

View File

@ -0,0 +1,28 @@
From bcc607cdbb1f931111196699426f0cb83bfb296a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 17 Jul 2022 14:42:47 +0200
Subject: [PATCH] leds: add help info about BCM63138 module name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It's what we do for all other LEDs drivers.
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
drivers/leds/blink/Kconfig | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/leds/blink/Kconfig
+++ b/drivers/leds/blink/Kconfig
@@ -10,6 +10,8 @@ config LEDS_BCM63138
BCM63138 SoC. The same hardware block is known to be also used
in BCM4908, BCM6848, BCM6858, BCM63148, BCM63381 and BCM68360.
+ If compiled as module it will be called leds-bcm63138.
+
config LEDS_LGM
tristate "LED support for LGM SoC series"
depends on X86 || COMPILE_TEST

View File

@ -0,0 +1,30 @@
From 92cfc71ee2ddfb499ed53e21b28bdf8739bc70bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sun, 17 Jul 2022 14:42:48 +0200
Subject: [PATCH] leds: leds-bcm63138: get rid of LED_OFF
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The whole "enum led_brightness" is marked as obsolete. Replace it with a
(non-)zero check.
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
drivers/leds/blink/leds-bcm63138.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/leds/blink/leds-bcm63138.c
+++ b/drivers/leds/blink/leds-bcm63138.c
@@ -113,8 +113,7 @@ static void bcm63138_leds_enable_led(str
{
u32 bit = BIT(led->pin);
- bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit,
- value == LED_OFF ? 0 : bit);
+ bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit, value ? bit : 0);
}
/*