Linux LED subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] Additional fixes for "Support for Samsung S2MU005 PMIC and its sub-devices"
@ 2026-06-15 20:26 Kaustabh Chakraborty
  2026-06-15 20:26 ` [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties Kaustabh Chakraborty
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kaustabh Chakraborty @ 2026-06-15 20:26 UTC (permalink / raw)
  To: André Draszik, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds,
	Kaustabh Chakraborty, Krzysztof Kozlowski

This series is a result of discussions from [1] and comments spawned
under it. When this was being discussed, a thread from v6, the v7 was
already posted in the list. The fixes were scheduled for v8, but the
concerned patches were already merged.

And unfortunately, I as per my plans was out-of-office for vacation, so
I couldn't follow up immediately. Sorry for that.

I understand that as the kernel is nearing the v7.1 release, and its
following merge window for v7.2-rc1, the maintainers would be busier
than usual. Apologies again for disrupting any normal procedures. But if
it makes to v7.2-rc1, along with the original series, that would be
nice.

This series has two distinct fixes: (a) to reorder the properties, and
(b) to remove the compatible node. The latter needs driver intervention,
thus this is also posted to the LED maintainers (Lee, ... et al?)

So, the following patches can independently go through different trees:
(a) patch #1, goes through devicetree tree
(b) patch #2 and #3, go through leds tree

[1] https://lore.kernel.org/all/20260515-justly-recite-6028f4bfb24a@spud

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
Kaustabh Chakraborty (3):
      dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties
      dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node
      leds: rgb: s2m: use multi-led node of mfd as source node

 .../bindings/mfd/samsung,s2mu005-pmic.yaml         | 25 ++++++++--------------
 drivers/leds/rgb/leds-s2m-rgb.c                    | 13 ++++++-----
 2 files changed, 15 insertions(+), 23 deletions(-)
---
base-commit: 8d6dbbbe3ba62de0a63e962ee004afb848c8e3ac
change-id: 20260616-s2mu005-pmic-supplement-82dcef999c8a

Best regards,
--  
Kaustabh Chakraborty <kauschluss@disroot.org>


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

* [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties
  2026-06-15 20:26 [PATCH 0/3] Additional fixes for "Support for Samsung S2MU005 PMIC and its sub-devices" Kaustabh Chakraborty
@ 2026-06-15 20:26 ` Kaustabh Chakraborty
  2026-06-16  4:14   ` Krzysztof Kozlowski
  2026-06-15 20:26 ` [PATCH 2/3] dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node Kaustabh Chakraborty
  2026-06-15 20:26 ` [PATCH 3/3] leds: rgb: s2m: use multi-led node of mfd as source node Kaustabh Chakraborty
  2 siblings, 1 reply; 8+ messages in thread
From: Kaustabh Chakraborty @ 2026-06-15 20:26 UTC (permalink / raw)
  To: André Draszik, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds,
	Kaustabh Chakraborty, Krzysztof Kozlowski

As per convention, and as also reiterated by maintainers [1], the
properties in schema is to be ordered similar to how its done in
devicetree sources; starting from compatible and reg. Re-order the
properties in this schema accordingly.

Link: https://lore.kernel.org/all/0240eb13-6c56-4879-8db7-b990a220a78f@kernel.org [1]
Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 .../devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml        | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
index aff68c035b38e..8354422e39b1e 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
@@ -21,14 +21,17 @@ properties:
   compatible:
     const: samsung,s2mu005-pmic
 
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
   flash:
     $ref: /schemas/leds/samsung,s2mu005-flash.yaml#
     description:
       Child node describing flash LEDs.
 
-  interrupts:
-    maxItems: 1
-
   muic:
     $ref: /schemas/extcon/samsung,s2mu005-muic.yaml#
     description:
@@ -49,9 +52,6 @@ properties:
 
     unevaluatedProperties: false
 
-  reg:
-    maxItems: 1
-
 required:
   - compatible
   - reg

-- 
2.53.0


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

* [PATCH 2/3] dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node
  2026-06-15 20:26 [PATCH 0/3] Additional fixes for "Support for Samsung S2MU005 PMIC and its sub-devices" Kaustabh Chakraborty
  2026-06-15 20:26 ` [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties Kaustabh Chakraborty
@ 2026-06-15 20:26 ` Kaustabh Chakraborty
  2026-06-16  4:15   ` Krzysztof Kozlowski
  2026-06-15 20:26 ` [PATCH 3/3] leds: rgb: s2m: use multi-led node of mfd as source node Kaustabh Chakraborty
  2 siblings, 1 reply; 8+ messages in thread
From: Kaustabh Chakraborty @ 2026-06-15 20:26 UTC (permalink / raw)
  To: André Draszik, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds,
	Kaustabh Chakraborty, Krzysztof Kozlowski

The multi-led node is very trivial in description and also has no
sub-nodes. A compatible string property for such nodes is not preferred
by upstream. Remove said node from the schema. While at it, also add a
description following its other sibling nodes.

Link: https://lore.kernel.org/all/d2f4cb7d-5c3e-4b9a-86ca-04262cbb9775@kernel.org
Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 .../devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml       | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
index 8354422e39b1e..f62fe7a05147e 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
@@ -38,17 +38,10 @@ properties:
       Child node describing MUIC device.
 
   multi-led:
-    type: object
+    $ref: /schemas/leds/leds-class-multicolor.yaml#
 
-    allOf:
-      - $ref: /schemas/leds/leds-class-multicolor.yaml#
-
-    properties:
-      compatible:
-        const: samsung,s2mu005-rgb
-
-    required:
-      - compatible
+    description:
+      Child node describing the RGB status LED.
 
     unevaluatedProperties: false
 

-- 
2.53.0


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

* [PATCH 3/3] leds: rgb: s2m: use multi-led node of mfd as source node
  2026-06-15 20:26 [PATCH 0/3] Additional fixes for "Support for Samsung S2MU005 PMIC and its sub-devices" Kaustabh Chakraborty
  2026-06-15 20:26 ` [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties Kaustabh Chakraborty
  2026-06-15 20:26 ` [PATCH 2/3] dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node Kaustabh Chakraborty
@ 2026-06-15 20:26 ` Kaustabh Chakraborty
  2 siblings, 0 replies; 8+ messages in thread
From: Kaustabh Chakraborty @ 2026-06-15 20:26 UTC (permalink / raw)
  To: André Draszik, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds,
	Kaustabh Chakraborty

With the provided compatible string, the driver is able to use the
respective node to initialize following the properties in said node.

However, the compatible node is removed from the devicetree schema.
Follow the same in the driver. The soruce node must be, as per schema, a
sub-node named "multi-led" in the parent MFD node. Initialize the LED
driver into the sub-system by fetching it from the parent node.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 drivers/leds/rgb/leds-s2m-rgb.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/leds/rgb/leds-s2m-rgb.c b/drivers/leds/rgb/leds-s2m-rgb.c
index d239f54eee901..aa7e739213568 100644
--- a/drivers/leds/rgb/leds-s2m-rgb.c
+++ b/drivers/leds/rgb/leds-s2m-rgb.c
@@ -366,6 +366,7 @@ static int s2m_rgb_probe(struct platform_device *pdev)
 	struct sec_pmic_dev *pmic_drvdata = dev_get_drvdata(dev->parent);
 	struct s2m_rgb *rgb;
 	struct led_init_data init_data = {};
+	struct device_node *multi_led_node __free(device_node) = NULL;
 	int ret;
 
 	rgb = devm_kzalloc(dev, sizeof(*rgb), GFP_KERNEL);
@@ -392,7 +393,11 @@ static int s2m_rgb_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "failed to create mutex lock\n");
 
-	init_data.fwnode = of_fwnode_handle(dev->of_node);
+	multi_led_node = of_get_child_by_name(dev->parent->of_node, "multi-led");
+	if (!multi_led_node)
+		return dev_err_probe(dev, -ENODEV, "RGB LED node required but not found\n");
+
+	init_data.fwnode = of_fwnode_handle(multi_led_node);
 	ret = devm_led_classdev_multicolor_register_ext(dev, &rgb->mc, &init_data);
 	if (ret)
 		return dev_err_probe(dev, ret, "failed to create LED device\n");
@@ -406,12 +411,6 @@ static const struct platform_device_id s2m_rgb_id_table[] = {
 };
 MODULE_DEVICE_TABLE(platform, s2m_rgb_id_table);
 
-static const struct of_device_id s2m_rgb_of_match_table[] = {
-	{ .compatible = "samsung,s2mu005-rgb", .data = (void *)S2MU005 },
-	{ /* sentinel */ },
-};
-MODULE_DEVICE_TABLE(of, s2m_rgb_of_match_table);
-
 static struct platform_driver s2m_rgb_driver = {
 	.driver = {
 		.name = "s2m-rgb",

-- 
2.53.0


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

* Re: [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties
  2026-06-15 20:26 ` [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties Kaustabh Chakraborty
@ 2026-06-16  4:14   ` Krzysztof Kozlowski
  2026-06-16  6:13     ` Kaustabh Chakraborty
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-16  4:14 UTC (permalink / raw)
  To: Kaustabh Chakraborty, André Draszik, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds

On 15/06/2026 22:26, Kaustabh Chakraborty wrote:
> As per convention, and as also reiterated by maintainers [1], the
> properties in schema is to be ordered similar to how its done in
> devicetree sources; starting from compatible and reg. Re-order the
> properties in this schema accordingly.
> 
> Link: https://lore.kernel.org/all/0240eb13-6c56-4879-8db7-b990a220a78f@kernel.org [1]
> Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>

Honestly, nah... I commented on v6 so you change the patch. But you were
posting this huge patchset faster than we can review (v6 and v7 posted
on the same day!), so v7 got applied where you did not implement the
comments. One small posting per 24h. One big posting per 2-3 days, not
more often.

There is little benefit in fixing this single file.

Best regards,
Krzysztof

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

* Re: [PATCH 2/3] dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node
  2026-06-15 20:26 ` [PATCH 2/3] dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node Kaustabh Chakraborty
@ 2026-06-16  4:15   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-16  4:15 UTC (permalink / raw)
  To: Kaustabh Chakraborty, André Draszik, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds

On 15/06/2026 22:26, Kaustabh Chakraborty wrote:
> The multi-led node is very trivial in description and also has no
> sub-nodes. A compatible string property for such nodes is not preferred
> by upstream. Remove said node from the schema. While at it, also add a
> description following its other sibling nodes.
> 
> Link: https://lore.kernel.org/all/d2f4cb7d-5c3e-4b9a-86ca-04262cbb9775@kernel.org
> Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
>  .../devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml       | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
> index 8354422e39b1e..f62fe7a05147e 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
> @@ -38,17 +38,10 @@ properties:
>        Child node describing MUIC device.
>  
>    multi-led:
> -    type: object
> +    $ref: /schemas/leds/leds-class-multicolor.yaml#
>  
> -    allOf:
> -      - $ref: /schemas/leds/leds-class-multicolor.yaml#
> -
> -    properties:
> -      compatible:
> -        const: samsung,s2mu005-rgb

It's already accepted and used in two drivers, leave it.

Best regards,
Krzysztof

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

* Re: [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties
  2026-06-16  4:14   ` Krzysztof Kozlowski
@ 2026-06-16  6:13     ` Kaustabh Chakraborty
  2026-06-16  8:05       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Kaustabh Chakraborty @ 2026-06-16  6:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kaustabh Chakraborty, André Draszik,
	Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds

On 2026-06-16 06:14 +02:00, Krzysztof Kozlowski wrote:
> On 15/06/2026 22:26, Kaustabh Chakraborty wrote:
>> As per convention, and as also reiterated by maintainers [1], the
>> properties in schema is to be ordered similar to how its done in
>> devicetree sources; starting from compatible and reg. Re-order the
>> properties in this schema accordingly.
>> 
>> Link: https://lore.kernel.org/all/0240eb13-6c56-4879-8db7-b990a220a78f@kernel.org [1]
>> Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>
> Honestly, nah... I commented on v6 so you change the patch. But you were
> posting this huge patchset faster than we can review (v6 and v7 posted
> on the same day!), so v7 got applied where you did not implement the
> comments. One small posting per 24h. One big posting per 2-3 days, not
> more often.

Fair, there were a lot of sashiko reviews, so I quickly addressed most
of them and send a v7. It is indeed a failure on my part. :(

> There is little benefit in fixing this single file.

Fine, I drop the series. I'd assumed it'd be at least fine to have it
before a stable release.

> Best regards,
> Krzysztof


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

* Re: [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties
  2026-06-16  6:13     ` Kaustabh Chakraborty
@ 2026-06-16  8:05       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-16  8:05 UTC (permalink / raw)
  To: Kaustabh Chakraborty, André Draszik, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Pavel Machek
  Cc: linux-kernel, linux-samsung-soc, devicetree, linux-leds

On 16/06/2026 08:13, Kaustabh Chakraborty wrote:
> On 2026-06-16 06:14 +02:00, Krzysztof Kozlowski wrote:
>> On 15/06/2026 22:26, Kaustabh Chakraborty wrote:
>>> As per convention, and as also reiterated by maintainers [1], the
>>> properties in schema is to be ordered similar to how its done in
>>> devicetree sources; starting from compatible and reg. Re-order the
>>> properties in this schema accordingly.
>>>
>>> Link: https://lore.kernel.org/all/0240eb13-6c56-4879-8db7-b990a220a78f@kernel.org [1]
>>> Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
>>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>>
>> Honestly, nah... I commented on v6 so you change the patch. But you were
>> posting this huge patchset faster than we can review (v6 and v7 posted
>> on the same day!), so v7 got applied where you did not implement the
>> comments. One small posting per 24h. One big posting per 2-3 days, not
>> more often.
> 
> Fair, there were a lot of sashiko reviews, so I quickly addressed most
> of them and send a v7. It is indeed a failure on my part. :(
> 
>> There is little benefit in fixing this single file.
> 
> Fine, I drop the series. I'd assumed it'd be at least fine to have it
> before a stable release.

I would ack such patch if you do it rather for multiple files in MFD
bindings, e.g. all Samsung PMICs or even all files. Otherwise it feels a
bit too much of a churn doing this file by file.

Best regards,
Krzysztof

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

end of thread, other threads:[~2026-06-16  8:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 20:26 [PATCH 0/3] Additional fixes for "Support for Samsung S2MU005 PMIC and its sub-devices" Kaustabh Chakraborty
2026-06-15 20:26 ` [PATCH 1/3] dt-bindings: mfd: s2mu005-pmic: reorder reg and interrupts properties Kaustabh Chakraborty
2026-06-16  4:14   ` Krzysztof Kozlowski
2026-06-16  6:13     ` Kaustabh Chakraborty
2026-06-16  8:05       ` Krzysztof Kozlowski
2026-06-15 20:26 ` [PATCH 2/3] dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node Kaustabh Chakraborty
2026-06-16  4:15   ` Krzysztof Kozlowski
2026-06-15 20:26 ` [PATCH 3/3] leds: rgb: s2m: use multi-led node of mfd as source node Kaustabh Chakraborty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox