From: Benjamin Herrenschmidt <bh40@calva.net>
To: Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de>,
linuxppc-dev@lists.linuxppc.org
Subject: Re: ADB probing
Date: Fri, 8 Oct 1999 12:08:51 +0200 [thread overview]
Message-ID: <19991008120851.018835@mailhost.mipsys.com> (raw)
In-Reply-To: <199910071828.UAA02976@simul.biophys.uni-duesseldorf.de>
On Thu, Oct 7, 1999, Michael Schmitz
<schmitz@opal.biophys.uni-duesseldorf.de> wrote:
>?? I found the reset (and implicit rescan) in adb.c, is there a hook from
>mac_keyb.c? (I meant 'force a reset via /dev/adb, which will in turn cause a
>rescan)
There is a notifier that the devices can attach to the adb core. I added
this when working on the sleep code.
>Yep, that will work as long as all drivers receiving data from ADB get
>notified. Might be problematic for user space apps that open /dev/adb and
>talk to a specific device directly. In case of ID collosions, we might have
>a different device occupy that ID after a reset. As long as handler IDs and
>original IDs (better: address) are unique, there should be no problems.
>
>BTW: opening /dev/adb to read from a specific device is cumbersome, right?
>You can send listen and talk requests to the device but there's no way to
>get autopoll data to user space. What about using minor 1-16 for that (now
>that bus probing is implemented)?
That's something I've been thinking about for a long time, I also want
this to send ADB codes directly to mac-on-linux. Basically, it would end
up this way (please comment) :
- minor 0 is the "control" channel where you can send bus resets, raw
commands, etc... I'll add this new ioctl for querying things like the
original address. It will be backward compatible.
- each minor >0 correspond to an address. Open is exclusive. When
opened, the original handler (if any) is replaced by a special one that
sends autopoll datas to a ring buffer that can be read(). Optionally, we
can provide a few ioctls to set this buffer's size and to flush it. In
case a bus reset happens, all those opened minor are marked "dead" and
return an error to any read or ioctl call. (The user is then expected to
close the file, use minor 0 to re-probe the device, and reopen an
"autopoll" minor if the device is still there).
I beleive this is enough for anything we might want to do with ADB, and
things like tablet drivers could be 100% userland.
--
Perso. e-mail: <mailto:bh40@calva.net>
Work e-mail: <mailto:benh@mipsys.com>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-10-08 10:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-07 16:21 ADB probing Benjamin Herrenschmidt
1999-10-07 18:28 ` Michael Schmitz
1999-10-07 19:38 ` David A. Gatwood
1999-10-08 9:44 ` Michael Schmitz
1999-10-08 23:07 ` Brad Midgley
1999-10-11 12:28 ` Michael Schmitz
1999-10-14 22:25 ` multihead (Re: ADB probing) Brad Midgley
1999-10-08 10:08 ` Benjamin Herrenschmidt [this message]
1999-10-08 12:33 ` ADB probing Michael Schmitz
1999-10-08 13:06 ` Benjamin Herrenschmidt
1999-10-11 9:46 ` Michael Schmitz
-- strict thread matches above, loose matches on Subject: below --
1999-10-06 23:47 Tom Rini
1999-10-07 9:27 ` Michael Schmitz
1999-10-07 11:22 ` Timothy Wall
1999-10-07 12:16 ` Michael Schmitz
1999-10-07 16:15 ` Benjamin Herrenschmidt
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=19991008120851.018835@mailhost.mipsys.com \
--to=bh40@calva.net \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=schmitz@opal.biophys.uni-duesseldorf.de \
/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).