Re: [lm-sensors] [RFC PATCH 8/9] hwmon: lis3: use block read to access data registers

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

 



On Mon, Oct 04, 2010 at 07:41:34AM -0400, Jonathan Cameron wrote:
> On 10/01/10 12:46, Samu Onkalo wrote:
> > Add optional blockread function to interface driver. If available
> > the chip driver uses it for data register access. For 12 bit device
> > it reads 6 bytes to get 3*16bit data. For 8 bit device it reads out
> > 5 bytes since every second byte is dummy.
> > This optimizes bus usage and reduces number of operations and
> > interrupts needed for one data update.
> 
> Do we need to query if the i2c bus supports block reading or are they
> all guaranteed to do so?
> 
Not really. It may be true that block reads happen to be supported on 
all i2c controllers used on all boards using this chip, but that
is pretty much a coincidence.

> I'm guessing not seeing as i2c.h has a functionality bit for it...
> I2C_FUNC_SMBUS_READ_BLOCK_DATA
> 
> Otherwise looks good.  Either justify that all i2c buses will work
> or add the functionality check and you can add.
> 
Should really have the check. And, for completeness, the driver should
check if BYTE_DATA is supported as well. Besides, adding the check
seems to be much less effort than trying to explain why it isn't needed.

Guenter
--
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