* [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-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, 0 replies; 5+ 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] 5+ 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-15 20:40 ` sashiko-bot
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; 5+ 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] 5+ 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-15 20:40 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-06-15 20:40 UTC (permalink / raw)
To: Kaustabh Chakraborty; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The commit removes the `compatible` property from the `multi-led` node schema but leaves it in the `examples` section, causing `dt_binding_check` to fail.
--
commit 0e7f716b7cd2059b3923af518e9775e3715e58df
Author: Kaustabh Chakraborty <kauschluss@disroot.org>
dt-bindings: mfd: s2mu005-pmic: drop compatible property for multi-led node
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
> 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
[Severity: Low]
With the compatible property dropped from the schema but unevaluatedProperties
remaining false, will this cause a regression during dt_binding_check?
The examples section in this file still defines the compatible string:
examples:
...
multi-led {
compatible = "samsung,s2mu005-rgb";
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_INDICATOR;
linux,default-trigger = "pattern";
};
Should the compatible string be removed from the multi-led node in the examples
block as well to prevent an unevaluated property error?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260616-s2mu005-pmic-supplement-v1-0-41e84518b711@disroot.org?part=2
^ permalink raw reply [flat|nested] 5+ 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; 5+ 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] 5+ messages in thread