linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Gmeiner <christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Need to use a I2C EEPROM on normal x86 architecture
Date: Tue, 21 Jun 2011 13:54:52 +0200	[thread overview]
Message-ID: <BANLkTimfbe4ntzzTu0SXJothK1N56m1ghA@mail.gmail.com> (raw)

Hi community,

I am working on an embedded x86 device, which has an at24 based
eeprom. I am using
the i2c_eg20t driver to access the i2c bus. To be able to access the
eeprom in a separated
driver I did this:

/* technical description of our used EEPROM */
static struct at24_platform_data custom_i2c_eeprom_info = {
	.byte_len	= EEPROM_BYTE_LEN,
	.page_size	= 16,
	.flags		= 0,
	.setup		= content_read,
	.context	= NULL,
};

/* EEPROM at24 */
static struct i2c_board_info __initdata i2c_info[] =  {
	{
		I2C_BOARD_INFO("24c04", 0x50),
		.platform_data	= &custom_i2c_eeprom_info,
	},
};

In the init function of my custom driver I do this:

	/* register known devices on i2c bus */
	status = i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info))

Now I run in some troubles... see
http://www.spinics.net/lists/linux-i2c/msg02022.html

What options do I have to get this running? I could use
i2c_add_numbered_adapter, but I don''t
want to touch too much from mainline kernel sources.

Thanks
--
Christian Gmeiner, MSc

             reply	other threads:[~2011-06-21 11:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 11:54 Christian Gmeiner [this message]
     [not found] ` <BANLkTimfbe4ntzzTu0SXJothK1N56m1ghA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-23  9:10   ` Need to use a I2C EEPROM on normal x86 architecture Jean Delvare
     [not found]     ` <20110623111016.368a7ca5-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-06-27 11:50       ` Christian Gmeiner
     [not found]         ` <BANLkTimT_Sb4f6qC55uFUr6MfHzEd3wrGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-02 16:36           ` Christian Gmeiner
  -- strict thread matches above, loose matches on Subject: below --
2014-06-25 13:51 Vijai Kumar

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=BANLkTimfbe4ntzzTu0SXJothK1N56m1ghA@mail.gmail.com \
    --to=christian.gmeiner-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).