All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Reid <preid@electromag.com.au>
To: Yong Li <sdliyong@gmail.com>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH] gpio: pca953x: Use correct u16 value for register word write
Date: Wed, 30 Mar 2016 13:14:52 +0800	[thread overview]
Message-ID: <56FB60CC.9000605@electromag.com.au> (raw)
In-Reply-To: <CADO9-pfuBVA1HW+XrV5oN_6jF2mebi3QeTiro1B8DCk+Em2Yug@mail.gmail.com>

On 30/03/2016 1:01 PM, Yong Li wrote:
> Or another method is using the below to convert the u8 to u16:
> cpu_to_le16(get_unaligned((u16 *) val)), compared with the
> i2c_smbus_write_byte_data method, which one is better?
>
>

G'day Yong,

I'd go with the cpu_to_le16(get_unaligned((u16 *) val))



-- 
Regards
Phil Reid


      reply	other threads:[~2016-03-30  5:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29  6:27 [PATCH] gpio: pca953x: Use correct u16 value for register word write Yong Li
2016-03-29 12:06 ` Phil Reid
2016-03-29 12:53   ` Yong Li
2016-03-29 12:53     ` Yong Li
2016-03-29 14:39     ` Alexander Stein
2016-03-29 16:33       ` Phil Reid
2016-03-30  2:46         ` Yong Li
2016-03-30  2:46           ` Yong Li
     [not found]         ` <CADO9-pdxpQRQQ8RFtjT6rz28GteL3u+at0EGVdNwG8VV48SGEw@mail.gmail.com>
2016-03-30  5:01           ` Yong Li
2016-03-30  5:14             ` Phil Reid [this message]

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=56FB60CC.9000605@electromag.com.au \
    --to=preid@electromag.com.au \
    --cc=alexander.stein@systec-electronic.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdliyong@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.