From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] commands: i2c_write: enable raw write to address
Date: Fri, 9 Feb 2018 09:36:36 +0100 [thread overview]
Message-ID: <20180209083636.oipcpwnnflbqcdzb@pengutronix.de> (raw)
In-Reply-To: <20180208074856.3701-1-antonynpavlov@gmail.com>
Hi Antony,
On Thu, Feb 08, 2018 at 10:48:56AM +0300, Antony Pavlov wrote:
> Sometimes for communication with a simple I2C devices
> (e.g. PCF8574 or TM1650) it's necessary to send only
> one data byte into the I2C device.
> Current i2c_write command makes this impossible because
> you can't just pass 'device address' and 'register number'
> (or 'device address' and 'one data byte') to the command.
> You always have to pass all three parameters:
> 'device address', 'register number' and 'data'.
>
> This commit fixes the problem.
>
> Sample usage:
>
> barebox@barebox sandbox:/ i2c_write -a 0x24 0x01
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> commands/i2c.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Looks good to me.
I applied this one despite the [RFC] tag. If for some reason you want to
resend this, feel free to do so, but otherwise consider this applied.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-02-09 8:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 7:48 Antony Pavlov
2018-02-09 8:36 ` Sascha Hauer [this message]
2018-02-09 11:22 ` Antony Pavlov
2018-02-13 8:19 ` Sascha Hauer
2018-02-14 6:19 ` Antony Pavlov
2018-02-16 7:53 ` Sascha Hauer
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=20180209083636.oipcpwnnflbqcdzb@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@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