public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Alberto Lopez Perez <clopez@igalia.com>
To: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: Daniel Oliveira Nascimento <don@syst.com.br>,
	Matthew Garrett <mjg@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] x86/platform: classmate-laptop: Add cmpc_keys support for new classmate laptops
Date: Tue, 21 Jun 2011 22:24:57 +0200	[thread overview]
Message-ID: <4E00FE19.9000606@igalia.com> (raw)
In-Reply-To: <20110621195038.GC2724@nautilus.holoscopio.com>

[-- Attachment #1: Type: text/plain, Size: 3340 bytes --]

On 06/21/2011 09:50 PM, Thadeu Lima de Souza Cascardo wrote:
> On Tue, Jun 21, 2011 at 09:40:01PM +0200, Carlos Alberto Lopez Perez wrote:
>> The cmpc_keys ACPI driver from the classmate-laptop module fails to
>> recognize the device on the 4th generation of classmate laptops (Atom N450)
>> because the device ID is named "FNBT0000" (uppercase N) on this laptops.
>>
>> MODALIAS=acpi:FNBT0000:
>>
>> This patch makes the driver cmpc_keys recognize it:
>>
>> input: cmpc_keys as /devices/LNXSYSTM:00/device:00/FNBT0000:00/input/input18
>>
>> Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
>> ---
>>  drivers/platform/x86/classmate-laptop.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
>> index 94f93b6..03896cd 100644
>> --- a/drivers/platform/x86/classmate-laptop.c
>> +++ b/drivers/platform/x86/classmate-laptop.c
>> @@ -40,6 +40,7 @@ struct cmpc_accel {
>>  #define CMPC_TABLET_HID		"TBLT0000"
>>  #define CMPC_IPML_HID	"IPML200"
>>  #define CMPC_KEYS_HID		"FnBT0000"
>> +#define CMPC_KEYS_4GEN_HID	"FNBT0000"
>>  
>>  /*
>>   * Generic input device code.
>> @@ -683,6 +684,7 @@ static int cmpc_keys_remove(struct acpi_device *acpi, int type)
>>  
>>  static const struct acpi_device_id cmpc_keys_device_ids[] = {
>>  	{CMPC_KEYS_HID, 0},
>> +	{CMPC_KEYS_4GEN_HID, 0},
>>  	{"", 0}
>>  };
>>  
>> @@ -754,6 +756,7 @@ static const struct acpi_device_id cmpc_device_ids[] = {
>>  	{CMPC_TABLET_HID, 0},
>>  	{CMPC_IPML_HID, 0},
>>  	{CMPC_KEYS_HID, 0},
>> +	{CMPC_KEYS_4GEN_HID, 0},
>>  	{"", 0}
>>  };
>>  
>> -- 
>> 1.7.5.3
>>
> 
> Not-Acked-By: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> 
> Recent Linux versions have "upper-cased" the device names, because ACPI
> spec says devices must have upper-case letters. This is probably related
> to this change, not because the device name has changed in recent
> versions of the device. So the correct fix would be to either revert
> this change in Linux or use only a single uppercase name for the device.
> 
> Thanks anyway for this report. I have received one report in private a
> while back, but was too lazy to discuss this on the list. Any pointers
> on that? Easist way to go is to simply replace FnBT for FNBT.
> 
> Regards,
> Cascardo.

The ACPI specification [1] says the following:

"""
A valid PNP ID must be of the form “AAA####” where A is an uppercase letter
and # is a hex digit.
A valid ACPI ID must be of the form “ACPI####” where # is a hex digit.
"""

It don't says that the ACPI ID must be uppercase.

I don't have an older generation of the classmate laptop to test if the
ACPI ID is FnBT or FNBT, but I guess that if it was working until now, is
because the older generations have FnBT instead of FNBT.

However I just found a previous discussion about this issue on LKML [2] and
seems that the patch is included (commit: 72638f5).

So... this means that the cmpc_keys module was not working for any
classmate laptop since ~2.6.29 ?

If that is the case then replacing FnBT with FNBT will be fine.

Thanks!

Best regards!

-------
[1] http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf
[2] https://lkml.org/lkml/2009/1/21/238


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-06-21 20:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 19:40 [PATCH 1/1] x86/platform: classmate-laptop: Add cmpc_keys support for new classmate laptops Carlos Alberto Lopez Perez
2011-06-21 19:50 ` Thadeu Lima de Souza Cascardo
2011-06-21 20:24   ` Carlos Alberto Lopez Perez [this message]
2011-06-21 20:50     ` Thadeu Lima de Souza Cascardo
2011-06-22 18:43       ` Carlos Alberto Lopez Perez
2011-07-04 14:07         ` Thadeu Lima de Souza Cascardo

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=4E00FE19.9000606@igalia.com \
    --to=clopez@igalia.com \
    --cc=cascardo@holoscopio.com \
    --cc=don@syst.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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