From: Marc Reilly <marc@cpdesign.com.au>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] i2c: add platform_data for i2c_board_info
Date: Fri, 14 Jan 2011 11:07:00 +1100 [thread overview]
Message-ID: <1294963621-4177-2-git-send-email-marc@cpdesign.com.au> (raw)
In-Reply-To: <1294963621-4177-1-git-send-email-marc@cpdesign.com.au>
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
---
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 2507d68..da61d01 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -98,6 +98,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.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-01-14 0:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 0:06 Add basic driver for 24clxx eeproms Marc Reilly
2011-01-14 0:07 ` Marc Reilly [this message]
2011-01-14 0:07 ` [PATCH 2/2] at24: add I2C eeprom for 24cl02 Marc Reilly
2011-01-14 9:19 ` Sascha Hauer
2011-01-14 9:39 ` Sascha Hauer
2011-01-16 1:04 ` [PATCH] devfs: new func make_cdev_name: allocate unique cdev name Marc Reilly
[not found] ` <1295139858-9193-1-git-send-email-marc@cpdesign.com.au>
2011-01-17 18:01 ` cdev name generation Sascha Hauer
2011-01-17 22:22 ` Marc Reilly
2011-01-19 8:41 ` 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=1294963621-4177-2-git-send-email-marc@cpdesign.com.au \
--to=marc@cpdesign.com.au \
--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