All of lore.kernel.org
 help / color / mirror / Atom feed
From: fuhz-GANU6spQydw@public.gmane.org
To: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: New Style I2C Driver : how to get clients ?
Date: Thu, 24 Jul 2008 16:26:38 +0200	[thread overview]
Message-ID: <1216909598.4888911eb6cea@imp.free.fr> (raw)
In-Reply-To: <31e679430807240616n4bed86c7sa5c5ce69e066d0b5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi,

Thank you so much for help.


> yes, if you have the proper struct i2c_driver and struct i2c_device_id in
> your driver the i2c subsystem should call the probe of your device.
>
> check drivers/i2c/chips/menelaus.c for an example.
>
> See how I2C_BOARD_INFO() in arch/arm/mach-omap2/board-h4
> and struct i2c_device_id have the same name for the device (menelaus).

I am not using the last snapshot of Linux, but the 2.6.23 release.
My source code is not completly up-to-date.

For example there is no reference of I2C_BOARD_INFO in board-h4.
I have no 'i2c_device_id menelaus_id[]' in the i2c drivers code.

Perhap's that's why I am quite confuse, I am refering to recent code examples
and I am using not-so-recent Linux version.


In the documentation, "New-style" drivers are presented very quickly.
In fact, I still don't know where must be located the valid client list:
- in the board init source code with I2C_BOARD_INFO() macro
- in the i2c driver source code


> no, i2c layer will call device probe based on the driver name being the same
> in
> i2c_board_info and i2c_device_id (if I'm not wrong that's the match,
> Jean correct
> me if I'm wrong).
>

With my Linux version, i2c_device_id list was not present in the i2c_driver
structure. So i2c_board_info is supposed to match with what ?


> That's old style i2c driver. You don't need that anymore ;-)

Cool :)
Lines removed !



Best regards,

Légion.

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

  parent reply	other threads:[~2008-07-24 14:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 12:52 New Style I2C Driver : how to get clients ? fuhz-GANU6spQydw
     [not found] ` <1216903949.48887b0dd2039-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-24 13:16   ` Felipe Balbi
     [not found]     ` <31e679430807240616n4bed86c7sa5c5ce69e066d0b5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-24 14:26       ` fuhz-GANU6spQydw [this message]
     [not found]         ` <1216909598.4888911eb6cea-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-24 16:11           ` fuhz-GANU6spQydw
     [not found]             ` <1216915913.4888a9c91fc42-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-24 18:28               ` Felipe Balbi
2008-07-24 18:23           ` Felipe Balbi
2008-07-24 18:26           ` Felipe Balbi
     [not found]             ` <31e679430807241126l5bcea400ieafcfa082d11783a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25  9:00               ` fuhz-GANU6spQydw
     [not found]                 ` <1216976458.4889964a5d9e2-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-25 14:08                   ` fuhz-GANU6spQydw
     [not found]                     ` <1216994898.4889de52becd3-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-25 14:26                       ` Felipe Balbi
     [not found]                         ` <31e679430807250726n3e4b189ehcff5dd02f46872f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 14:30                           ` fuhz-GANU6spQydw
     [not found]                             ` <1216996221.4889e37d41fa3-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-28  9:36                               ` fuhz-GANU6spQydw
     [not found]                                 ` <1217237786.488d931ac5b9b-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-28  9:59                                   ` Felipe Balbi
     [not found]                                     ` <1217239920.488d9b70baec7@imp.free.fr>
     [not found]                                       ` <1217239920.488d9b70baec7-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-28 10:35                                         ` Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2008-07-24  9:07 fuhz-GANU6spQydw
     [not found] ` <1216890432.48884640c4486-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2008-07-24  9:29   ` Felipe Balbi

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=1216909598.4888911eb6cea@imp.free.fr \
    --to=fuhz-ganu6spqydw@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.