mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ivor Kruger <ivor@veriline.co.za>
Cc: barebox@lists.infradead.org
Subject: Re: Writing to I2C device during Barebox boot
Date: Mon, 14 Oct 2013 10:27:01 +0200	[thread overview]
Message-ID: <20131014082701.GX30088@pengutronix.de> (raw)
In-Reply-To: <CE7BF428.8D50%ivor@veriline.co.za>

Hi Ivor,

On Thu, Oct 10, 2013 at 06:10:42AM -0700, Ivor Kruger wrote:
> Jan, thanks for the reply, I will look into using git-send-email a bit
> later since I am going to travel this morning fro a few hours.
> 
> My question was however a little bit more generic. Take for example the
> PCM049 board.c file. One of the I2C components it loads is the TWL6030. If
> I wish to write to a register on this device, how would I go about it.

When the driver is probed you should see a /dev/twl6030. You can read
the registers doing:

md -s /dev/twl6030

And you can write registers like this:

mw -d /dev/twl6030 <offset> <value>

If you wish to read/write registers from code grep the code for
twl6030_get.

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

      reply	other threads:[~2013-10-14  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CE7B48EC.8D30%ivor@veriline.co.za>
2013-10-10  1:59 ` FW: " Ivor Kruger
2013-10-10  7:42   ` Jan Lübbe
2013-10-10 13:10     ` Ivor Kruger
2013-10-14  8:27       ` Sascha Hauer [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=20131014082701.GX30088@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ivor@veriline.co.za \
    /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