[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F5BD5BE.3000808@antcom.de>
Date: Sat, 10 Mar 2012 23:29:18 +0100
From: Roland Stigge <stigge@...com.de>
To: Wolfram Sang <w.sang@...gutronix.de>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
kevin.wells@....com, linux-arm-kernel@...ts.infradead.org,
arnd@...db.de
Subject: Re: [PATCH v5 3/3] USB: ohci-nxp: Support for LPC32xx
On 10/03/12 21:49, Wolfram Sang wrote:
>> -static void isp1301_configure(void) +static u16 i2c_read16(u8
>> subaddr) +{ + u16 data; + + i2c_master_send(isp1301_i2c_client,
>> &subaddr, 1); + i2c_master_recv(isp1301_i2c_client, (u8 *) &data,
>> 2); + + return data; +}
>
> Won't i2c_smbus_read_word_data(isp1301_i2c_client, reg) do?
Yes, thank you for the hint! Replaced i2c_read16() with
i2c_smbus_read_word_data() calls.
> And while we are at it: Could you also try replacing i2c_write()
> with i2c_smbus_write_byte_data(isp1301_i2c_client, reg, val)?
Interestingly now, replacing i2c_write() calls with
i2c_smbus_write_byte_data() did _not_ work (hardware initialization
failure). I guess this is due to the differences between i2c and
smbus, and the hardware only handles the former correctly?
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists