Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752276AbaLYV4H (ORCPT ); Thu, 25 Dec 2014 16:56:07 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:39616 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbaLYV4B convert rfc822-to-8bit (ORCPT ); Thu, 25 Dec 2014 16:56:01 -0500 From: Gabriele Mazzotta To: Pali =?ISO-8859-1?Q?Roh=E1r?= Cc: Alex Hung , Darren Hart , Matthew Garrett , "platform-driver-x86@vger.kernel.org" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] Dell Airplane Mode Switch driver Date: Thu, 25 Dec 2014 22:55:57 +0100 Message-ID: <4278344.duCujNBB8t@xps13> User-Agent: KMail/4.14.2 (Linux/3.19.0-rc1+; KDE/4.14.2; x86_64; ; ) In-Reply-To: <201412252111.06004@pali> References: <1416755361-17357-1-git-send-email-pali.rohar@gmail.com> <201412252111.06004@pali> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 25 December 2014 21:11:05 Pali Roh?r wrote: > I will try to recap all information which we have... > > *) We should not send wireless key press to userspace when BIOS > already handles wireless state (and enable/disable wifi): > http://www.spinics.net/lists/platform-driver-x86/msg05922.html > > *) some tested dell machines does not implement GRBT method (or > report constant value) which could return state of wireless > (enabled/disabled) -- e.g. Inspiron 7447 > > *) dell-wireless driver is doing nothing on devices which have > wireless slider switch (except calling CRBT/ARBT methods) > > *) all tested machines emit key with keycode 240 (scancode is > probably 136 = 0x88) to userspace via i8042 bus/AT keyboard when > wireless button/slider is pressed/switched > > *) both drivers dell-wireless and dell-rbtn do not implement > setting soft rfkill state (or change wifi state) > > So in my opinion: if we decide to use driver for acpi DELLABCE > device we should use dell-rbnt for devices with hw slider switch > and dell-wireless for devices with fn button. I think it does not > make sense to use dell-wireless for devices with hw slider > because it do nothing and dell-rbtn for devices with fn key > button as GRBT does not working properly. Here the problem. We are determining which laptop has an hardware slider and which doesn't calling CRBT. If the returned value is 2 or 3, then the laptop has an hardware slider. However, it cannot be assumed the opposite if the returned value is 0 or 1. See the acpidumps Alex uploaded. The Inspiron 3543 returns 0 when CRBT is called and so does the Inspiron 7447. However, the former doesn't have a working ARBT method and, if I'm not wrong, its BIOS doesn't handle radio devices. The BIOS of the latter can handle radio and has a working ARBT method to make it stop from doing that. Since we determine when the BIOS might not be able to control radio devices through CRBT and we can't say it for sure (in the example above, CRBT returned the same value), we make sure that the BIOS doesn't handle radio devices by calling ARBT. We can ensure this (e.g. Inspirong 7447), but we can't ensure the opposite (e.g. Inspiron 3453). If there was a way to determine which laptop really needs dell-wireless, calling ARBT wouldn't have been necessary, but that's not the case. Users can always blacklist the module if they know their laptop can work as expected without it, but we have to ensure that everything always works. This is what I understood by looking at the acpidumps, so I could be wrong. > And second note: Do we need some driver for acpi DELLABCE device? > Which problem is trying acpi DELLABCE device to solve? Is not > everything working fine without driver for DELLABCE device? As I wrote above, DELLABCE is for those systems whose BIOS doesn't handle radio devices and expects the OS do everything when Fn keys are pressed. (Well, it actually seems that something is done by the keyboard controller, but this is not certain yet) > My dell-rbtn approach is trying to export rfkill interface from > DELLABCE device and eliminate using i8042 hook function in smbios > dell-laptop driver. > > Alex, can you check if scancode of wireless change generated by > BIOS is on all machines same: 136 (0x88)? And is send by keyboard > controller (not acpi/wmi)? I can say that on my XPS13 the scancode is 0x88 and it is sent by the keyboard controller. Gabriele -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/