From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Giampaolo Bellini <iw2lsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: pca953x GPIO
Date: Thu, 24 Jun 2010 21:01:50 +0200 [thread overview]
Message-ID: <20100624210150.43017c4c@hyperion.delvare> (raw)
In-Reply-To: <AANLkTikhwn0l3nK-a-4TfP-mHcJxwvw7bxe2mKyya61A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, 24 Jun 2010 19:49:00 +0200, Giampaolo Bellini wrote:
> Hello Jean
>
> thanks you so much for your time!
>
> > This means they refer to left-aligned addresses. Linux uses
> > right-aligned addresses, so your device lives at 0x20 as far as Linux
> > is concerned.
>
> effectively, after hours and hours of testing, I found by myself that
> the correct addressed where 0x20 and 0x21 but was not able to
Just 0x20, not "0x20 and 0x21". The "address byte" that goes on the
wire is made of 7 bits of address and 1 bit of direction (read or
write). 0x40 is (0x20 << 1) | 0, 0x41 is (0x20 << 1) | 1.
> understand why the manufacturer gives me what I think was a wrong
> registers map !
These are device addresses, nothing to do with a "register map".
> > Check arch/arm/mach-ks8695/board-acs5k.c and
> > arch/arm/mach-pxa/cm-x300.c for examples.
>
> I'll check these source in the next days... so pca953x driver could
> just export his services to other modules ? does it nothing alone
> and/or paired with gpiolib ? or it's just a question of give the
> pca953x some platforms data ?
It is indeed just a question of instantiating the pca953x device with
some platform data.
> > (Assuming i2c-0 is the bus on which the chip actually lives - you can
> > check with i2cdetect). That being said, I doubt that a GPIO chip can
> > really be instantiated from user-space, as it needs configuration
> > settings which you can't provide that way.
>
> you are right... i've try yesterday with the correct addresses but
> with no success.
--
Jean Delvare
next prev parent reply other threads:[~2010-06-24 19:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 12:02 pca953x GPIO Giampaolo Bellini
[not found] ` <AANLkTik5ICmrrsX0m9qzPr7TzF44HKIr5FMC4eKeGkzZ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-24 9:49 ` Jean Delvare
[not found] ` <20100624114937.23bb3efc-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-06-24 17:49 ` Giampaolo Bellini
[not found] ` <AANLkTikhwn0l3nK-a-4TfP-mHcJxwvw7bxe2mKyya61A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-24 19:01 ` Jean Delvare [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-12-17 17:21 Joan Pau Beltran
[not found] ` <4D0B9C35.5000802-i5CWTa81U/w@public.gmane.org>
2010-12-17 18:23 ` Jean Delvare
[not found] ` <AANLkTi=LQ56S43=BL8tdo=MakP-PRzVK0ieJM07y_O_1@mail.gmail.com>
[not found] ` <AANLkTi=LQ56S43=BL8tdo=MakP-PRzVK0ieJM07y_O_1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-24 16:14 ` Joan Pau Beltran
[not found] ` <AANLkTinSuVYAVQqPHRtrnTPrtEZA1aCHOb6X4H8u2OW1@mail.gmail.com>
[not found] ` <AANLkTinSuVYAVQqPHRtrnTPrtEZA1aCHOb6X4H8u2OW1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-28 16:04 ` Joan Pau Beltran
[not found] ` <4D1A0A95.7020408-i5CWTa81U/w@public.gmane.org>
2011-01-06 15:22 ` Jean Delvare
[not found] ` <20110106162213.4e5ee5b4@endymion.del vare>
[not found] ` <20110106162213.4e5ee5b4-R0o5gVi9kd4wFzbXFV0ICA@public.gmane.org vare>
2011-01-07 17:34 ` Joan Pau Beltran
[not found] ` <4D274E8B.8050600-i5CWTa81U/w@public.gmane.org>
2011-12-21 17:02 ` Joan Pau Beltran
2010-12-24 16:15 Joan Pau Beltran
[not found] ` <4D14C735.8-i5CWTa81U/w@public.gmane.org>
2011-01-06 16:19 ` Jean Delvare
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=20100624210150.43017c4c@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=iw2lsi-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).