Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-05 Thread Linus Walleij
On Wed, Sep 5, 2012 at 9:33 AM, Lee Jones wrote: > Author: Lee Jones > Date: Mon Aug 6 11:09:57 2012 +0100 > > i2c: nomadik: Add Device Tree support to the Nomadik I2C driver > > Here we apply the bindings required for successful Device Tree > probing of the i2c-nomadik driver. > >

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-05 Thread Lee Jones
Author: Lee Jones Date: Mon Aug 6 11:09:57 2012 +0100 i2c: nomadik: Add Device Tree support to the Nomadik I2C driver Here we apply the bindings required for successful Device Tree probing of the i2c-nomadik driver. Cc: linux-...@vger.kernel.org Signed-off-by: Lee

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-04 Thread Linus Walleij
On Wed, Sep 5, 2012 at 8:41 AM, Lee Jones wrote: > On Tue, Sep 04, 2012 at 07:27:10PM +0200, Linus Walleij wrote: >> On Tue, Sep 4, 2012 at 4:28 PM, Arnd Bergmann wrote: >> >> > In this particular case, we don't have a single board file providing a >> > struct nmk_i2c_controller definition for pl

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-04 Thread Lee Jones
On Tue, Sep 04, 2012 at 07:27:10PM +0200, Linus Walleij wrote: > On Tue, Sep 4, 2012 at 4:28 PM, Arnd Bergmann wrote: > > > In this particular case, we don't have a single board file providing a > > struct nmk_i2c_controller definition for platform data, so the best way > > to handle this IMHO is

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-04 Thread Alessandro Rubini
> Alessandro Rubini is actively working on bridging this (and > other amba_device primecells) to PCI, that is the reason why it > was recently converted to an amba_device. Yes, I've been inactive for a while but I'm on it right now. > How is he then supposed to get the proper parameters into the

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-04 Thread Linus Walleij
On Tue, Sep 4, 2012 at 4:28 PM, Arnd Bergmann wrote: > In this particular case, we don't have a single board file providing a > struct nmk_i2c_controller definition for platform data, so the best way > to handle this IMHO is to remove the header file with the platform > data definition, and just

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-04 Thread Arnd Bergmann
On Monday 03 September 2012, Lee Jones wrote: > > But if you are handling both, then I agree that platform_data should > > override DT. > > I do agree with this, but I haven't stumbled over such a use-case yet. > I have only provided; clock names, DMA settings and call-back information > via AUX_D

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Lee Jones
On Mon, Sep 03, 2012 at 10:09:34AM -0500, Rob Herring wrote: > On 09/03/2012 09:35 AM, Linus Walleij wrote: > > On Mon, Sep 3, 2012 at 4:33 PM, Stephen Warren wrote: > >> On 09/03/2012 05:58 AM, Linus Walleij wrote: > >>> On Mon, Sep 3, 2012 at 1:32 PM, Lee Jones wrote: > >>> > No, this is w

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Rob Herring
On 09/03/2012 09:35 AM, Linus Walleij wrote: > On Mon, Sep 3, 2012 at 4:33 PM, Stephen Warren wrote: >> On 09/03/2012 05:58 AM, Linus Walleij wrote: >>> On Mon, Sep 3, 2012 at 1:32 PM, Lee Jones wrote: >>> No, this is wrong. Platform data should not override DT. If DT is enabled an

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Linus Walleij
On Mon, Sep 3, 2012 at 4:33 PM, Stephen Warren wrote: > On 09/03/2012 05:58 AM, Linus Walleij wrote: >> On Mon, Sep 3, 2012 at 1:32 PM, Lee Jones wrote: >> >>> No, this is wrong. Platform data should not override DT. >>> >>> If DT is enabled and passed, it should have highest priority. > > No, th

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Stephen Warren
On 09/03/2012 05:58 AM, Linus Walleij wrote: > On Mon, Sep 3, 2012 at 1:32 PM, Lee Jones wrote: > >> No, this is wrong. Platform data should not override DT. >> >> If DT is enabled and passed, it should have highest priority. No, that's wrong. If platform data is specified, it overrides DT, so t

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Lee Jones
On Mon, Sep 03, 2012 at 03:19:13PM +0200, Linus Walleij wrote: > On Mon, Sep 3, 2012 at 2:34 PM, Lee Jones wrote: > > > When booting DT booting take a different path and no platform data > > is passed. We can't boot DT AND register devices with platform data > > or else we will double probe every

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Linus Walleij
On Mon, Sep 3, 2012 at 2:34 PM, Lee Jones wrote: > When booting DT booting take a different path and no platform data > is passed. We can't boot DT AND register devices with platform data > or else we will double probe every device. The only way to pass > pdata when booting with DT is with AUX_DA

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Lee Jones
On Mon, Sep 03, 2012 at 01:58:04PM +0200, Linus Walleij wrote: > On Mon, Sep 3, 2012 at 1:32 PM, Lee Jones wrote: > > > No, this is wrong. Platform data should not override DT. > > > > If DT is enabled and passed, it should have highest priority. > > Oh is that so. :) > Rob: do we have a clear

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Linus Walleij
On Mon, Sep 3, 2012 at 1:32 PM, Lee Jones wrote: > No, this is wrong. Platform data should not override DT. > > If DT is enabled and passed, it should have highest priority. Oh is that so. Rob: do we have a clear consensus on this? Then we should document it in Documentation/devicetree/usage-mo

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Linus Walleij
On Mon, Sep 3, 2012 at 12:07 PM, Lee Jones wrote: (...) > + if (np) { > + if (!pdata) { > + pdata = devm_kzalloc(&adev->dev, sizeof(*pdata), > GFP_KERNEL); > + if (!pdata) { > + ret = -ENOMEM; > +

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Lee Jones
Author: Lee Jones Date: Mon Aug 6 11:09:57 2012 +0100 i2c: nomadik: Add Device Tree support to the Nomadik I2C driver Here we apply the bindings required for successful Device Tree probing of the i2c-nomadik driver. Cc: linux-...@vger.kernel.org Signed-off-by: Lee

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Lee Jones
On Mon, Sep 03, 2012 at 11:44:48AM +0200, Wolfram Sang wrote: > On Mon, Sep 03, 2012 at 11:22:28AM +0200, Linus Walleij wrote: > > On Fri, Aug 31, 2012 at 2:23 PM, Lee Jones wrote: > > > > (...) > > > static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id > > > *id) > > > { >

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Wolfram Sang
On Mon, Sep 03, 2012 at 11:22:28AM +0200, Linus Walleij wrote: > On Fri, Aug 31, 2012 at 2:23 PM, Lee Jones wrote: > > (...) > > static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id > > *id) > > { > > int ret = 0; > > struct nmk_i2c_controller *pdata = adev->

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-09-03 Thread Linus Walleij
On Fri, Aug 31, 2012 at 2:23 PM, Lee Jones wrote: (...) > static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) > { > int ret = 0; > struct nmk_i2c_controller *pdata = adev->dev.platform_data; > + struct device_node *np = adev->dev.of_node; >

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-08-31 Thread Lee Jones
Hopefully this is more to your liking: Author: Lee Jones Date: Mon Aug 6 11:09:57 2012 +0100 i2c: nomadik: Add Device Tree support to the Nomadik I2C driver Here we apply the bindings required for successful Device Tree probing of the i2c-nomadik driver. Cc: linux-...

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-08-31 Thread Lee Jones
> Is there some dependency other than updating the dts files? If not, I'd > like to pick up the patch via I2C. There's no other dependency. Feel free to take them into your tree. > > +static void nmk_i2c_of_probe(struct device_node *np, > > + struct nmk_i2c_controller *pdata) >

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-08-31 Thread Wolfram Sang
On Thu, Aug 23, 2012 at 04:01:27PM +0100, Lee Jones wrote: > Here we apply the bindings required for successful Device Tree > probing of the i2c-nomadik driver. > > Cc: linux-...@vger.kernel.org > Acked-by: srinidhi kasagar Two acks? I'd think this cannot work for multiple reasons. BTW, patch 2

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-08-31 Thread Lee Jones
On Mon, Aug 27, 2012 at 04:42:49PM -0700, Linus Walleij wrote: > On Thu, Aug 23, 2012 at 8:01 AM, Lee Jones wrote: > > > Here we apply the bindings required for successful Device Tree > > probing of the i2c-nomadik driver. > > > > Cc: linux-...@vger.kernel.org > > Acked-by: srinidhi kasagar > >

Re: [PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-08-27 Thread Linus Walleij
On Thu, Aug 23, 2012 at 8:01 AM, Lee Jones wrote: > Here we apply the bindings required for successful Device Tree > probing of the i2c-nomadik driver. > > Cc: linux-...@vger.kernel.org > Acked-by: srinidhi kasagar > Signed-off-by: Lee Jones Acked-by: Linus Walleij Yours, Linus Walleij -- To

[PATCH 3/3] i2c: nomadik: Add Device Tree support to the Nomadik I2C driver

2012-08-23 Thread Lee Jones
Here we apply the bindings required for successful Device Tree probing of the i2c-nomadik driver. Cc: linux-...@vger.kernel.org Acked-by: srinidhi kasagar Signed-off-by: Lee Jones --- drivers/i2c/busses/i2c-nomadik.c | 28 1 file changed, 28 insertions(+) diff --