public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ayman KHAMOUMA <ayman.khamouma-qxv4g6HH51o@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Need help on selecting one (and only one) i2c bus
Date: Tue, 10 Mar 2009 16:30:44 +0100	[thread overview]
Message-ID: <20090310163044.571e4aff@hyperion.delvare> (raw)
In-Reply-To: <000001c9a0c6$bf92af80$b23e81a4-J7BnVcvkGbbQT0dZR+AlfA@public.gmane.org>

Hi Ayman,

On Mon, 9 Mar 2009 15:52:56 +0100, Ayman KHAMOUMA wrote:
> I'm new on I2C device drivers programming and I'm facing a little problem, I can't find how to select my i2c-0 bus (I have 3 of them: i2c-0, i2c-1 and i2c-2) I'd like my probe function to probe only this bus and ignore the others.
> I guess I can find the solution with the i2c_address_data structure, but I don't really understand how to use it...

It would help if you would first tell us what kernel version you are
using, what device you are writing a driver for, and what
architecture / system type this is all working on.

> Do I have to use the ignore_range array ?

ignore_range has gone away long ago. The last kernel that had it was
2.6.12.6, released in late August 2005. Are really you using such an
old kernel?

> Once filed, I have nothing to do ?
> 
> The device I want to probe/send data to is located on bus i2c-0 and at the adresses 0x00 to 0x15

I seriously doubt this. Addresses 0x00, 0x01 and 0x02 are very special
for I2C, no device can use them. I suspect you are mixing register
addresses (the map of which is internal and specific to each device)
with device addresses on the bus.

> I guess I have to do:
> static unsigned short ignore_range[] = { 0x00, 0x16, 0xff, 0x01, 0x00, 0xff, 0x02, 0x00, 0xff, I2C_CLIENT_END };
> 
> Am I right ?

No, this is seriously wrong. But I can't tell more without additional
information about what you are trying to achieve in the first place.

-- 
Jean Delvare

  parent reply	other threads:[~2009-03-10 15:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 14:52 Need help on selecting one (and only one) i2c bus Ayman KHAMOUMA
     [not found] ` <000001c9a0c6$bf92af80$b23e81a4-J7BnVcvkGbbQT0dZR+AlfA@public.gmane.org>
2009-03-10 15:30   ` Jean Delvare [this message]
     [not found]     ` <fd6b62c10903102327u426a4262meeabe2c581d7107b@mail.gmail.com>
     [not found]       ` <fd6b62c10903102327u426a4262meeabe2c581d7107b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-11  9:15         ` Jean Delvare
     [not found]           ` <20090311101513.271f5464-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-11  9:47             ` Daniel Mack
     [not found]               ` <fd6b62c10903110319w1eebd2ebs4b83e7d1247f1678@mail.gmail.com>
     [not found]                 ` <fd6b62c10903110319w1eebd2ebs4b83e7d1247f1678-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-11 10:40                   ` Daniel Mack
     [not found]     ` <20090310163044.571e4aff-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-10 15:58       ` Ayman KHAMOUMA
2009-03-10 16:03       ` Ayman KHAMOUMA
2009-03-11 10:55       ` Ayman KHAMOUMA
     [not found]         ` <000301c9a237$e6d3c8f0$b23e81a4-J7BnVcvkGbbQT0dZR+AlfA@public.gmane.org>
2009-03-11 11:22           ` Jean Delvare
     [not found]             ` <20090311122257.7c7805f0-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-11 11:44               ` Ayman KHAMOUMA
2009-03-11 16:51               ` Ayman KHAMOUMA
     [not found]                 ` <001301c9a269$ab95d940$b23e81a4-J7BnVcvkGbbQT0dZR+AlfA@public.gmane.org>
2009-03-11 19:09                   ` Jean Delvare
2009-03-24 10:27               ` I2c message at init time Ayman KHAMOUMA
     [not found]                 ` <000201c9ac6b$34a95300$2d3f81a4-J7BnVcvkGbbQT0dZR+AlfA@public.gmane.org>
2009-03-24 15:52                   ` Jean Delvare
     [not found]                     ` <20090324165227.0d97454c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-03-24 15:58                       ` Ayman KHAMOUMA
  -- strict thread matches above, loose matches on Subject: below --
2009-03-09 10:58 Need help on selecting one (and only one) i2c bus Ayman KHAMOUMA

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=20090310163044.571e4aff@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=ayman.khamouma-qxv4g6HH51o@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