All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of/i2c: check status property for i2c client
@ 2012-11-21  8:57 Bongkyu Kim
  2012-11-21 13:42 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Bongkyu Kim @ 2012-11-21  8:57 UTC (permalink / raw)
  To: grant.likely, rob.herring; +Cc: devicetree-discuss, linux-kernel, Bongkyu Kim

Because of_i2c_register_devices() do not check status property,
all i2c clients are registered.

This patch add checking status property for i2c client.
After this patch, if status property is absent or "okay" or "ok",
i2c client will be registered.

Signed-off-by: Bongkyu Kim <bongkyu.kim@lge.com>
---
 drivers/of/of_i2c.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 3550f3b..2552fc5 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -37,6 +37,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
 
 		dev_dbg(&adap->dev, "of_i2c: register %s\n", node->full_name);
 
+		if (!of_device_is_available(node))
+			continue;
+
 		if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) {
 			dev_err(&adap->dev, "of_i2c: modalias failure on %s\n",
 				node->full_name);
-- 
1.8.0


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

* Re: [PATCH] of/i2c: check status property for i2c client
  2012-11-21  8:57 [PATCH] of/i2c: check status property for i2c client Bongkyu Kim
@ 2012-11-21 13:42 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2012-11-21 13:42 UTC (permalink / raw)
  To: Bongkyu Kim; +Cc: grant.likely, devicetree-discuss, linux-kernel

On 11/21/2012 02:57 AM, Bongkyu Kim wrote:
> Because of_i2c_register_devices() do not check status property,
> all i2c clients are registered.
> 
> This patch add checking status property for i2c client.
> After this patch, if status property is absent or "okay" or "ok",
> i2c client will be registered.
> 
> Signed-off-by: Bongkyu Kim <bongkyu.kim@lge.com>

Applied.

> ---
>  drivers/of/of_i2c.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
> index 3550f3b..2552fc5 100644
> --- a/drivers/of/of_i2c.c
> +++ b/drivers/of/of_i2c.c
> @@ -37,6 +37,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
>  
>  		dev_dbg(&adap->dev, "of_i2c: register %s\n", node->full_name);
>  
> +		if (!of_device_is_available(node))
> +			continue;
> +
>  		if (of_modalias_node(node, info.type, sizeof(info.type)) < 0) {
>  			dev_err(&adap->dev, "of_i2c: modalias failure on %s\n",
>  				node->full_name);
> 

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

end of thread, other threads:[~2012-11-21 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21  8:57 [PATCH] of/i2c: check status property for i2c client Bongkyu Kim
2012-11-21 13:42 ` Rob Herring

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.