Re: [RFC PATCH 05/11] i2c: core: Avoid config node enumeration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/05/2024 00:51, Krishna Yarlagadda wrote:
> Add "config" as a common node to add device configuration settings and
> other data. This child node should not be treated as a device.
> Skip "config" child node during i2c device registration.
> 
> Signed-off-by: Krishna Yarlagadda <kyarlagadda@xxxxxxxxxx>
> ---
>  drivers/i2c/i2c-core-of.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
> index a6c407d36800..f50206c6c4d6 100644
> --- a/drivers/i2c/i2c-core-of.c
> +++ b/drivers/i2c/i2c-core-of.c
> @@ -98,6 +98,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
>  		bus = of_node_get(adap->dev.of_node);
>  
>  	for_each_available_child_of_node(bus, node) {
> +		if (!strcmp(node->name, "config"))
> +			continue;

NAK

All children are devices (they have unit addresses). Do not introduce
some another, parallel addressing.

Best regards,
Krzysztof





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux