From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Gerard Pierre <gbinhex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: i2c Device Detection
Date: Thu, 16 Dec 2010 16:36:13 +0100 [thread overview]
Message-ID: <20101216163613.0c80ec04@endymion.delvare> (raw)
In-Reply-To: <AANLkTi=arobgyX-FgCV572AbY3N+6pRgsM+Fr2moQ2i6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Bonjour Gerard,
On Thu, 16 Dec 2010 09:20:00 -0500, Gerard Pierre wrote:
> Being relatively new to i2c I wanted to verify that my conclusion
> reached from doing some initial reading on i2c device detection is
> accurate:
>
> Based on the nature of an i2c bus there is no automatic detection of
> an i2c device "plugged into" a system in the kernel. For example, an
> embedded Linux system boots up and 10 minutes later someone attaches a
> smart battery to the running system (to a bus that also has a smart
> battery charger, for example) - there is no way to automatically
> detect the device and run some initialization code in a device driver
> every time the battery gets connected to the i2c bus, correct?
Correct. You'll need a side-band mechanism for the notification. For
example, inserting the battery could push on a switch, triggering an
interrupt.
An alternative would be to poll continuously for the slave I2C address
of the battery, but that would be horrible performance-wise and thus
better avoided.
--
Jean Delvare
next prev parent reply other threads:[~2010-12-16 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 14:20 i2c Device Detection Gerard Pierre
[not found] ` <AANLkTi=arobgyX-FgCV572AbY3N+6pRgsM+Fr2moQ2i6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-16 15:36 ` Jean Delvare [this message]
[not found] ` <20101216163613.0c80ec04-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-12-16 15:46 ` Ben Dooks
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=20101216163613.0c80ec04@endymion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=gbinhex-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