lkml.org 
[lkml]   [2012]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/3] USB: ohci-nxp: Support for LPC32xx
On Sat, Mar 10, 2012 at 09:49:55PM +0100, 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?
>
> And while we are at it: Could you also try replacing i2c_write() with
> i2c_smbus_write_byte_data(isp1301_i2c_client, reg, val)?
>
> No need to recode it (and in general, those solutions will also work with SMBus
> for free)

"no need to recode it" means "no need to recode these already existing functions"

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-03-10 21:57    [from the cache]
©2003-2011 Jasper Spaans