From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 0/12] RFC: dm: Add I2C support
Date: Fri, 24 Oct 2014 11:03:01 -0400 [thread overview]
Message-ID: <20141024150301.GU25506@bill-the-cat> (raw)
In-Reply-To: <1413178778-30846-1-git-send-email-sjg@chromium.org>
On Sun, Oct 12, 2014 at 11:39:26PM -0600, Simon Glass wrote:
> (Note this is RFC since the uclass interface needs discussion and also
> because only sandbox is implemented so far. But I thought it best to get
> this out there as soon as I wrote it as it may influence the PMIC library,
> etc.)
>
> This series is an initial attempt to add I2C support to driver model. It
> has become apparent that this is a high priority as it is widely used. It
> follows along to some extent from the SPI conversion.
>
> Several changes are made from the original I2C implementations.
>
> Firstly It is not necessary to specify the chip address with every call,
> since each chip knows its own address - it is stored in struct dm_i2c_chip
> which is attached to each chip on the I2C bus. However, this information
> *is* passed to the driver since I presume most drivers need it and it would
> be cumbersome to look up in every call.
>
> Secondly there is no concept of a 'current' I2C bus so all associated logic
> is removed. With driver model i2c_set_bus_num() and i2c_get_bus_num() are
> not available. Since the chip device specifies both the bus and the chip
> address, there is no need for this concept. It also causes problems when
> one driver changes the current bus and forgets to change it back.
>
> Thirdly initialisation is handled by driver model's normal probe() method
> on each device so there should be no need for i2c_init_all(), i2c_init(),
> i2c_init_board(), i2c_board_late_init() and board_i2c_init().
>
> I2C muxes are not yet supported. To support these we will need to maintain
> state of the current mux settings to avoid resetting every mux every time.
> Probably we need to add a sandbox I2C mux driver to permit testing of this.
> This can probably be done later.
>
> Platform data is not yet supported either, only device tree. The
> U_BOOT_I2C_MKENT_COMPLETE() and U_BOOT_I2C_ADAP_COMPLETE() macros are not
> used. Also struct i2c_adapter is not defined anymore. This will need to be
> addressed, perhaps as part of converting over a board that does not use
> device tree.
>
> This series is available at u-boot-dm/i2c-working.
Nothing jumped out at me. Heiko?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141024/ede72dd0/attachment-0001.pgp>
next prev parent reply other threads:[~2014-10-24 15:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 5:39 [U-Boot] [RFC PATCH 0/12] RFC: dm: Add I2C support Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 01/12] dm: core: Allow access to the device's driver_id data Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 02/12] dm: core: Add functions to find parent and OF data Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 03/12] dm: i2c: Add a uclass for I2C Simon Glass
2014-11-10 6:33 ` Heiko Schocher
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 04/12] dm: i2c: Implement driver model support in the i2c command Simon Glass
2014-11-10 7:01 ` Heiko Schocher
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 05/12] dm: i2c: Add I2C emulation driver for sandbox Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 06/12] dm: i2c: Add a sandbox I2C driver Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 07/12] dm: i2c: Add an I2C EEPROM simulator Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 08/12] dm: i2c: config: Enable I2C for sandbox using driver model Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 09/12] dm: i2c: dts: Add an I2C bus for sandbox Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 10/12] dm: WIP: EEPROM driver Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 11/12] dm: i2c: Add tests for I2C Simon Glass
2014-10-13 5:39 ` [U-Boot] [RFC PATCH 12/12] dm: i2c: tegra: Convert to driver model for I2C for seaboard Simon Glass
2014-10-24 15:03 ` Tom Rini [this message]
2014-10-29 7:31 ` [U-Boot] [RFC PATCH 0/12] RFC: dm: Add I2C support Heiko Schocher
2014-11-10 7:16 ` Heiko Schocher
2014-11-11 15:44 ` Simon Glass
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=20141024150301.GU25506@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/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