From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ike Panhc Subject: Re: [PATCH 0/8] [Resend] ideapad: using EC command to control rf/camera power Date: Wed, 18 Aug 2010 21:04:46 +0800 Message-ID: <4C6BDA6E.1060300@canonical.com> References: <1282120564-11324-1-git-send-email-ike.pan@canonical.com> <1282127719.2747.211.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1282127719.2747.211.camel@localhost> Sender: platform-driver-x86-owner@vger.kernel.org To: David Woodhouse Cc: "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , Thomas Renninger , Alan Cox , Andrew Morton , Corentin Chary , Randy Dunlap , "Brown, Len" , Matthew Garrett List-Id: linux-acpi@vger.kernel.org On 08/18/2010 06:35 PM, David Woodhouse wrote: > On Wed, 2010-08-18 at 09:36 +0100, Ike Panhc wrote: >> >> Once the rfkill of a laptop is set to block, it is no way to unblock with Linux >> without driver. Thanks for David Woodhouse wrote the first driver solving this. >> >> But the \_SB_.GECN and \_SB_.DECN are only available on Lenovo ideapad S10-3. >> Using EC command to control rf/camera power is better because I believe every >> ideapads which has VPC2004 device in its DSDT has this common method. >> >> This driver is tested and work fine on Lenovo ideapad B550 and ideapad S10-3. > > Works for me too (on S10-3); thanks. > > It all looks good, although should we have a delay or a schedule or at > least a cpu_relax() in the read_ec_data() and write_ec_cmd() loops? > Those loops should be using time_before() too, rather than open-coding > the comparison. > yeah, agree. polling from ec makes cpu busy, although its usually less then 10ms a yield or relax will be good.