Dmitry Torokhov wrote on 2011-05-11: > Hi Michael, > > On Tue, May 10, 2011 at 01:35:05PM +0200, michael.hennerich@xxxxxxxxxx > wrote: >> >> +static int ad714x_i2c_read_seq(struct device *dev, unsigned short reg, >> + unsigned short *data, unsigned len) { + struct i2c_client *client >> = to_i2c_client(dev); + int ret = 0, i; + u8 *_reg = (u8 *)® + + u8 >> tx[2] = { + _reg[1], + _reg[0] + }; > > Eww... I think this will also break on arches with different endianness. > Can we pass the commands to be sent to the device as u8 array? > Hi Dmitry, Right - this is not endianness save, like the rest of the driver. I'll add a patch to the end of the sequence, which fixes both bus options. For SPI - also need to force the bus to spi->bits_per_word = 8 (which is the default), however some Blackfin boards set bits_per_word = 16, so we don't break them... Greetings, Michael -- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html