From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= Subject: Re: [RFC PATCH] thinkpad_acpi: Add support for controlling charge thresholds Date: Tue, 05 Nov 2013 11:18:02 +0100 Message-ID: <87ppqfrw2t.fsf@nemi.mork.no> References: <1383601088-21177-1-git-send-email-jak@jak-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from canardo.mork.no ([148.122.252.1]:39589 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752839Ab3KEKSY convert rfc822-to-8bit (ORCPT ); Tue, 5 Nov 2013 05:18:24 -0500 In-Reply-To: <1383601088-21177-1-git-send-email-jak@jak-linux.org> (Julian Andres Klode's message of "Mon, 4 Nov 2013 22:38:08 +0100") Sender: platform-driver-x86-owner@vger.kernel.org List-ID: To: Julian Andres Klode Cc: Henrique de Moraes Holschuh , Matthew Garrett , "open list:THINKPAD ACPI EXT..." , "open list:THINKPAD ACPI EXT..." , open list Julian Andres Klode writes: > =20 > +TPACPI_HANDLE(battery, root, "\\_SB.PCI0.LPC.EC.HKEY", > + "\\_SB.PCI0.LPCB.EC.HKEY", /* X121e, T430u */ > + "\\_SB.PCI0.LPCB.H_EC.HKEY", /* L430 */ > + "\\_SB.PCI0.LPCB.EC0.HKEY", /* Edge/S series */ > + ); > + Isn't this just the full patch to the existing "hkey_handle" for those models? Why not just use that handle, like e.g the rfkill driver does? Supported models could probably be autodetected by checking whether the methods exist? > +static struct attribute_group bat##_BAT##_attribute_group =3D { \ > + .name =3D "BAT" #_BAT, \ > + .attrs =3D bat##_BAT##_attributes \ > +}; Are these names guaranteed to match the ACPI battery device(s)? > +DEFINE_BATTERY(0); > +DEFINE_BATTERY(1); Are there always two batteries? Bj=C3=B8rn