From patchwork Fri Oct 1 07:40:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ike Panhc X-Patchwork-Id: 222922 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o917fFib009400 for ; Fri, 1 Oct 2010 07:41:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755579Ab0JAHk3 (ORCPT ); Fri, 1 Oct 2010 03:40:29 -0400 Received: from adelie.canonical.com ([91.189.90.139]:38124 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752663Ab0JAHk2 (ORCPT ); Fri, 1 Oct 2010 03:40:28 -0400 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P1aEE-0001nK-UM; Fri, 01 Oct 2010 08:40:27 +0100 Received: from [210.242.151.101] (helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1P1aEE-0001hC-5c; Fri, 01 Oct 2010 08:40:26 +0100 From: Ike Panhc To: platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Garrett , Len Brown , Corentin Chary , David Woodhouse , Mario.Holbe@TU-Ilmenau.DE Subject: [PATCH 9/9] ideapad: Add param: no_bt_rfkill Date: Fri, 1 Oct 2010 15:40:22 +0800 Message-Id: <1285918822-13116-1-git-send-email-ike.pan@canonical.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1285918660-12802-1-git-send-email-ike.pan@canonical.com> References: <1285918660-12802-1-git-send-email-ike.pan@canonical.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Oct 2010 07:41:16 +0000 (UTC) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 78ac02a..6a4396e 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -52,6 +52,10 @@ static struct { { "ideapad_killsw", 0, 0, RFKILL_TYPE_WLAN } }; +static bool no_bt_rfkill; +module_param(no_bt_rfkill, bool, 0444); +MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth."); + /* * ACPI Helpers */ @@ -232,6 +236,14 @@ static int ideapad_register_rfkill(struct acpi_device *adevice, int dev) int ret; unsigned long sw_blocked; + if (no_bt_rfkill && + (ideapad_rfk_data[dev].type == RFKILL_TYPE_BLUETOOTH)) { + /* Force to enable bluetooth when no_bt_rfkill=1 */ + write_ec_cmd(ideapad_priv->handle, + ideapad_rfk_data[dev].opcode, 1); + return 0; + } + priv->rfk[dev] = rfkill_alloc(ideapad_rfk_data[dev].name, &adevice->dev, ideapad_rfk_data[dev].type, &ideapad_rfk_ops, (void *)(long)dev);