Messages in this thread | | | Date | Wed, 7 Jun 2006 13:53:21 -0600 | From | "Jordan Crouse" <> | Subject | Re: I2C block read |
| |
On 07/06/06 20:50 +0200, Jean Delvare wrote: > Signed-off-by: Jean Delvare <khali@linux-fr.org> > --- > drivers/i2c/busses/scx200_acb.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > --- linux-2.6.17-rc6.orig/drivers/i2c/busses/scx200_acb.c 2006-06-07 18:13:53.000000000 +0200 > +++ linux-2.6.17-rc6/drivers/i2c/busses/scx200_acb.c 2006-06-07 20:29:27.000000000 +0200 > @@ -308,6 +308,12 @@ > break; > > case I2C_SMBUS_BLOCK_DATA: > + /* Sanity check */ > + if (rw == I2C_SMBUS_READ) { > + dev_warn(&adapter->dev, "SMBus block read is not " > + "supported!\n"); > + return -EINVAL; > + } > len = data->block[0]; > buffer = &data->block[1]; > break; > @@ -372,7 +378,7 @@ > { > return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | > I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | > - I2C_FUNC_SMBUS_BLOCK_DATA; > + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA; > } > > /* For now, we only handle combined mode (smbus) */ >
ACKed (if my opinion matters). It will take some more thinking to handle block reads, and they're really not very interesting anyway. At the very least, this will keep implementations from freaking out, and thats a Good Thing (TM).
Jordan
-- Jordan Crouse Senior Linux Engineer Advanced Micro Devices, Inc. <www.amd.com/embeddedprocessors>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |