public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: w.sang@pengutronix.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/3] USB: ohci-nxp: Support for LPC32xx
Date: Sat, 10 Mar 2012 21:49:55 +0100	[thread overview]
Message-ID: <20120310204955.GA14564@pengutronix.de> (raw)
In-Reply-To: <1331408166-11607-4-git-send-email-stigge@antcom.de>


> -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                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120310/4102bb68/attachment.sig>

  reply	other threads:[~2012-03-10 20:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-10 19:36 [PATCH v5 0/3] USB: OHCI-HCD: Support for LPC32xx Roland Stigge
2012-03-10 19:36 ` [PATCH v5 1/3] USB: OHCI-HCD: Rename ohci-pnx4008 to ohci-nxp Roland Stigge
2012-03-10 19:36 ` [PATCH v5 2/3] USB: ohci-nxp: Rename symbols from pnx4008 to nxp Roland Stigge
2012-03-10 19:36 ` [PATCH v5 3/3] USB: ohci-nxp: Support for LPC32xx Roland Stigge
2012-03-10 20:49   ` Wolfram Sang [this message]
2012-03-10 20:53     ` Wolfram Sang
2012-03-10 22:29     ` Roland Stigge
2012-03-11  7:43       ` Wolfram Sang
2012-03-11 10:16         ` Roland Stigge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120310204955.GA14564@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox