Re: status of i2c-cpm and ds2482

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

 



On Fri, Jan 08, 2010 at 01:36:31PM +0100, Jochen Friedrich wrote:
>> How did it work in 2.6.25.7?
>
> It was probably probed by some userspace tool.

Nope, it worked directly after booting. The initialization sequence
looked like this:

w1_add_master_device
ds2482_attach_adapter
i2c_register_driver
sensors_ds2482_init
kernel_init
kernel_thread


> This has been turned off as probing i2c might be problematic on Soc
> boards. See:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a346dacee18ff69f6162d9860d723a058f47321
>
> You could try to add the property "linux,i2c-class=1" to the i2c 
> controller in your dts to see if this commit is the cause of difference.

I've added "linux,i2c-class = <1>;" to i2c@860; this has set i2c-cpm's
class to I2C_CLASS_HWMON. You are probably right in that the problem
seems to be partly related to that.

That said, the default class of i2c-cpm is I2C_CLASS_HWMON |
I2C_CLASS_SPD, whereas the one of ds2482 is not set and thus zero (I'm
using 2.6.27.25), so if (!(adapter->class & driver->class)) in
i2c_detect goes to exit_free. So yesterday I had to set ds2482's class
to I2C_CLASS_SPD since the classes have to match.

However, it still goes to exit_free immediately after that since ds2482
doesn't provide I2C_FUNC_SMBUS_QUICK. IIUC, drivers are not required to
provide that, so I'm still looking why cpm_i2c_probe and ds2482_probe
don't get called.


> You should definitely add your ds2482 to the device tree so it is auto
> loaded by the i2c subsystem.

You mean, in dts? Do you have a template for that? I could look up the
necessary values in the working 2.6.25.7 kernel if I knew which ones I
need. Which routine reads it and calls probe?


Gruß,
Baurzhan.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux