Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1413924

Re: [PATCH v2] i2c: Add generic support passing secondary devices addresses

From Wolfram Sang <wsa@the-dreams.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] i2c: Add generic support passing secondary devices addresses
Date 2016-06-05 08:20 +0200
Message-ID <rGzzH-3cz-1@gated-at.bofh.it> (permalink)
References <qX2gx-5iE-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sun, Jan 31, 2016 at 04:33:00PM +0100, Jean-Michel Hautbois wrote:
> Some I2C devices have multiple addresses assigned, for example each address
> corresponding to a different internal register map page of the device.
> So far drivers which need support for this have handled this with a driver
> specific and non-generic implementation, e.g. passing the additional address
> via platform data.
> 
> This patch provides a new helper function called i2c_new_secondary_device()
> which is intended to provide a generic way to get the secondary address
> as well as instantiate a struct i2c_client for the secondary address.
> 
> The function expects a pointer to the primary i2c_client, a name
> for the secondary address and an optional default address. The name is used
> as a handle to specify which secondary address to get.
> 
> The default address is used as a fallback in case no secondary address
> was explicitly specified. In case no secondary address and no default
> address were specified the function returns NULL.
> 
> For now the function only supports look-up of the secondary address
> from devicetree, but it can be extended in the future
> to for example support board files and/or ACPI.
> 
> Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@veo-labs.com>

Fixed a 'checkpatch --strict' warning and applied to for-next, thanks!

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2] i2c: Add generic support passing secondary devices  addresses Wolfram Sang <wsa@the-dreams.de> - 2016-06-05 08:20 +0200

csiph-web