From: Johannes Berg <johannes@sipsolutions.net>
To: Alan Jenkins <sourcejedi.lkml@googlemail.com>
Cc: Mario Limonciello <mario_limonciello@dell.com>,
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 23:31:03 +0200 [thread overview]
Message-ID: <1250631063.16393.14.camel@johannes.local> (raw)
In-Reply-To: <9b2b86520908181408v5f7875b6sea31d8d95cc08c0b@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]
Hi everyone,
> > 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?
That's a bit strange indeed, but I haven't seen the rest of the code.
Does the 'soft block' bit change based on user input, like pressing a
button?
If not, you shouldn't poll that bit at all, but just set it based on
what rfkill gives you as the return value of set_hw_state().
hth,
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-08-18 21:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 23:27 Mario Limonciello
2009-08-18 1:24 ` Marcel Holtmann
2009-08-18 7:44 ` Alan Jenkins
2009-08-18 14:52 ` Alan Jenkins
2009-08-18 17:26 ` Mario Limonciello
2009-08-18 21:08 ` Alan Jenkins
2009-08-18 21:31 ` Johannes Berg [this message]
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-18 21:17 ` Alan Jenkins
2009-08-18 8:33 ` Alan Jenkins
2009-08-18 8:19 ` Alan Jenkins
2009-08-18 12:22 ` Alan Jenkins
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=1250631063.16393.14.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=cezary.jackiewicz@gmail.com \
--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 \
--cc=sourcejedi.lkml@googlemail.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
all inboxes | Powered by JetHome®