From: Alan Jenkins <sourcejedi.lkml@googlemail.com>
To: Mario Limonciello <mario_limonciello@dell.com>
Cc: "johannes@sipsolutions.net" <johannes@sipsolutions.net>,
Marcel Holtmann <marcel@holtmann.org>,
cezary.jackiewicz@gmail.com, linux-acpi@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/3] Add rfkill support to compal-laptop
Date: Tue, 18 Aug 2009 22:08:14 +0100 [thread overview]
Message-ID: <9b2b86520908181408v5f7875b6sea31d8d95cc08c0b@mail.gmail.com> (raw)
In-Reply-To: <4A8AE459.8060102@dell.com>
On 8/18/09, Mario Limonciello <mario_limonciello@dell.com> wrote:
> Hi Alan & Marcel:
>
> Alan Jenkins wrote:
>> Also, you're missing the calls to rfkill_destroy() here.
>>
>> Whew, I think that's everything. I hope you find the feedback useful,
>> despite it being a little fragmented.
>>
>>
> Thanks for all the feedback. I think i've addressed all of the concerns
> that were pointed out. I appreciate the pointer to scripts/cleanpatch,
> that does significantly help in finding whitespace problems that the
> naked eye just browses over.
>
> I'm attaching the updated patch (sorry, git send-email seems to still
> not be very graceful with line breaks when the SMTP implementation is
> exchange from what i've seen)
> +static void compal_rfkill_poll(struct rfkill *rfkill, void *data)
> +{
> + unsigned long radio = (unsigned long) data;
> + u8 result;
> + bool hw_blocked;
> + bool sw_blocked;
> +
> + ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
> +
> + hw_blocked = !(result & KILLSWITCH_MASK);
> + sw_blocked = (!hw_blocked && !(result & radio));
> +
> + rfkill_set_states(rfkill, sw_blocked, hw_blocked);
> +}
I assume you have good reason for having sw_block depend on hw_block.
I.e. you can't read sw_blocked while hw_blocked is set, right?
If KILLSWITCH is toggled on and off, will the hardware "forget" any
prior soft-blocks?
It would also be nice to know if hardware/firmware ever changes
sw_blocked, e.g. in response to a button press.
Johannes, I think I'm confusing myself here. Can you have a look at
this code? I remember the rfkill rewrite was designed to help with
something like this, but I don't know how exactly.
Thanks
Alan
next parent reply other threads:[~2009-08-18 21:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4A89E768.7010207@dell.com>
[not found] ` <1250558643.30166.109.camel@localhost.localdomain>
[not found] ` <9b2b86520908180044l72cb8642j6256e246662f7971@mail.gmail.com>
[not found] ` <9b2b86520908180752k66feda09rf9034a96ac6ef470@mail.gmail.com>
[not found] ` <4A8AE459.8060102@dell.com>
2009-08-18 21:08 ` Alan Jenkins [this message]
2009-08-18 21:31 ` [PATCH 2/3] Add rfkill support to compal-laptop Johannes Berg
2009-08-18 22:00 ` Mario Limonciello
2009-08-19 8:51 ` Alan Jenkins
2009-08-19 9:01 ` Johannes Berg
2009-08-19 11:43 ` Cezary Jackiewicz
2009-08-19 16:46 ` Mario Limonciello
2009-08-19 16:57 ` Alan Jenkins
2009-08-19 17:13 ` Johannes Berg
2009-08-19 18:39 ` Mario Limonciello
2009-08-19 18:36 Mario Limonciello
2009-08-19 18:42 ` Johannes Berg
2009-08-19 18:47 ` Mario Limonciello
2009-08-20 8:52 ` Alan Jenkins
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=9b2b86520908181408v5f7875b6sea31d8d95cc08c0b@mail.gmail.com \
--to=sourcejedi.lkml@googlemail.com \
--cc=cezary.jackiewicz@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mario_limonciello@dell.com \
/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).