From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivo van Doorn Subject: Re: [RESEND] [PATCH -next 2/2] acpi,rfkill,backlight: comapl-laptop update - use rfkill switch subsystem Date: Wed, 9 Jul 2008 23:57:27 +0200 Message-ID: <200807092357.28013.IvDoorn@gmail.com> References: <20080709231059.778d16f4@debian> <200807092333.01355.IvDoorn@gmail.com> <20080709234419.12d6eabc@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from nf-out-0910.google.com ([64.233.182.188]:47232 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbYGIVsk convert rfc822-to-8bit (ORCPT ); Wed, 9 Jul 2008 17:48:40 -0400 Received: by nf-out-0910.google.com with SMTP id d3so966802nfc.21 for ; Wed, 09 Jul 2008 14:48:39 -0700 (PDT) In-Reply-To: <20080709234419.12d6eabc@debian> Content-Disposition: inline Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Cezary Jackiewicz Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com, Len Brown , Richard Purdie , Andrew Morton , Henrique de Moraes Holschuh On Wednesday 09 July 2008, Cezary Jackiewicz wrote: > Dnia 2008-07-09, o godz. 23:33:01 > Ivo van Doorn napisa=B3(a): >=20 > > On Wednesday 09 July 2008, Cezary Jackiewicz wrote: > > > From: Cezary Jackiewicz > > >=20 > > > Remove unnecessary attributes, use rfkill switch subsystem. > >=20 > > I'm missing a call to rfkill_force_state() to inform the rfkill sub= system that > > the key has been toggled. This function should be called when the h= ardware > > has raised the interrupt about the pressed event, or when the funct= ion > > which polls the register notices the state change. > >=20 > > As the patch works now, it means that the driver will only listen t= o > > events coming from rfkill and it doen't provide any updates itself. > >=20 > > Ivo >=20 > Does calling rfkill_force_state () is mandatory? This driver implemen= t=20 > get_state() hook, @state is always up-to-date. It is not mandatory if you are writing rfkill support for a driver that= does not come with a rfkill switch. Such drivers can make use of the rfkill even= ts produced by the hardware which does have such a switch. When the hardware does have the rfkill switch, then yes rfkill_force_st= ate() is mandatory. The get_state() callback function is optional, and allows rfkill to dif= ferentiate between soft and hardblock. Ivo -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756123AbYGIVsu (ORCPT ); Wed, 9 Jul 2008 17:48:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752194AbYGIVsm (ORCPT ); Wed, 9 Jul 2008 17:48:42 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]:48456 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbYGIVsk convert rfc822-to-8bit (ORCPT ); Wed, 9 Jul 2008 17:48:40 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:date:user-agent:cc:references:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :message-id:from; b=BBUQEssD7BsSrjbGXRfPC2o16zKFPcOdEEHeA97Xhxi72exrspP8f4fvnf2XMTOAxg hF5vnyanolRqXiXUMGSiC1vVjmqGSq+/b/lhsClN344ExDWIBJNhZJIWjoC0aEUI13wb DuVXk9QSfn86YaOR2VCGiAi/WDF6nCA/FyGh0= To: Cezary Jackiewicz Subject: Re: [RESEND] [PATCH -next 2/2] acpi,rfkill,backlight: comapl-laptop update - use rfkill switch subsystem Date: Wed, 9 Jul 2008 23:57:27 +0200 User-Agent: KMail/1.9.9 Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com, Len Brown , Richard Purdie , Andrew Morton , Henrique de Moraes Holschuh References: <20080709231059.778d16f4@debian> <200807092333.01355.IvDoorn@gmail.com> <20080709234419.12d6eabc@debian> In-Reply-To: <20080709234419.12d6eabc@debian> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200807092357.28013.IvDoorn@gmail.com> From: Ivo van Doorn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 09 July 2008, Cezary Jackiewicz wrote: > Dnia 2008-07-09, o godz. 23:33:01 > Ivo van Doorn napisał(a): > > > On Wednesday 09 July 2008, Cezary Jackiewicz wrote: > > > From: Cezary Jackiewicz > > > > > > Remove unnecessary attributes, use rfkill switch subsystem. > > > > I'm missing a call to rfkill_force_state() to inform the rfkill subsystem that > > the key has been toggled. This function should be called when the hardware > > has raised the interrupt about the pressed event, or when the function > > which polls the register notices the state change. > > > > As the patch works now, it means that the driver will only listen to > > events coming from rfkill and it doen't provide any updates itself. > > > > Ivo > > Does calling rfkill_force_state () is mandatory? This driver implement > get_state() hook, @state is always up-to-date. It is not mandatory if you are writing rfkill support for a driver that does not come with a rfkill switch. Such drivers can make use of the rfkill events produced by the hardware which does have such a switch. When the hardware does have the rfkill switch, then yes rfkill_force_state() is mandatory. The get_state() callback function is optional, and allows rfkill to differentiate between soft and hardblock. Ivo