From patchwork Thu Jan 19 17:21:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Goode X-Patchwork-Id: 9526529 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 178186020B for ; Thu, 19 Jan 2017 17:32:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A2182863A for ; Thu, 19 Jan 2017 17:32:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF49C28640; Thu, 19 Jan 2017 17:32:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A89F428640 for ; Thu, 19 Jan 2017 17:32:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753484AbdASRc3 (ORCPT ); Thu, 19 Jan 2017 12:32:29 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:33828 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753939AbdASRbS (ORCPT ); Thu, 19 Jan 2017 12:31:18 -0500 Received: by mail-pf0-f169.google.com with SMTP id e4so15007628pfg.1 for ; Thu, 19 Jan 2017 09:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HHxJA0x+LRFXghubfHB82hDtQXgNDYS3xf4iVdqsEB4=; b=SMQ+laqKgJG/8geQFkg0m2S+X3JCbSsCRMNAkj/V6QhBdtsR08cq3AGBkRCN2uEtSv 82tuh+2chVo+s0yWYmdDeylu/waSlbmzv71JyfwnHiViqTYpJJZ0df5eCCoV6bnKCw5f W4VwbJEUf9WJb+My6kXPOCdHOMmsycyH9mJKBmxsb38Kx3nxD5axVYcdBK0/hURLnSzd mhMV+LPseCEhigXohoIKZHVvZjilf2jewDPs8nIs2O5Nh3BBdXmo/9R2ZsfzlPGP+asD QUQI4PwYe14LhlmxGdXHkf1+V3iZBLlMlqxWu7sT6xUdM1nTVLNo4dCeMYCUWLVF2Nj2 G2fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HHxJA0x+LRFXghubfHB82hDtQXgNDYS3xf4iVdqsEB4=; b=UWwZOSp6/bcvwHSAvrwigC6d5kmDta5ZAqQFTepT2+QnVh2/l2e1SqOyijVP3rLPBj 4e8fxaIwUOW+5eyYXr/PdUi2J+DRr7BZ2hb2kGc8XJNxwDGAOiU2C0mhIXs8l5l79f28 0PMje/pTDlykjntqmAOmlRDgd36Ft0w+riRKZ3s6zhCb966DT0svls3bt5Ip1AKw1MEo wgJ5DlMJwtY80PVJB9JRUQkfK3QIP6G7bK0/rIuz+t1p16NTaNPSJNIHwrxeFLIdj3KK WMaJmga2+kFK0jKO3iYuq1wjzWICM4gnBACpHuG4Ffk8NJkBL3ktFlRCinT0s0YVC5ov jMuA== X-Gm-Message-State: AIkVDXLP1MZFFjXDnnMfBIQ+3PV3LuY2wJZSmg79aQceH30AEeMyApY33jHbOSbFp9v6w0BW X-Received: by 10.98.209.16 with SMTP id z16mr11362397pfg.139.1484846511426; Thu, 19 Jan 2017 09:21:51 -0800 (PST) Received: from krzysztof.pit.corp.google.com ([100.67.11.34]) by smtp.gmail.com with ESMTPSA id 75sm10213565pfp.80.2017.01.19.09.21.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 09:21:50 -0800 (PST) From: Adam Goode To: Henrique de Moraes Holschuh , Darren Hart Cc: ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Adam Goode Subject: [PATCH 1/1] thinkpad_acpi: Add support for status (external cover) LED Date: Thu, 19 Jan 2017 12:21:32 -0500 Message-Id: <20170119172132.36029-1-agoode@google.com> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This allows the control of the red status LED, which is the dot of the "i" in the word "ThinkPad" on the outside cover of newer models. In the manual, both this LED and the power LED are referred to as the "system-status indicators" without distinction between the two, so I chose "status" as the LED name. Signed-off-by: Adam Goode diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index cacb43fb1df7..6577bf8e5635 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -5611,11 +5611,11 @@ static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = { "tpacpi::standby", "tpacpi::dock_status1", "tpacpi::dock_status2", - "tpacpi::unknown_led2", + "tpacpi::status", "tpacpi::unknown_led3", "tpacpi::thinkvantage", }; -#define TPACPI_SAFE_LEDS 0x1081U +#define TPACPI_SAFE_LEDS 0x1481U static inline bool tpacpi_is_led_restricted(const unsigned int led) {