Re: eeepc-laptop rfkill, stupid question #4 and 5
- From: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>
- Date: Fri, 31 Oct 2008 20:54:59 +0000
Alan Jenkins wrote:
Matthew Garrett wrote:Ah, I see. Wrong end - of course the *rfkill device* doesn't have
On Fri, Oct 31, 2008 at 05:09:09PM +0000, Alan Jenkins wrote:Documentation/rfkill.txt implied otherwise
Did you miss a call to rfkill_force_state() on resume?Conceivably. I didn't test the hibernation case.
Actually, normal boot doesn't preserve the setting either. Your commitThis is the behaviour of the rfkill core.
changes the behaviour from the rfkill state being persistent across
reboot / power off (as a bios setting), to being always enabled on
boot. It seems like a bad idea to me.
You should:
- rfkill_allocate()
- modify rfkill fields (flags, name)
- modify state to the current hardware state (THIS IS THE ONLY TIME
YOU CAN ACCESS state DIRECTLY)
- rfkill_register()
Admittedly it doesn't say "and I promise not to gratuitously override
the state on registration". Buti t seems weird though, to override the
value on registration
useful state. The persistent state belongs to the *rfkill switch* - it
could even be a physical switch.
And now it's clear what was missing from the conversion to rfkill:
2. Input device switches (sources of EV_SW events) DO store their
current state
(so you *must* initialize it by issuing a gratuitous input layer
event on
driver start-up and also when resuming from sleep)
Regards
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- eeepc-laptop rfkill, stupid question #4 and 5
- From: Alan Jenkins
- Re: eeepc-laptop rfkill, stupid question #4 and 5
- From: Matthew Garrett
- Re: eeepc-laptop rfkill, stupid question #4 and 5
- From: Alan Jenkins
- eeepc-laptop rfkill, stupid question #4 and 5
- Prev by Date: Metadata in sys_sync_file_range and fadvise(DONTNEED)
- Next by Date: Re: infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
- Previous by thread: Re: eeepc-laptop rfkill, stupid question #4 and 5
- Next by thread: [PATCH] tags: link from CONFIG_x to 'config x' as well
- Index(es):
Relevant Pages
|