From: Yin Kangkai <kangkai.yin@linux.intel.com>
To: Corentin Chary <corentin.chary@gmail.com>
Cc: platform-driver-x86 <platform-driver-x86@vger.kernel.org>,
linux-kernel@vger.kernel.org, "Wang,
Yong Y" <yong.y.wang@intel.com>,
"Liu, Bing Wei" <bing.wei.liu@intel.com>,
Matthew Garrett <mjg@redhat.com>
Subject: Re: [PATCH V2] platform-driver-x86: ACPI EC Extra driver for Oaktrail
Date: Mon, 10 Jan 2011 14:57:10 +0800 [thread overview]
Message-ID: <20110110065710.GI30215@kai-debian> (raw)
In-Reply-To: <20110107112409.GU9496@kai-debian>
On 2011-01-07, 19:24 +0800, Yin Kangkai wrote:
> On 2011-01-07, 09:56 +0100, Corentin Chary wrote:
> > > +static struct rfkill *oaktrail_rfkill_new(char *name, enum rfkill_type type,
> > > + unsigned long mask)
> > > +{
> > > + int err;
> > > + struct rfkill *rfkill_dev;
> > > +
> > > + rfkill_dev = rfkill_alloc(name, &oaktrail_device->dev, type,
> > > + &oaktrail_rfkill_ops, (void *)mask);
> > > + if (!rfkill_dev)
> > > + return ERR_PTR(-ENOMEM);
> > > +
> > > + err = rfkill_register(rfkill_dev);
> >
> > Maybe you should add a rfkill_init_sw_state() call here, to be sure
> > that the rfkill initial state is right.
>
> Yes, agree with you, and I'm trying to do that, add a
> rfkill_init_sw_state between rfkill_alloc() and rfkill_register()...
>
> + ec_read(OT_EC_DEVICE_STATE_ADDRESS, &value);
> + rfkill_init_sw_state(rfkill_dev, (value & mask) != 1);
>
>
> However, test shows the EC seems not ready yet when booting runs here
> (value = 0), and then all the radio set as "blocked". Hence the radio
> state can't be persistent during reboot.. This is not we want.
>
> Also tried to read out the EC address a little bit later, seems the EC
> won't be ready until very late.
>
> Am I doing something wrong? or I need to check with HW guy about this.
It turns out that is because of a bug in driver itself and the way I'm
doing "rebooting" is wrong..
Yes, the rfkill_init_sw_state() is needed, otherwise,
rfkill_register() will wrongly set the rfkill status.
Am sending the V3 patch right away.
Kangkai
next prev parent reply other threads:[~2011-01-10 6:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 2:59 [PATCH] platform-driver-x86: ACPI EC Extra driver for Oaktrail Yin Kangkai
2011-01-06 7:29 ` Corentin Chary
2011-01-06 10:11 ` Yin Kangkai
2011-01-06 10:21 ` Corentin Chary
2011-01-06 10:50 ` Yin Kangkai
2011-01-06 10:54 ` Corentin Chary
2011-01-06 11:32 ` Joey Lee
2011-01-06 11:35 ` Joey Lee
2011-01-07 0:01 ` Yin Kangkai
2011-01-07 7:41 ` [PATCH V2] " Yin Kangkai
2011-01-07 8:56 ` Corentin Chary
2011-01-07 11:24 ` Yin Kangkai
2011-01-10 6:57 ` Yin Kangkai [this message]
2011-01-07 22:09 ` Matthew Garrett
2011-01-10 7:10 ` Yin Kangkai
2011-01-10 9:16 ` Thomas Renninger
2011-01-10 7:15 ` [PATCH V3] platform-driver-x86: " Yin Kangkai
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=20110110065710.GI30215@kai-debian \
--to=kangkai.yin@linux.intel.com \
--cc=bing.wei.liu@intel.com \
--cc=corentin.chary@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=yong.y.wang@intel.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