public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Brian Tompson <brian.tompson-4c4C/Gi1/tVWk0Htik3J/w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Looking for help writing an i2c client for i2c-core
Date: Wed, 24 Jun 2009 10:54:11 +0200	[thread overview]
Message-ID: <20090624105411.64a22474@hyperion.delvare> (raw)
In-Reply-To: <7BD054A954B148E7B69442B1AC498484@footfall>

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

  parent reply	other threads:[~2009-06-24  8:54 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 [this message]
     [not found]     ` <20090624105411.64a22474-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-06-25 15:48       ` Brian Tompson

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=20090624105411.64a22474@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=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