All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH leds 1/5] leds: turris-omnia: use constants instead of macros for color command
@ 2020-10-30  2:39 Marek Behún
  2020-10-30  2:39 ` [PATCH leds 2/5] leds: turris-omnia: wrap to 80 columns Marek Behún
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Marek Behún @ 2020-10-30  2:39 UTC (permalink / raw)
  To: linux-leds; +Cc: Dan Murphy, Pavel Machek, Marek Behún

Use integer constants directly when building I2C messages for LED color
change command, instead of macros. The command is simple enough to
understand what is going on even without these names.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/leds/leds-turris-omnia.c | 34 ++++++++++++--------------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index 8c5bdc3847ee..80b2d94844f2 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -27,14 +27,6 @@
 #define CMD_LED_SET_BRIGHTNESS		7
 #define CMD_LED_GET_BRIGHTNESS		8
 
-#define OMNIA_CMD			0
-
-#define OMNIA_CMD_LED_COLOR_LED		1
-#define OMNIA_CMD_LED_COLOR_R		2
-#define OMNIA_CMD_LED_COLOR_G		3
-#define OMNIA_CMD_LED_COLOR_B		4
-#define OMNIA_CMD_LED_COLOR_LEN		5
-
 struct omnia_led {
 	struct led_classdev_mc mc_cdev;
 	struct mc_subled subled_info[OMNIA_LED_NUM_CHANNELS];
@@ -55,21 +47,21 @@ static int omnia_led_brightness_set_blocking(struct led_classdev *cdev,
 	struct led_classdev_mc *mc_cdev = lcdev_to_mccdev(cdev);
 	struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent);
 	struct omnia_led *led = to_omnia_led(mc_cdev);
-	u8 buf[OMNIA_CMD_LED_COLOR_LEN], state;
+	u8 buf[5], state;
 	int ret;
 
 	mutex_lock(&leds->lock);
 
 	led_mc_calc_color_components(&led->mc_cdev, brightness);
 
-	buf[OMNIA_CMD] = CMD_LED_COLOR;
-	buf[OMNIA_CMD_LED_COLOR_LED] = led->reg;
-	buf[OMNIA_CMD_LED_COLOR_R] = mc_cdev->subled_info[0].brightness;
-	buf[OMNIA_CMD_LED_COLOR_G] = mc_cdev->subled_info[1].brightness;
-	buf[OMNIA_CMD_LED_COLOR_B] = mc_cdev->subled_info[2].brightness;
+	buf[0] = CMD_LED_COLOR;
+	buf[1] = led->reg;
+	buf[2] = mc_cdev->subled_info[0].brightness;
+	buf[3] = mc_cdev->subled_info[1].brightness;
+	buf[4] = mc_cdev->subled_info[2].brightness;
 
 	state = CMD_LED_STATE_LED(led->reg);
-	if (buf[OMNIA_CMD_LED_COLOR_R] || buf[OMNIA_CMD_LED_COLOR_G] || buf[OMNIA_CMD_LED_COLOR_B])
+	if (buf[2] || buf[3] || buf[4])
 		state |= CMD_LED_STATE_ON;
 
 	ret = i2c_smbus_write_byte_data(leds->client, CMD_LED_STATE, state);
@@ -250,18 +242,18 @@ static int omnia_leds_probe(struct i2c_client *client,
 
 static int omnia_leds_remove(struct i2c_client *client)
 {
-	u8 buf[OMNIA_CMD_LED_COLOR_LEN];
+	u8 buf[5];
 
 	/* put all LEDs into default (HW triggered) mode */
 	i2c_smbus_write_byte_data(client, CMD_LED_MODE,
 				  CMD_LED_MODE_LED(OMNIA_BOARD_LEDS));
 
 	/* set all LEDs color to [255, 255, 255] */
-	buf[OMNIA_CMD] = CMD_LED_COLOR;
-	buf[OMNIA_CMD_LED_COLOR_LED] = OMNIA_BOARD_LEDS;
-	buf[OMNIA_CMD_LED_COLOR_R] = 255;
-	buf[OMNIA_CMD_LED_COLOR_G] = 255;
-	buf[OMNIA_CMD_LED_COLOR_B] = 255;
+	buf[0] = CMD_LED_COLOR;
+	buf[1] = OMNIA_BOARD_LEDS;
+	buf[2] = 255;
+	buf[3] = 255;
+	buf[4] = 255;
 
 	i2c_master_send(client, buf, 5);
 

base-commit: 041883d044672852fcb8254cfc7b683fd306c943
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH leds 2/5] leds: turris-omnia: wrap to 80 columns
  2020-10-30  2:39 [PATCH leds 1/5] leds: turris-omnia: use constants instead of macros for color command Marek Behún
@ 2020-10-30  2:39 ` Marek Behún
  2020-10-30  2:39 ` [PATCH leds 3/5] leds: turris-omnia: fix checkpatch warning Marek Behún
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Marek Behún @ 2020-10-30  2:39 UTC (permalink / raw)
  To: linux-leds; +Cc: Dan Murphy, Pavel Machek, Marek Behún

Although checkpatch changed the max-line-length default to 100 columns,
we still prefer 80 columns somewhere.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/leds/leds-turris-omnia.c | 43 ++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 19 deletions(-)

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index 80b2d94844f2..096ed7b81957 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -12,20 +12,20 @@
 #include <linux/of.h>
 #include "leds.h"
 
-#define OMNIA_BOARD_LEDS		12
-#define OMNIA_LED_NUM_CHANNELS		3
+#define OMNIA_BOARD_LEDS	12
+#define OMNIA_LED_NUM_CHANNELS	3
 
-#define CMD_LED_MODE			3
-#define CMD_LED_MODE_LED(l)		((l) & 0x0f)
-#define CMD_LED_MODE_USER		0x10
+#define CMD_LED_MODE		3
+#define CMD_LED_MODE_LED(l)	((l) & 0x0f)
+#define CMD_LED_MODE_USER	0x10
 
-#define CMD_LED_STATE			4
-#define CMD_LED_STATE_LED(l)		((l) & 0x0f)
-#define CMD_LED_STATE_ON		0x10
+#define CMD_LED_STATE		4
+#define CMD_LED_STATE_LED(l)	((l) & 0x0f)
+#define CMD_LED_STATE_ON	0x10
 
-#define CMD_LED_COLOR			5
-#define CMD_LED_SET_BRIGHTNESS		7
-#define CMD_LED_GET_BRIGHTNESS		8
+#define CMD_LED_COLOR		5
+#define CMD_LED_SET_BRIGHTNESS	7
+#define CMD_LED_GET_BRIGHTNESS	8
 
 struct omnia_led {
 	struct led_classdev_mc mc_cdev;
@@ -33,7 +33,7 @@ struct omnia_led {
 	int reg;
 };
 
-#define to_omnia_led(l)			container_of(l, struct omnia_led, mc_cdev)
+#define to_omnia_led(l)		container_of(l, struct omnia_led, mc_cdev)
 
 struct omnia_leds {
 	struct i2c_client *client;
@@ -118,18 +118,21 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
 					CMD_LED_MODE_LED(led->reg) |
 					CMD_LED_MODE_USER);
 	if (ret < 0) {
-		dev_err(dev, "Cannot set LED %pOF to software mode: %i\n", np, ret);
+		dev_err(dev, "Cannot set LED %pOF to software mode: %i\n", np,
+			ret);
 		return ret;
 	}
 
 	/* disable the LED */
-	ret = i2c_smbus_write_byte_data(client, CMD_LED_STATE, CMD_LED_STATE_LED(led->reg));
+	ret = i2c_smbus_write_byte_data(client, CMD_LED_STATE,
+					CMD_LED_STATE_LED(led->reg));
 	if (ret < 0) {
 		dev_err(dev, "Cannot set LED %pOF brightness: %i\n", np, ret);
 		return ret;
 	}
 
-	ret = devm_led_classdev_multicolor_register_ext(dev, &led->mc_cdev, &init_data);
+	ret = devm_led_classdev_multicolor_register_ext(dev, &led->mc_cdev,
+							&init_data);
 	if (ret < 0) {
 		dev_err(dev, "Cannot register LED %pOF: %i\n", np, ret);
 		return ret;
@@ -149,7 +152,8 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
  * file lives in the device directory of the LED controller, not an individual
  * LED, so it should not confuse users.
  */
-static ssize_t brightness_show(struct device *dev, struct device_attribute *a, char *buf)
+static ssize_t brightness_show(struct device *dev, struct device_attribute *a,
+			       char *buf)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct omnia_leds *leds = i2c_get_clientdata(client);
@@ -165,8 +169,8 @@ static ssize_t brightness_show(struct device *dev, struct device_attribute *a, c
 	return sprintf(buf, "%d\n", ret);
 }
 
-static ssize_t brightness_store(struct device *dev, struct device_attribute *a, const char *buf,
-				size_t count)
+static ssize_t brightness_store(struct device *dev, struct device_attribute *a,
+				const char *buf, size_t count)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct omnia_leds *leds = i2c_get_clientdata(client);
@@ -180,7 +184,8 @@ static ssize_t brightness_store(struct device *dev, struct device_attribute *a,
 		return -EINVAL;
 
 	mutex_lock(&leds->lock);
-	ret = i2c_smbus_write_byte_data(client, CMD_LED_SET_BRIGHTNESS, (u8) brightness);
+	ret = i2c_smbus_write_byte_data(client, CMD_LED_SET_BRIGHTNESS,
+					(u8)brightness);
 	mutex_unlock(&leds->lock);
 
 	if (ret < 0)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH leds 3/5] leds: turris-omnia: fix checkpatch warning
  2020-10-30  2:39 [PATCH leds 1/5] leds: turris-omnia: use constants instead of macros for color command Marek Behún
  2020-10-30  2:39 ` [PATCH leds 2/5] leds: turris-omnia: wrap to 80 columns Marek Behún
@ 2020-10-30  2:39 ` Marek Behún
  2020-10-30  2:39 ` [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now Marek Behún
  2020-10-30  2:39 ` [PATCH leds 5/5] leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI Marek Behún
  3 siblings, 0 replies; 10+ messages in thread
From: Marek Behún @ 2020-10-30  2:39 UTC (permalink / raw)
  To: linux-leds; +Cc: Dan Murphy, Pavel Machek, Marek Behún

Use kstrtoul instead of sscanf to satisfy checkpatch.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/leds/leds-turris-omnia.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index 096ed7b81957..c0b4e1e0e945 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -174,10 +174,10 @@ static ssize_t brightness_store(struct device *dev, struct device_attribute *a,
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct omnia_leds *leds = i2c_get_clientdata(client);
-	unsigned int brightness;
+	unsigned long brightness;
 	int ret;
 
-	if (sscanf(buf, "%u", &brightness) != 1)
+	if (kstrtoul(buf, 10, &brightness))
 		return -EINVAL;
 
 	if (brightness > 100)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now
  2020-10-30  2:39 [PATCH leds 1/5] leds: turris-omnia: use constants instead of macros for color command Marek Behún
  2020-10-30  2:39 ` [PATCH leds 2/5] leds: turris-omnia: wrap to 80 columns Marek Behún
  2020-10-30  2:39 ` [PATCH leds 3/5] leds: turris-omnia: fix checkpatch warning Marek Behún
@ 2020-10-30  2:39 ` Marek Behún
  2020-10-30 13:08   ` Dan Murphy
  2020-10-30  2:39 ` [PATCH leds 5/5] leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI Marek Behún
  3 siblings, 1 reply; 10+ messages in thread
From: Marek Behún @ 2020-10-30  2:39 UTC (permalink / raw)
  To: linux-leds
  Cc: Dan Murphy, Pavel Machek, Marek Behún, devicetree, robh+dt

Commit 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
disallows LED_COLOR_ID_MULTI for now, and instead LED_COLOR_ID_RGB
should be used. Fix this is leds-class-multicolor binding.

After we have some usecases for non-RGB multicolor LEDs, this can be
changed.

Signed-off-by: Marek Behún <kabel@kernel.org>
Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
Cc: devicetree@vger.kernel.org
Cc: robh+dt@kernel.org
---
 .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml     | 4 ++--
 .../devicetree/bindings/leds/leds-class-multicolor.yaml       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
index fe7fa25877fd..2015db9b7618 100644
--- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
+++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
@@ -73,14 +73,14 @@ examples:
                  * LEDs.
                  */
                 reg = <0>;
-                color = <LED_COLOR_ID_MULTI>;
+                color = <LED_COLOR_ID_RGB>;
                 function = LED_FUNCTION_POWER;
                 linux,default-trigger = "heartbeat";
             };
 
             multi-led@a {
                 reg = <0xa>;
-                color = <LED_COLOR_ID_MULTI>;
+                color = <LED_COLOR_ID_RGB>;
                 function = LED_FUNCTION_INDICATOR;
                 function-enumerator = <1>;
             };
diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
index b1a53f054b89..9faa3609a6bb 100644
--- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
@@ -25,10 +25,10 @@ patternProperties:
     description: Represents the LEDs that are to be grouped.
     properties:
       color:
-        const: 8  # LED_COLOR_ID_MULTI
+        const: 9  # LED_COLOR_ID_RGB
         description: |
           For multicolor LED support this property should be defined as
-          LED_COLOR_ID_MULTI which can be found in include/linux/leds/common.h.
+          LED_COLOR_ID_RGB which can be found in include/linux/leds/common.h.
 
     $ref: "common.yaml#"
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH leds 5/5] leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI
  2020-10-30  2:39 [PATCH leds 1/5] leds: turris-omnia: use constants instead of macros for color command Marek Behún
                   ` (2 preceding siblings ...)
  2020-10-30  2:39 ` [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now Marek Behún
@ 2020-10-30  2:39 ` Marek Behún
  2020-11-25 12:25   ` Pavel Machek
  3 siblings, 1 reply; 10+ messages in thread
From: Marek Behún @ 2020-10-30  2:39 UTC (permalink / raw)
  To: linux-leds; +Cc: Dan Murphy, Pavel Machek, Marek Behún

LED core does not allow LED_COLOR_ID_MULTI for now and instead for RGB
LEDs prefers LED_COLOR_ID_RGB.

Signed-off-by: Marek Behún <kabel@kernel.org>
Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
---
 drivers/leds/leds-turris-omnia.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index c0b4e1e0e945..7b2f4d0ae3fe 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -90,9 +90,9 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
 	}
 
 	ret = of_property_read_u32(np, "color", &color);
-	if (ret || color != LED_COLOR_ID_MULTI) {
+	if (ret || color != LED_COLOR_ID_RGB) {
 		dev_warn(dev,
-			 "Node %pOF: must contain 'color' property with value LED_COLOR_ID_MULTI\n",
+			 "Node %pOF: must contain 'color' property with value LED_COLOR_ID_RGB\n",
 			 np);
 		return 0;
 	}
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now
  2020-10-30  2:39 ` [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now Marek Behún
@ 2020-10-30 13:08   ` Dan Murphy
  2020-10-30 21:46     ` Marek Behún
  2020-11-04 21:55     ` Rob Herring
  0 siblings, 2 replies; 10+ messages in thread
From: Dan Murphy @ 2020-10-30 13:08 UTC (permalink / raw)
  To: Marek Behún, linux-leds; +Cc: Pavel Machek, devicetree, robh+dt

Marek

On 10/29/20 9:39 PM, Marek Behún wrote:
> Commit 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
> disallows LED_COLOR_ID_MULTI for now, and instead LED_COLOR_ID_RGB
> should be used. Fix this is leds-class-multicolor binding.
>
> After we have some usecases for non-RGB multicolor LEDs, this can be
> changed.
>
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
> Cc: devicetree@vger.kernel.org
> Cc: robh+dt@kernel.org
> ---
>   .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml     | 4 ++--
>   .../devicetree/bindings/leds/leds-class-multicolor.yaml       | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> index fe7fa25877fd..2015db9b7618 100644
> --- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> +++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> @@ -73,14 +73,14 @@ examples:
>                    * LEDs.
>                    */
>                   reg = <0>;
> -                color = <LED_COLOR_ID_MULTI>;
> +                color = <LED_COLOR_ID_RGB>;
>                   function = LED_FUNCTION_POWER;
>                   linux,default-trigger = "heartbeat";
>               };
>   
>               multi-led@a {
>                   reg = <0xa>;
> -                color = <LED_COLOR_ID_MULTI>;
> +                color = <LED_COLOR_ID_RGB>;
>                   function = LED_FUNCTION_INDICATOR;
>                   function-enumerator = <1>;
>               };
> diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
> index b1a53f054b89..9faa3609a6bb 100644
> --- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml

Why are you resubmitting the multicolor.yaml?

https://lore.kernel.org/patchwork/patch/1320863/

This is waiting on DT review.

Dan


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now
  2020-10-30 13:08   ` Dan Murphy
@ 2020-10-30 21:46     ` Marek Behún
  2020-11-04 21:55     ` Rob Herring
  1 sibling, 0 replies; 10+ messages in thread
From: Marek Behún @ 2020-10-30 21:46 UTC (permalink / raw)
  To: Dan Murphy; +Cc: linux-leds, Pavel Machek, devicetree, robh+dt

On Fri, 30 Oct 2020 08:08:01 -0500
Dan Murphy <dmurphy@ti.com> wrote:

> Why are you resubmitting the multicolor.yaml?
> 
> https://lore.kernel.org/patchwork/patch/1320863/
> 
> This is waiting on DT review.
> 
> Dan
> 

I must have overlooked that patch, sorry.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now
  2020-10-30 13:08   ` Dan Murphy
  2020-10-30 21:46     ` Marek Behún
@ 2020-11-04 21:55     ` Rob Herring
  2020-11-04 21:58       ` Dan Murphy
  1 sibling, 1 reply; 10+ messages in thread
From: Rob Herring @ 2020-11-04 21:55 UTC (permalink / raw)
  To: Dan Murphy; +Cc: Marek Behún, linux-leds, Pavel Machek, devicetree

On Fri, Oct 30, 2020 at 08:08:01AM -0500, Dan Murphy wrote:
> Marek
> 
> On 10/29/20 9:39 PM, Marek Behún wrote:
> > Commit 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
> > disallows LED_COLOR_ID_MULTI for now, and instead LED_COLOR_ID_RGB
> > should be used. Fix this is leds-class-multicolor binding.
> > 
> > After we have some usecases for non-RGB multicolor LEDs, this can be
> > changed.
> > 
> > Signed-off-by: Marek Behún <kabel@kernel.org>
> > Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
> > Cc: devicetree@vger.kernel.org
> > Cc: robh+dt@kernel.org
> > ---
> >   .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml     | 4 ++--
> >   .../devicetree/bindings/leds/leds-class-multicolor.yaml       | 4 ++--
> >   2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> > index fe7fa25877fd..2015db9b7618 100644
> > --- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> > +++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> > @@ -73,14 +73,14 @@ examples:
> >                    * LEDs.
> >                    */
> >                   reg = <0>;
> > -                color = <LED_COLOR_ID_MULTI>;
> > +                color = <LED_COLOR_ID_RGB>;
> >                   function = LED_FUNCTION_POWER;
> >                   linux,default-trigger = "heartbeat";
> >               };
> >               multi-led@a {
> >                   reg = <0xa>;
> > -                color = <LED_COLOR_ID_MULTI>;
> > +                color = <LED_COLOR_ID_RGB>;
> >                   function = LED_FUNCTION_INDICATOR;
> >                   function-enumerator = <1>;
> >               };
> > diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
> > index b1a53f054b89..9faa3609a6bb 100644
> > --- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
> > +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
> 
> Why are you resubmitting the multicolor.yaml?
> 
> https://lore.kernel.org/patchwork/patch/1320863/
> 
> This is waiting on DT review.

I'm expecting another version as you commented on it.

Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now
  2020-11-04 21:55     ` Rob Herring
@ 2020-11-04 21:58       ` Dan Murphy
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Murphy @ 2020-11-04 21:58 UTC (permalink / raw)
  To: Rob Herring; +Cc: Marek Behún, linux-leds, Pavel Machek, devicetree

Rob

On 11/4/20 3:55 PM, Rob Herring wrote:
> On Fri, Oct 30, 2020 at 08:08:01AM -0500, Dan Murphy wrote:
>> Marek
>>
>> On 10/29/20 9:39 PM, Marek Behún wrote:
>>> Commit 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
>>> disallows LED_COLOR_ID_MULTI for now, and instead LED_COLOR_ID_RGB
>>> should be used. Fix this is leds-class-multicolor binding.
>>>
>>> After we have some usecases for non-RGB multicolor LEDs, this can be
>>> changed.
>>>
>>> Signed-off-by: Marek Behún <kabel@kernel.org>
>>> Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now")
>>> Cc: devicetree@vger.kernel.org
>>> Cc: robh+dt@kernel.org
>>> ---
>>>    .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml     | 4 ++--
>>>    .../devicetree/bindings/leds/leds-class-multicolor.yaml       | 4 ++--
>>>    2 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
>>> index fe7fa25877fd..2015db9b7618 100644
>>> --- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
>>> +++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
>>> @@ -73,14 +73,14 @@ examples:
>>>                     * LEDs.
>>>                     */
>>>                    reg = <0>;
>>> -                color = <LED_COLOR_ID_MULTI>;
>>> +                color = <LED_COLOR_ID_RGB>;
>>>                    function = LED_FUNCTION_POWER;
>>>                    linux,default-trigger = "heartbeat";
>>>                };
>>>                multi-led@a {
>>>                    reg = <0xa>;
>>> -                color = <LED_COLOR_ID_MULTI>;
>>> +                color = <LED_COLOR_ID_RGB>;
>>>                    function = LED_FUNCTION_INDICATOR;
>>>                    function-enumerator = <1>;
>>>                };
>>> diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
>>> index b1a53f054b89..9faa3609a6bb 100644
>>> --- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
>>> +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
>> Why are you resubmitting the multicolor.yaml?
>>
>> https://lore.kernel.org/patchwork/patch/1320863/
>>
>> This is waiting on DT review.
> I'm expecting another version as you commented on it.

Yes you applied v2

https://www.spinics.net/lists/devicetree/msg384974.html

Dan

> Rob

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH leds 5/5] leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI
  2020-10-30  2:39 ` [PATCH leds 5/5] leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI Marek Behún
@ 2020-11-25 12:25   ` Pavel Machek
  0 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2020-11-25 12:25 UTC (permalink / raw)
  To: Marek Behún; +Cc: linux-leds, Dan Murphy

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

Hi!

> LED core does not allow LED_COLOR_ID_MULTI for now and instead for RGB
> LEDs prefers LED_COLOR_ID_RGB.
> 
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for
> now")

Thanks for patches. I have applied all but 4/, that is for Rob I
guess.

Best regards,
								Pavel
								
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-25 12:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30  2:39 [PATCH leds 1/5] leds: turris-omnia: use constants instead of macros for color command Marek Behún
2020-10-30  2:39 ` [PATCH leds 2/5] leds: turris-omnia: wrap to 80 columns Marek Behún
2020-10-30  2:39 ` [PATCH leds 3/5] leds: turris-omnia: fix checkpatch warning Marek Behún
2020-10-30  2:39 ` [PATCH leds 4/5] dt-bindings: leds: leds-class-multicolor: use LED_COLOR_ID_RGB for now Marek Behún
2020-10-30 13:08   ` Dan Murphy
2020-10-30 21:46     ` Marek Behún
2020-11-04 21:55     ` Rob Herring
2020-11-04 21:58       ` Dan Murphy
2020-10-30  2:39 ` [PATCH leds 5/5] leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI Marek Behún
2020-11-25 12:25   ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.