From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Jeffrey (Sheng-Hui) Chu"
<jeffchu-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Subject: Re: 10-bit address support
Date: Fri, 11 Nov 2011 11:43:35 +0100 [thread overview]
Message-ID: <20111111104335.GC2493@pengutronix.de> (raw)
In-Reply-To: <20111110160739.540cda37-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
Hi Jean,
> I can think of 2 different ways of addressing the problem.
>
> First way is to use a different device name format for 10-bit address
> devices, for example %d-10bit-%04x. This has the drawback that some
> user-space applications and libraries may not recognize these as valid
> i2c device names. libsensors and sensors-detect would be amongst these.
Wouldn't the cleanest solution be
"%d-%02x" for 7 bit
"%d-%04x" for 10 bit?
Yeah, I know that would really break userspace.
> I'd rather go with a larger offset such as 0x1000. This translates 0x2d
> to 0x102d which is more obviously "10-bit address 0x2d". We have 16
> bits to store the address so it shouldn't be an issue. Another possible
> offset would be 0xa000 (as 0xa is 10.)
I like 0xa000 a tad better than 0x1000, but well... Then again, those
devices are probably rare enough to take a non-intrusive approach.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-11-11 10:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 15:07 10-bit address support Jean Delvare
[not found] ` <20111110160739.540cda37-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-11-10 15:58 ` Jeffrey (Sheng-Hui) Chu
[not found] ` <B6A520E9CD57404AAFC0831E4FB39541AE68602AD7-4wnuKdaqIVJdD26/7+am4baTQr+y5IJFqs7JOtOhHmkAvxtiuMwx3w@public.gmane.org>
2011-11-10 16:33 ` Jean Delvare
[not found] ` <20111110173300.3f75d2db-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-11-10 16:38 ` Jeffrey (Sheng-Hui) Chu
2011-11-11 10:43 ` Wolfram Sang [this message]
[not found] ` <20111111104335.GC2493-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-11-16 14:56 ` Jean Delvare
[not found] ` <20111116155610.6b02aab6-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-11-16 15:04 ` Wolfram Sang
[not found] ` <20111116150449.GG2596-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-11-16 15:22 ` 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=20111111104335.GC2493@pengutronix.de \
--to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=jeffchu-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@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).