diff mbox

i2c: dln2: set the device tree node of the adapter

Message ID 1427470630-13378-1-git-send-email-octavian.purdila@intel.com
State Accepted
Headers show

Commit Message

Octavian Purdila March 27, 2015, 3:37 p.m. UTC
This patch makes sure the platform device tree node is inherited by
the adapter device. This allows the DLN2 bus to work with i2c devices
defined in the device tree.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
---
 drivers/i2c/busses/i2c-dln2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Wolfram Sang March 27, 2015, 3:57 p.m. UTC | #1
On Fri, Mar 27, 2015 at 05:37:10PM +0200, Octavian Purdila wrote:
> This patch makes sure the platform device tree node is inherited by
> the adapter device. This allows the DLN2 bus to work with i2c devices
> defined in the device tree.
> 
> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>

Applied to for-next, thanks!
Lee Jones March 30, 2015, 7:09 a.m. UTC | #2
On Fri, 27 Mar 2015, Octavian Purdila wrote:

> This patch makes sure the platform device tree node is inherited by
> the adapter device. This allows the DLN2 bus to work with i2c devices
> defined in the device tree.
> 
> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
> ---
>  drivers/i2c/busses/i2c-dln2.c | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Lee Jones <lee.jones@linaro.org>

> diff --git a/drivers/i2c/busses/i2c-dln2.c b/drivers/i2c/busses/i2c-dln2.c
> index b3fb86a..db1e20a 100644
> --- a/drivers/i2c/busses/i2c-dln2.c
> +++ b/drivers/i2c/busses/i2c-dln2.c
> @@ -210,6 +210,7 @@ static int dln2_i2c_probe(struct platform_device *pdev)
>  	dln2->adapter.class = I2C_CLASS_HWMON;
>  	dln2->adapter.algo = &dln2_i2c_usb_algorithm;
>  	dln2->adapter.dev.parent = dev;
> +	dln2->adapter.dev.of_node = dev->of_node;
>  	i2c_set_adapdata(&dln2->adapter, dln2);
>  	snprintf(dln2->adapter.name, sizeof(dln2->adapter.name), "%s-%s-%d",
>  		 "dln2-i2c", dev_name(pdev->dev.parent), dln2->port);
Lee Jones March 30, 2015, 7:09 a.m. UTC | #3
On Fri, 27 Mar 2015, Wolfram Sang wrote:

> On Fri, Mar 27, 2015 at 05:37:10PM +0200, Octavian Purdila wrote:
> > This patch makes sure the platform device tree node is inherited by
> > the adapter device. This allows the DLN2 bus to work with i2c devices
> > defined in the device tree.
> > 
> > Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
> 
> Applied to for-next, thanks!

Ah sorry.  I read this _after_ sending my Ack.

Feel free to apply it, or not.
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-dln2.c b/drivers/i2c/busses/i2c-dln2.c
index b3fb86a..db1e20a 100644
--- a/drivers/i2c/busses/i2c-dln2.c
+++ b/drivers/i2c/busses/i2c-dln2.c
@@ -210,6 +210,7 @@  static int dln2_i2c_probe(struct platform_device *pdev)
 	dln2->adapter.class = I2C_CLASS_HWMON;
 	dln2->adapter.algo = &dln2_i2c_usb_algorithm;
 	dln2->adapter.dev.parent = dev;
+	dln2->adapter.dev.of_node = dev->of_node;
 	i2c_set_adapdata(&dln2->adapter, dln2);
 	snprintf(dln2->adapter.name, sizeof(dln2->adapter.name), "%s-%s-%d",
 		 "dln2-i2c", dev_name(pdev->dev.parent), dln2->port);