Re: [PATCH] hwmon: (pmbus) Fix two issues

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

 



On Mon, 14 Nov 2011 18:54:22 -0800, Guenter Roeck wrote:
> On Mon, Nov 14, 2011 at 09:35:44PM -0500, Tang Yuantian-B29983 wrote:
> > [Yuantian:] I am using newest kernel 3.2. PowerPC arch. 
> > I2c bus driver file is: drivers/i2c/busses/i2c-mpc.c.
> > 
> > I greped the i2c bus driver and found the following platform's i2c don't 
> > Support i2c_smbus_read_block_data. So Zl6100 driver can't work on these platforms.
> > 1. drivers/i2c/busses/i2c-mpc.c(powerpc arch, which I am working on).
> > 2. drivers/i2c/busses/i2c-mv64xxx.c
> > 3. drivers/i2c/busses/i2c-nomadik.c
> > 4. drivers/i2c/busses/i2c-octeon.c
> > 5. drivers/i2c/busses/i2c-pxa.c
> > 6. drivers/i2c/busses/i2c-s6000.c
> > Almost all the platforms the kernel support.
> > But they all support I2C_FUNC_SMBUS_EMUL, which means support i2c_smbus_read_i2c_block_data.
> 
> Hmm ... looking into the code, I2C_FUNC_SMBUS_READ_BLOCK_DATA is missing from I2C_FUNC_SMBUS_EMUL.
> Now that is interesting.
> 
> If you change mpc_functionality() to
> 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_READ_BLOCK_DATA;
> I bet your problem will disappear.
> 
> Jean, any idea why I2C_FUNC_SMBUS_EMUL doesn't include I2C_FUNC_SMBUS_READ_BLOCK_DATA ?

Because I2C_FUNC_SMBUS_READ_BLOCK_DATA needs proper handling of
I2C_M_RECV_LEN, which some drivers have implemented and others have
not. Bus driver authors are expected to add
I2C_FUNC_SMBUS_READ_BLOCK_DATA (and I2C_FUNC_SMBUS_BLOCK_PROC_CALL) to
functionality after implementing I2C_M_RECV_LEN.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux