From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Stas Sergeev <stsp@aknet.ru>
Cc: Andrew Morton <akpm@osdl.org>, Vojtech Pavlik <vojtech@suse.cz>,
Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] add input_enable_device()
Date: Wed, 17 May 2006 12:47:57 -0700 (PDT) [thread overview]
Message-ID: <20060517194757.6566.qmail@web81101.mail.mud.yahoo.com> (raw)
In-Reply-To: <446B58F5.4020501@aknet.ru>
--- Stas Sergeev <stsp@aknet.ru> wrote:
> Hello.
>
> Dmitry Torokhov wrote:
> > I really believe that instead of shoving this into input core you need to
> > split pcspkr driver to allow concurrent access to the hardware.
> I split pcspkr and someone else will say that there is
> already enough of the midlayers to handle the like things,
> to not introduce another one just for the particular driver.
> Besides, I don't beleive people will be happy with having
> 2 modules for just handling the terminal beeps.
> The input midlayer looks like the best solution. It allows
> to deal with the modules as soon as they are loaded. It has
> enough of the information needed to precisely identify the
> module (I now use INPUT_DEVICE_ID_MATCH_BUS). The pcspkr *is*
> an "input driver" after all, so why not to deal with it via
> an input API?
pcspkr is still an input driver. Now you are adding another
driver to drive the same piece of hardware and you need
to mediate access to that hardware. It is not responsibility
of the input layer to do that. Like input core does not handle
PS/2 ports or USB hardware directly it should not do that for
the speaker either. Also, even now pcspkr implementation is
deficient - issuing SND_BELL will kill SND_TONE going at the
moment.
> If the input should not be used for anything
> related to the port IO,
Input core itself should not. It is positioned not at physical
device level. It gets and propagates events from individual
drivers which talk to hardware, maybe via port IO.
> then why it carries the information
> about the ports and the bus that are used by the device?
> Why does it have the INPUT_DEVICE_ID_MATCH_BUS after all?
For userspace benefits.
> The input API only lacks a very small piece of the functionality -
> disabling the device, which can easily be used by anything else
> in the future. Is there a reason not to include that functionality
> only because the snd-pcsp is going to use it, or is there any *other*
> reason?
>
See above. Your module wants to access hardware concurrently with
another module so implement it properly. While you are fine with
disabling beeps while music is playing otherpeoplr might still want
to hear them.
--
Dmitry
next prev parent reply other threads:[~2006-05-17 19:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060517124450.84547.qmail@web81111.mail.mud.yahoo.com>
2006-05-17 17:10 ` Stas Sergeev
2006-05-17 19:47 ` Dmitry Torokhov [this message]
2006-05-18 4:10 ` Stas Sergeev
2006-05-18 4:31 ` Dmitry Torokhov
2006-05-18 4:54 ` Stas Sergeev
2006-05-18 12:29 ` Dmitry Torokhov
2006-05-18 17:57 ` Stas Sergeev
[not found] <44670446.7080409@aknet.ru>
[not found] ` <20060515143119.54b5aff8.akpm@osdl.org>
2006-05-16 16:00 ` Stas Sergeev
2006-05-16 16:03 ` Andrew Morton
2006-05-16 16:29 ` Stas Sergeev
2006-05-16 16:44 ` Chase Venters
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=20060517194757.6566.qmail@web81101.mail.mud.yahoo.com \
--to=dtor_core@ameritech.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stsp@aknet.ru \
--cc=vojtech@suse.cz \
/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
all inboxes | Powered by JetHome®