[PATCH 3/7] i2c: add platform_data for i2c_board_info

Sascha Hauer s.hauer at pengutronix.de
Mon Jul 30 05:41:12 EDT 2012


On Sun, Jul 29, 2012 at 05:41:50PM +1000, Marc Reilly wrote:
> Signed-off-by: Marc Reilly <marc at cpdesign.com.au>

Applied this one aswell.

Sascha

> ---
>  drivers/i2c/i2c.c |    1 +
>  include/i2c/i2c.h |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
> index 5df0d30..15f5507 100644
> --- a/drivers/i2c/i2c.c
> +++ b/drivers/i2c/i2c.c
> @@ -250,6 +250,7 @@ struct i2c_client *i2c_new_device(struct i2c_adapter *adapter,
>  	client = xzalloc(sizeof *client);
>  	strcpy(client->dev.name, chip->type);
>  	client->dev.type_data = client;
> +	client->dev.platform_data = chip->platform_data;
>  	client->adapter = adapter;
>  	client->addr = chip->addr;
>  
> diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
> index ccbf518..c3e1763 100644
> --- a/include/i2c/i2c.h
> +++ b/include/i2c/i2c.h
> @@ -99,6 +99,7 @@ struct i2c_client {
>  struct i2c_board_info {
>  	char		type[I2C_NAME_SIZE];	/**< name of device */
>  	unsigned short	addr;			/**< stored in i2c_client.addr */
> +	void		*platform_data;		/**< platform data for device */
>  };
>  
>  /**
> -- 
> 1.7.7
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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 |



More information about the barebox mailing list