Port-sparc64 archive

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

Re: Upgrading from 5.1_STABLE to 5.99.46 on Sun Fire V100



On Tue, 1 Mar 2011, Rafal Boni wrote:

> On Tue, Mar 01, 2011 at 09:21:28AM +0100, Martin Husemann wrote:
> > On Mon, Feb 28, 2011 at 04:21:26PM -0500, Rafal Boni wrote:
> > > Adding a loop in of_enter_i2c_devs() that checks for the 'i2c' child
> > > device and enumerates its' children if found gets me the missing i2c
> > > devices, but I'm not sure if I should skip all the smbus devices or
> > > not (and if so, how best to detect the situation):
> > 
> > I would move the check to device_register, detect the smbus, find the child
> > node and just call of_enter_i2c_devs() for that.
> 
> Detecting the smbus is the bit I'm not so clear about; all we have is an OFW
> node for the PMU on the PCI bus... 
> 
> I guess I could always look for the "i2c" child node directly in
> device_register() and call of_enter_i2c_devs() on it, but the thing I'm
> not sure if is the code that's there was written that way because there
> are HW configurations where the iic devices do hang directly off the OFW
> parent of the IIC bus... 

You should be using the "device_type" property to determine what sort of 
device it is and the "compatible" property to decide what driver to 
attach.  Unfortunately some devices don't have a "device_type" property, 
so in this case you may need to use the "compatible" property to identify 
it.  Using the children to figure that out is a bad idea since there are 
I2C controllers that are directly attached instead of children of SMBus 
devices and who knows what would happen in that case.

Eduardo


Home | Main Index | Thread Index | Old Index