On Monday 14 April 2008, Henrique de Moraes Holschuh wrote:
The input handler is optional, because userspace *should* actually do all
the work. Userspace should listen to the registered input device and
it is userspace that should select the input device it wants to listen to.
(perhaps the laptop has 2 or more keys, but the user wants all interfaces
to be toggled when any key has been pressed).
That is a rfkill issue due to lack of correct documentation and problems
with the rfkill implementation. I wouldn't blame the drivers for that. ;)
True.
Right.
But note that network hardware with such keys will have a driver that handles
both features. So such network drivers will have a input device and will send
a signal that the key was pressed regardless of the current state they are in.
Thats true. But was that a scenario where there were 2 keys for the same radio type?
Or was that a matter of the driver indicating a key pressed event while it has no
attached key to it, and only checked the register for the key status and the current radio
status and saw it was different?
For example rt2x00 does:
hasHardwareKey()
yes -> register input_polldev, check key status
no -> don't do anything.
Note that write-only support hasn't been implemented yet, so rt2x00 will do nothing
if the hardware doesn't have a hardware key attached to it.
Depends on the implementation, I think we should at least have the following requirements:
- _all_ wireless (wifi, bluetooth, etc) network drivers register themselves to rfkill
- radio-key driver polls or listens to hardware events and sends them through the input layer
- it must be caught by either:
1) userspace (default): This can either run a lot of scripts of send a notification to rfkill
2) rfkill-input: sens notification to rfkill
- rfkill goes past all registered rfkill instances to toggle the status.
Note that the rfkill and rfkill-input description is incomplete since that is where this thread
is about. So the actions that those 2 layers should exactly do is not defined yet in this list.
However the first 2 points should be the case regardless of how rfkill handles things.
Ivo
--