Re: [PATCH v5 3/3] USB: ohci-nxp: Support for LPC32xx

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

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

Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 |  |

Attachment: signature.asc
Description: Digital signature

linux-arm-kernel mailing list

[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter