From: "Brian Tompson" <brian.tompson-4c4C/Gi1/tVWk0Htik3J/w@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: Looking for help writing an i2c client for i2c-core
Date: Thu, 25 Jun 2009 08:48:21 -0700 [thread overview]
Message-ID: <061243056589422B81DCA99818292EA3@footfall> (raw)
In-Reply-To: <20090624105411.64a22474-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
Thank you both for your responses. The link to the kernel wiki was also
worthwhile.
In my all too quick research into writing a Linux Driver Model driver,
somehow I missed the step of calling i2c_register_board_info() in the kernel
startup code. I could register my driver with the i2c_core, but since there
was not i2c_board_info entry nothing else happened in my driver. No that I
have added the i2c_register_board_info call, my driver callbacks are called
and I can get back to writing device driver code again.
When my schedule frees up some, I hope I can write up description of the
steps I took to get a new Linux Driver Model I2C device driver written.
Thank you for your help,
Brian
-----Original Message-----
From: Jean Delvare [mailto:khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org]
Sent: Wednesday, June 24, 2009 1:54 AM
To: Brian Tompson
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Looking for help writing an i2c client for i2c-core
On Mon, 22 Jun 2009 21:02:40 -0700, Brian Tompson wrote:
> In my i2c searches I stumbled upon this list. I hope this message is
> appropriate here.
>
> I am trying to write an i2c client driver for the i2c core, using the
Linux
> Driver Model (new style driver).
> I am looking for a list of steps I need to take to accomplish this.
>
> I have been looking for a list something like this:
>
> Load this i2c-core structure with this information.
> Call this i2c-core function to register your driver.
> Call this i2c-core function to connect to the adapter or bus or algorithm
> (don't know which)
> Write a probe function that does this.
> Write a remove function that does this.
> Call this i2c-core function to write raw i2c data (not SMBus) to your
device
> Call this i2c-core function to read raw i2c data from your device.
> Call this i2c-core function to disconnect from the adapter or bus or
> algorithm
>
> Or whatever the actual steps should be.
>
> I have started writing a driver and have used i2c_add_driver() to register
> my driver with i2c_core.
> Now what? Probe, attach, send, remove, ...? Is there a resource
available
> that simply lays out these facts? I think a resource like that would be
> very useful to someone trying to develop a client driver for the i2c-core
> using the Linux Driver Model.
Have you read Documentation/i2c/writing-clients already? That would be
a very good start. Or more generally, the developer's documentation
section on http://i2c.wiki.kernel.org/
--
Jean Delvare
prev parent reply other threads:[~2009-06-25 15:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Acnztit3TDXTYlAdQgGYzwdBmb7Njg==>
2009-06-23 4:02 ` Looking for help writing an i2c client for i2c-core Brian Tompson
2009-06-24 8:37 ` Linus Walleij
2009-06-24 8:54 ` Jean Delvare
[not found] ` <20090624105411.64a22474-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-06-25 15:48 ` Brian Tompson [this message]
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=061243056589422B81DCA99818292EA3@footfall \
--to=brian.tompson-4c4c/gi1/tvwk0htik3j/w@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