leds: Introduce and use fwnode_get_child_node_count()
Subsystems (7)
Andy Shevchenko
reviewercover leds: Introduce and use fwnode_get_child_node_count()
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
Andy Shevchenko (4):
device property: Split fwnode_get_child_node_count()
leds: pwm-multicolor: Use fwnode_get_child_node_count()
leds: ncp5623: Use fwnode_get_child_node_count()
usb: typec: tcpm: Use fwnode_get_child_node_count()
drivers/base/property.c | 12 ++++++------ drivers/leds/rgb/leds-ncp5623.c | 5 ++--- drivers/leds/rgb/leds-pwm-multicolor.c | 7 +++---- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- include/linux/property.h | 7 ++++++- 5 files changed, 19 insertions(+), 18 deletions(-)
Signature · 1 line
2.47.2
Andy Shevchenko
reviewerPATCH 1/4 device property: Split fwnode_get_child_node_count()
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. This also makes the fwnode and device property API more symmetrical with the rest.
--- drivers/base/property.c | 12 ++++++------ include/linux/property.h | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-)
drivers/base/property.c +6 -6
@@ -928,22 +928,22 @@ bool fwnode_device_is_available(const struct fwnode_handle *fwnode)EXPORT_SYMBOL_GPL (fwnode_device_is_available);/** -* device_get_child_node_count - return the number of child nodes for device -* @dev: Device to count the child nodes for +* fwnode_get_child_node_count - return the number of child nodes for a given firmware node +* @fwnode: Pointer to the parent firmware node * -* Return: the number of child nodes for a given device. +* Return: the number of child nodes for a given firmware node. */ -unsigned int device_get_child_node_count (const struct device *dev) +unsigned int fwnode_get_child_node_count (const struct fwnode_handle *fwnode) {struct fwnode_handle *child;unsigned int count =0 ; -device_for_each_child_node (dev, child) +fwnode_for_each_child_node (fwnode, child) count++;return count; } -EXPORT_SYMBOL_GPL (device_get_child_node_count); +EXPORT_SYMBOL_GPL (fwnode_get_child_node_count);bool device_dma_supported (const struct device *dev) {
include/linux/property.h +6 -1
@@ -208,7 +208,12 @@ DEFINE_FREE(fwnode_handle, struct fwnode_handle *, fwnode_handle_put(_T))int fwnode_irq_get (const struct fwnode_handle *fwnode,unsigned int index);int fwnode_irq_get_byname (const struct fwnode_handle *fwnode,const char *name); -unsigned int device_get_child_node_count (const struct device *dev); +unsigned int fwnode_get_child_node_count (const struct fwnode_handle *fwnode); + +static inline unsigned int device_get_child_node_count (const struct device *dev) +{ +return fwnode_get_child_node_count (dev_fwnode (dev)); +}static inline int device_property_read_u8 (const struct device *dev,const char *propname,u8 *val)
Signature · 1 line
2.47.2
Re: [PATCH v1 1/4] device property: Split fwnode_get_child_node_count()
Quoted 5 lines · On Mon, 10 Mar 2025 16:54:51 +0200 Andy Shevchenko…
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. This also makes the fwnode and device property API more symmetrical with the rest.
Signed-off-by Andy Shevchenko <[email protected]>
Re: [PATCH 1/4] device property: Split fwnode_get_child_node_count()
In reply to Andy ShevchenkoQuoted 2 lines
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. …
Regards,
Markus
Greg Kroah-Hartman
maintainerRe: [PATCH 1/4] device property: Split fwnode_get_child_node_count()
Quoted 9 lines · Markus Elfring
Quoted 2 lines
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. …
Regards,
Markus
Hi,
This is the semi-friendly patch-bot of Greg Kroah-Hartman.
Markus, you seem to have sent a nonsensical or otherwise pointless review comment to a patch submission on a Linux kernel developer mailing list. I strongly suggest that you not do this anymore. Please do not bother developers who are actively working to produce patches and features with comments that, in the end, are a waste of time.
Patch submitter, please ignore Markus's suggestion; you do not need to follow it at all. The person/bot/AI that sent it is being ignored by almost all Linux kernel maintainers for having a persistent pattern of behavior of producing distracting and pointless commentary, and inability to adapt to feedback. Please feel free to also ignore emails from them.
thanks,
greg k-h's patch email bot
Re: [PATCH v1 1/4] device property: Split fwnode_get_child_node_count()
In reply to Andy ShevchenkoQuoted 5 lines · Andy Shevchenko
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. This also makes the fwnode and device property API more symmetrical with the rest.
Signed-off-by Andy Shevchenko <[email protected]>
Quoted 58 lines
--- drivers/base/property.c | 12 ++++++------ include/linux/property.h | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-)drivers/base/property.c +6
-6@@ -928,22 +928,22 @@ bool fwnode_device_is_available(const struct fwnode_handle *fwnode)EXPORT_SYMBOL_GPL (fwnode_device_is_available);/** -* device_get_child_node_count - return the number of child nodes for device -* @dev: Device to count the child nodes for +* fwnode_get_child_node_count - return the number of child nodes for a given firmware node +* @fwnode: Pointer to the parent firmware node * -* Return: the number of child nodes for a given device. +* Return: the number of child nodes for a given firmware node. */ -unsigned int device_get_child_node_count (const struct device *dev) +unsigned int fwnode_get_child_node_count (const struct fwnode_handle *fwnode) {struct fwnode_handle *child;unsigned int count =0 ; -device_for_each_child_node (dev, child) +fwnode_for_each_child_node (fwnode, child) count++;return count; } -EXPORT_SYMBOL_GPL (device_get_child_node_count); +EXPORT_SYMBOL_GPL (fwnode_get_child_node_count);bool device_dma_supported (const struct device *dev) {include/linux/property.h +6
-1@@ -208,7 +208,12 @@ DEFINE_FREE(fwnode_handle, struct fwnode_handle *, fwnode_handle_put(_T))int fwnode_irq_get (const struct fwnode_handle *fwnode,unsigned int index);int fwnode_irq_get_byname (const struct fwnode_handle *fwnode,const char *name); -unsigned int device_get_child_node_count (const struct device *dev); +unsigned int fwnode_get_child_node_count (const struct fwnode_handle *fwnode); + +static inline unsigned int device_get_child_node_count (const struct device *dev) +{ +return fwnode_get_child_node_count (dev_fwnode (dev)); +}static inline int device_property_read_u8 (const struct device *dev,const char *propname,u8 *val)Signature · 1 line
2.47.2
Signature · 1 line
heikki
Re: [PATCH v1 1/4] device property: Split fwnode_get_child_node_count()
In reply to Andy ShevchenkoQuoted 5 lines · Andy Shevchenko
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. This also makes the fwnode and device property API more symmetrical with the rest.
Signed-off-by Andy Shevchenko <[email protected]>
Signature · 1 line
Sakari Ailus
Re: [PATCH v1 1/4] device property: Split fwnode_get_child_node_count()
In reply to Andy ShevchenkoQuoted 6 lines · Andy Shevchenko
The new helper is introduced to allow counting the child firmware nodes of their parent without requiring a device to be passed. This also makes the fwnode and device property API more symmetrical with the rest.
Signed-off-by Andy Shevchenko <[email protected]>
Quoted 59 lines
--- drivers/base/property.c | 12 ++++++------ include/linux/property.h | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-)drivers/base/property.c +6
-6@@ -928,22 +928,22 @@ bool fwnode_device_is_available(const struct fwnode_handle *fwnode)EXPORT_SYMBOL_GPL (fwnode_device_is_available);/** -* device_get_child_node_count - return the number of child nodes for device -* @dev: Device to count the child nodes for +* fwnode_get_child_node_count - return the number of child nodes for a given firmware node +* @fwnode: Pointer to the parent firmware node * -* Return: the number of child nodes for a given device. +* Return: the number of child nodes for a given firmware node. */ -unsigned int device_get_child_node_count (const struct device *dev) +unsigned int fwnode_get_child_node_count (const struct fwnode_handle *fwnode) {struct fwnode_handle *child;unsigned int count =0 ; -device_for_each_child_node (dev, child) +fwnode_for_each_child_node (fwnode, child) count++;return count; } -EXPORT_SYMBOL_GPL (device_get_child_node_count); +EXPORT_SYMBOL_GPL (fwnode_get_child_node_count);bool device_dma_supported (const struct device *dev) {include/linux/property.h +6
-2@@ -208,7 +208,12 @@ DEFINE_FREE(fwnode_handle, struct fwnode_handle *, fwnode_handle_put(_T))int fwnode_irq_get (const struct fwnode_handle *fwnode,unsigned int index);int fwnode_irq_get_byname (const struct fwnode_handle *fwnode,const char *name); -unsigned int device_get_child_node_count (const struct device *dev); +unsigned int fwnode_get_child_node_count (const struct fwnode_handle *fwnode); + +static inline unsigned int device_get_child_node_count (const struct device *dev) +{ +return fwnode_get_child_node_count (dev_fwnode (dev)); +}static inline int device_property_read_u8 (const struct device *dev,const char *propname,u8 *val) --2.47.2
Andy Shevchenko
reviewerPATCH 2/4 leds: pwm-multicolor: Use fwnode_get_child_node_count()
In reply to Andy ShevchenkoSince fwnode_get_child_node_count() was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.
--- drivers/leds/rgb/leds-pwm-multicolor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/leds/rgb/leds-pwm-multicolor.c +3 -4
@@ -107,12 +107,12 @@ static int iterate_subleds(struct device *dev, struct pwm_mc_led *priv,static int led_pwm_mc_probe (struct platform_device *pdev) { -struct fwnode_handle *mcnode, *fwnode; +struct fwnode_handle *mcnode;struct led_init_data init_data = {};struct led_classdev *cdev;struct mc_subled *subled;struct pwm_mc_led *priv; -int count =0 ; +unsigned int count;int ret =0 ; mcnode =device_get_named_child_node (&pdev->dev,"multi-led" );
@@ -121,8 +121,7 @@ static int led_pwm_mc_probe(struct platform_device *pdev) "expected multi-led node\n");/* count the nodes inside the multi-led node */ -fwnode_for_each_child_node (mcnode, fwnode) - count++; + count =fwnode_get_child_node_count (mcnode); priv =devm_kzalloc (&pdev->dev,struct_size (priv, leds, count),GFP_KERNEL );
Signature · 1 line
2.47.2
Re: [PATCH v1 2/4] leds: pwm-multicolor: Use fwnode_get_child_node_count()
Quoted 4 lines · On Mon, 10 Mar 2025 16:54:52 +0200 Andy Shevchenko…
Since
fwnode_get_child_node_count()was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.Signed-off-by Andy Shevchenko <[email protected]>
Andy Shevchenko
reviewerPATCH 3/4 leds: ncp5623: Use fwnode_get_child_node_count()
In reply to Andy ShevchenkoSince fwnode_get_child_node_count() was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.
--- drivers/leds/rgb/leds-ncp5623.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/leds/rgb/leds-ncp5623.c +2 -3
@@ -155,9 +155,9 @@ static int ncp5623_probe(struct i2c_client *client)struct device *dev = &client->dev;struct fwnode_handle *mc_node, *led_node;struct led_init_data init_data = { }; -int num_subleds =0 ;struct ncp5623 *ncp;struct mc_subled *subled_info; +unsigned int num_subleds;u32 color_index;u32 reg;int ret;
@@ -172,8 +172,7 @@ static int ncp5623_probe(struct i2c_client *client)if (!mc_node)return -EINVAL ; -fwnode_for_each_child_node (mc_node, led_node) - num_subleds++; + num_subleds =fwnode_get_child_node_count (mc_node); subled_info =devm_kcalloc (dev, num_subleds,sizeof (*subled_info),GFP_KERNEL );if (!subled_info) {
Signature · 1 line
2.47.2
Re: [PATCH v1 3/4] leds: ncp5623: Use fwnode_get_child_node_count()
Quoted 13 lines · On Mon, 10 Mar 2025 16:54:53 +0200 Andy Shevchenko…
Since
fwnode_get_child_node_count()was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/leds/rgb/leds-ncp5623.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/leds/rgb/leds-ncp5623.c +0
-0
drivers/leds/rgb/leds-ncp5623.c static int ncp5623_probe(struct i2c_client *client) · line 160
Quoted 7 lines
drivers/leds/rgb/leds-ncp5623.c +1
-1@@ -155,9 +155,9 @@ static int ncp5623_probe(struct i2c_client *client)struct device *dev = &client->dev;struct fwnode_handle *mc_node, *led_node;struct led_init_data init_data = { }; -int num_subleds =0 ;struct ncp5623 *ncp;struct mc_subled *subled_info; +unsigned int num_subleds;
I have no idea what the scheme is for ordering here. My gut feeling would have been to leave it in original location but it's not something I feel strongly about.
Quoted 13 lines
drivers/leds/rgb/leds-ncp5623.c +1
-2u32 color_index;u32 reg;int ret;@@ -172,8 +172,7 @@ static int ncp5623_probe(struct i2c_client *client)if (!mc_node)return -EINVAL ; -fwnode_for_each_child_node (mc_node, led_node) - num_subleds++; + num_subleds =fwnode_get_child_node_count (mc_node); subled_info =devm_kcalloc (dev, num_subleds,sizeof (*subled_info),GFP_KERNEL );if (!subled_info) {
Andy Shevchenko
reviewerRe: [PATCH v1 3/4] leds: ncp5623: Use fwnode_get_child_node_count()
Quoted 2 lines · Jonathan Cameron
On Mon, 10 Mar 2025 16:54:53 +0200
Andy Shevchenko <[email protected]> wrote:
...
Quoted 12 lines
drivers/leds/rgb/leds-ncp5623.c static int ncp5623_probe(struct i2c_client *client) · line 160
Quoted 9 lines
static int
ncp5623_probe(struct i2c_client *client)drivers/leds/rgb/leds-ncp5623.c +1
-1struct device *dev = &client->dev;struct fwnode_handle *mc_node, *led_node;struct led_init_data init_data = { }; -int num_subleds =0 ;struct ncp5623 *ncp;struct mc_subled *subled_info; +unsigned int num_subleds;I have no idea what the scheme is for ordering here. My gut feeling would have been to leave it in original location but it's not something I feel strongly about.
I guess I tried to follow multiple approaches here while moving it:
1) it follows "longer line first";
2) it follows "group the variables of the same type".
I also dunno what was behind the original code, but I think my approach has a benefit as pointed out above.
Quoted 1 line
Reviewed-by Jonathan Cameron <[email protected]>
Thank you!
Quoted 3 lines
Quoted 3 lines
drivers/leds/rgb/leds-ncp5623.c +0
-0u32 color_index;u32 reg;int ret;
Signature · 2 lines
With Best Regards, Andy Shevchenko
Andy Shevchenko
reviewerPATCH 4/4 usb: typec: tcpm: Use fwnode_get_child_node_count()
In reply to Andy ShevchenkoSince fwnode_get_child_node_count() was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.
--- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/usb/typec/tcpm/tcpm.c +2 -4
@@ -7166,7 +7166,7 @@ static void tcpm_fw_get_timings(struct tcpm_port *port, struct fwnode_handle *fwstatic int tcpm_fw_get_caps (struct tcpm_port *port,struct fwnode_handle *fwnode) { -struct fwnode_handle *capabilities, *child, *caps =NULL ; +struct fwnode_handle *capabilities, *caps =NULL ;unsigned int nr_src_pdo, nr_snk_pdo;const char *opmode_str;u32 *src_pdo, *snk_pdo;
@@ -7232,9 +7232,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port, struct fwnode_handle *fwnodeif (!capabilities) { port->pd_count =1 ; }else { -fwnode_for_each_child_node (capabilities, child) - port->pd_count++; - + port->pd_count =fwnode_get_child_node_count (capabilities);if (!port->pd_count) { ret = -ENODATA ; goto put_capabilities;
Signature · 1 line
2.47.2
Re: [PATCH v1 4/4] usb: typec: tcpm: Use fwnode_get_child_node_count()
Quoted 4 lines · On Mon, 10 Mar 2025 16:54:54 +0200 Andy Shevchenko…
Since
fwnode_get_child_node_count()was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.Signed-off-by Andy Shevchenko <[email protected]>
Seems like a nice little series to me!
Jonathan
Quoted 28 lines
--- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/usb/typec/tcpm/tcpm.c +2
-4@@ -7166,7 +7166,7 @@ static void tcpm_fw_get_timings(struct tcpm_port *port, struct fwnode_handle *fwstatic int tcpm_fw_get_caps (struct tcpm_port *port,struct fwnode_handle *fwnode) { -struct fwnode_handle *capabilities, *child, *caps =NULL ; +struct fwnode_handle *capabilities, *caps =NULL ;unsigned int nr_src_pdo, nr_snk_pdo;const char *opmode_str;u32 *src_pdo, *snk_pdo;@@ -7232,9 +7232,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port, struct fwnode_handle *fwnodeif (!capabilities) { port->pd_count =1 ; }else { -fwnode_for_each_child_node (capabilities, child) - port->pd_count++; - + port->pd_count =fwnode_get_child_node_count (capabilities);if (!port->pd_count) { ret = -ENODATA ; goto put_capabilities;
Re: [PATCH v1 4/4] usb: typec: tcpm: Use fwnode_get_child_node_count()
In reply to Andy ShevchenkoQuoted 5 lines · Andy Shevchenko
Since
fwnode_get_child_node_count()was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.Signed-off-by Andy Shevchenko <[email protected]>
Quoted 32 lines
--- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/usb/typec/tcpm/tcpm.c +2
-5@@ -7166,7 +7166,7 @@ static void tcpm_fw_get_timings(struct tcpm_port *port, struct fwnode_handle *fwstatic int tcpm_fw_get_caps (struct tcpm_port *port,struct fwnode_handle *fwnode) { -struct fwnode_handle *capabilities, *child, *caps =NULL ; +struct fwnode_handle *capabilities, *caps =NULL ;unsigned int nr_src_pdo, nr_snk_pdo;const char *opmode_str;u32 *src_pdo, *snk_pdo;@@ -7232,9 +7232,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port, struct fwnode_handle *fwnodeif (!capabilities) { port->pd_count =1 ; }else { -fwnode_for_each_child_node (capabilities, child) - port->pd_count++; - + port->pd_count =fwnode_get_child_node_count (capabilities);if (!port->pd_count) { ret = -ENODATA ; goto put_capabilities; --2.47.2
Re: [PATCH v1 4/4] usb: typec: tcpm: Use fwnode_get_child_node_count()
In reply to Andy ShevchenkoQuoted 4 lines · Andy Shevchenko
Since
fwnode_get_child_node_count()was split from its device property counterpart, we may utilise it in the driver and drop custom implementation.Signed-off-by Andy Shevchenko <[email protected]>
Quoted 30 lines
--- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/usb/typec/tcpm/tcpm.c +2
-4@@ -7166,7 +7166,7 @@ static void tcpm_fw_get_timings(struct tcpm_port *port, struct fwnode_handle *fwstatic int tcpm_fw_get_caps (struct tcpm_port *port,struct fwnode_handle *fwnode) { -struct fwnode_handle *capabilities, *child, *caps =NULL ; +struct fwnode_handle *capabilities, *caps =NULL ;unsigned int nr_src_pdo, nr_snk_pdo;const char *opmode_str;u32 *src_pdo, *snk_pdo;@@ -7232,9 +7232,7 @@ static int tcpm_fw_get_caps(struct tcpm_port *port, struct fwnode_handle *fwnodeif (!capabilities) { port->pd_count =1 ; }else { -fwnode_for_each_child_node (capabilities, child) - port->pd_count++; - + port->pd_count =fwnode_get_child_node_count (capabilities);if (!port->pd_count) { ret = -ENODATA ; goto put_capabilities;Signature · 1 line
2.47.2
Signature · 1 line
heikki
Lee Jones
maintainerQuoted 16 lines · Andy Shevchenko
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
Andy Shevchenko (4):
device property: Splitfwnode_get_child_node_count()
leds: pwm-multicolor: Usefwnode_get_child_node_count()
leds: ncp5623: Usefwnode_get_child_node_count()
usb: typec: tcpm: Usefwnode_get_child_node_count()
Quoted 6 lines
drivers/base/property.c | 12 ++++++------ drivers/leds/rgb/leds-ncp5623.c | 5 ++--- drivers/leds/rgb/leds-pwm-multicolor.c | 7 +++---- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- include/linux/property.h | 7 ++++++- 5 files changed, 19 insertions(+), 18 deletions(-)
What's the proposed merge strategy here Andy?
Signature · 1 line
Lee Jones [李琼斯]
Lee Jones
maintainerQuoted 7 lines · Andy Shevchenko
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
Ah, just seen this.
I'm okay with that, but need Acks for the other patches.
Signature · 1 line
Lee Jones [李琼斯]
Andy Shevchenko
reviewerQuoted 5 lines · Lee Jones
Quoted 3 lines · Andy Shevchenko
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Quoted 8 lines
Quoted 4 lines
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
Ah, just seen this.
I'm okay with that, but need Acks for the other patches.
Right, we need an Ack from Rafael / Greg I suppose?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Lee Jones
maintainerQuoted 16 lines · Andy Shevchenko
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
Andy Shevchenko (4):
device property: Splitfwnode_get_child_node_count()
leds: pwm-multicolor: Usefwnode_get_child_node_count()
leds: ncp5623: Usefwnode_get_child_node_count()
usb: typec: tcpm: Usefwnode_get_child_node_count()
Quoted 6 lines
drivers/base/property.c | 12 ++++++------ drivers/leds/rgb/leds-ncp5623.c | 5 ++--- drivers/leds/rgb/leds-pwm-multicolor.c | 7 +++---- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- include/linux/property.h | 7 ++++++- 5 files changed, 19 insertions(+), 18 deletions(-)
Note to self: This has everything we need. Merge it for v6.16.
Signature · 1 line
Lee Jones [李琼斯]
Lee Jones
maintainerQuoted 18 lines · Lee Jones
Quoted 16 lines · Andy Shevchenko
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
Andy Shevchenko (4):
device property: Splitfwnode_get_child_node_count()
leds: pwm-multicolor: Usefwnode_get_child_node_count()
leds: ncp5623: Usefwnode_get_child_node_count()
usb: typec: tcpm: Usefwnode_get_child_node_count()
Quoted 8 lines
Quoted 6 lines
drivers/base/property.c | 12 ++++++------ drivers/leds/rgb/leds-ncp5623.c | 5 ++--- drivers/leds/rgb/leds-pwm-multicolor.c | 7 +++---- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- include/linux/property.h | 7 ++++++- 5 files changed, 19 insertions(+), 18 deletions(-)Note to self: This has everything we need. Merge it for v6.16.
Submitted for build testing. Will provide a PR once finished.
Note to self: ib-leds-base-usb-6.16
Signature · 1 line
Lee Jones [李琼斯]
Quoted 9 lines · Andy Shevchenko
This series was inspired during review of "Support ROHM BD79124 ADC" [1]. The three conversion patches are the examples of the new API in use.
Since the first two examples of LEDS, in case of posotove response it may be routed via that tree and immutable branch/tag shared with others, e.g., IIO which Matti's series is targeting and might be dependent on. The USB patch can be applied later separately, up to the respective maintainers.
[...]
Applied, thanks!
[1/4] device property: Split fwnode_get_child_node_count()
commit: 1490cbb9dbfd0eabfe45f9b674097aea7e6760fc
[2/4] leds: pwm-multicolor: Use fwnode_get_child_node_count()
commit: 4623cc4e9a5f1b7ad7e6599dfc2a5a4d9d4f5d72
[3/4] leds: ncp5623: Use fwnode_get_child_node_count()
commit: 53762bb44b0659e79a3e3177372e823ec4afcc8a
[4/4] usb: typec: tcpm: Use fwnode_get_child_node_count()
commit: 08ca89e98620c08d68b7e7aed6c9294698e214e1--
Lee Jones [李琼斯]
Lee Jones
maintainer[GIT PULL] Immutable branch between LEDS, Base and USB due for the v6.16 merge window
In reply to Andy ShevchenkoEnjoy!
The following changes since commit 0af2f6be1b4281385b618cb86ad946eded089ac8:
Linux 6.15-rc1 (2025-04-06 13:11:33 -0700)
are available in the Git repository at:
ssh://[email protected]/pub/scm/linux/kernel/git/lee/leds.git tags/ib-leds-base-usb-v6.16
for you to fetch changes up to 08ca89e98620c08d68b7e7aed6c9294698e214e1:
usb: typec: tcpm: Use fwnode_get_child_node_count() (2025-04-10 10:12:28 +0100)
----------------------------------------------------------------
Immutable branch between LEDS, Base and USB due for the v6.16 merge window
----------------------------------------------------------------
Andy Shevchenko (4):
device property: Split fwnode_get_child_node_count()
leds: pwm-multicolor: Use fwnode_get_child_node_count()
leds: ncp5623: Use fwnode_get_child_node_count()
usb: typec: tcpm: Use fwnode_get_child_node_count()
drivers/base/property.c | 12 ++++++------ drivers/leds/rgb/leds-ncp5623.c | 5 ++--- drivers/leds/rgb/leds-pwm-multicolor.c | 7 +++---- drivers/usb/typec/tcpm/tcpm.c | 6 ++---- include/linux/property.h | 7 ++++++- 5 files changed, 19 insertions(+), 18 deletions(-)
Signature · 1 line
Lee Jones [李琼斯]