Thread (2 messages) flat view 2 messages, 2 authors, 2012-07-05

Re: [PATCH v2 07/12] I2C: MV64XXX: Add Device Tree support

From: Florian Fainelli <hidden>
Date: 2012-07-04 19:49:33
Also in: linux-arm-kernel, linux-devicetree, linux-spi

Hello Andrew,

On Tuesday 03 July 2012 18:58:39 Andrew Lunn wrote:
On Tue, Jul 03, 2012 at 05:59:13PM +0200, Florian Fainelli wrote:
quoted
Hello Andrew,

On Tuesday 03 July 2012 16:22:40 Andrew Lunn wrote:
quoted
Extends the driver to get properties from device tree. Also extend the
kirkwood DT support to supply the needed properties.

Signed-off-by: Andrew Lunn <redacted>
---
[snip]
quoted
-	if ((pd->id != 0) || !pdata)
+	if ((!pdata && !pd->dev.of_node) || (pdata && (pd->id != 0)))
 		return -ENODEV;
This is more a reminder than a real remark, but the driver here should not 
be 
quoted
limiting us to a single platform_device. In fact kirkwood55 (88F6282) has 
two 
quoted
I2C controllers for instance.
Yes, i don't understand this code. It looks impossible to use it using
platform_data with more than one controller. Any idea why its like
this? I didn't want to change the behavior because i don't understand
why its like this.
No idea, we just stumbled over this with a colleague the other day, and just 
removing the check made our second I2C controller work, so I don't see any 
reason why there is such a limitation. That said, this is for a subsequent 
patch.
However, it should be possible to instantiate multiple I2C controllers
using DT. However, i've only tested it with one.

      Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-- 
Florian

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help