Received: by 10.213.65.68 with SMTP id h4csp219244imn; Fri, 23 Mar 2018 03:10:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELsl3pLo5+B8fiWAti/fMAchpEdRfh1/JxJZWzlUTXHq/480B/BVo3k/07t7fnGQa3dW6xa7 X-Received: by 10.99.160.67 with SMTP id u3mr20106397pgn.389.1521799812291; Fri, 23 Mar 2018 03:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521799812; cv=none; d=google.com; s=arc-20160816; b=eJKQZiriYHrUtBO2sn79/ze4NzoydPmRaHMJE8b5BikE1LtMUbjzFDtwbSxq6gdTlr F66bhRMj2OkNBdexEVCk33My1dDJRSl1bewXB0xWT1vSad0TFmuEQz+w60ipZXP8r9NN H1ognxPNFxfCyGy15k9OljURxmwEh645S3f5vkPJ6yHvTASlighdeGmM7Mc9aShYfx3m Z/k9d0I8mSIpJyCSjrfLTDglnqwJk+cStr2xEBTcIpF2X+dJJEtpNwKCA+T95DTcGAhP 0THaJ2a4EBwPq4pnnawxAAWrZiYz/hrwgiFQsxCHkCddNuBUxhE/iycMhH2JZd9IjwPb NRbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mGXANhpJyiBuGoGb1EJKgTSJWNfKIBgqDbk6Ko/9m/o=; b=hErQqP+3gvf7diPS4pyT1HN24V6lmkJpIK2irTqMicjnjYirxOFNSD5m/YCiRJt492 uWG7dyIgrRppvWOj6Zd7UiboKuCOVP0gYHdLTzTd1iW4aL1QSJa/uANffsvpcVUOImOM 7lZA66Z1c2z0HVsXv2rY0CMxOr/VcllKtE2RsI9ryn0oQu8fsgVQZjC9O3O2Fcd3INdQ YdsdDVNUnNKzKG3hQ5gU8GdKb7PM6vdqmwEb0ba5l+hNpzilrWKZINIfs6r5X9zon9HD 7bh0r0FPZpiGKokf35+uT21Bd2ovrgPkc98k8qvJNUrxm0lO95jHHjVruenxnCk9w5Fk hZlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u74si5698085pgc.264.2018.03.23.03.09.56; Fri, 23 Mar 2018 03:10:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755596AbeCWKIk (ORCPT + 99 others); Fri, 23 Mar 2018 06:08:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41718 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755575AbeCWKId (ORCPT ); Fri, 23 Mar 2018 06:08:33 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 096D3E8B; Fri, 23 Mar 2018 10:08:32 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Andy Shevchenko , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.9 099/177] ACPI / PMIC: xpower: Fix power_table addresses Date: Fri, 23 Mar 2018 10:53:47 +0100 Message-Id: <20180323094209.651558835@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094205.090519271@linuxfoundation.org> References: <20180323094205.090519271@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede [ Upstream commit 2bde7c32b1db162692f05c6be066b5bcd3d9fdbe ] The power table addresses should be contiguous, but there was a hole where 0x34 was missing. On most devices this is not a problem as addresses above 0x34 are used for the BUC# convertors which are not used in the DSDTs I've access to but after the BUC# convertors there is a field named GPI1 in the DSTDs, which does get used in some cases and ended up turning BUC6 on and off due to the wrong addresses, resulting in turning the entire device off (or causing it to reboot). Removing the hole in the addresses fixes this, fixing one of my Bay Trail tablets turning off while booting the mainline kernel. While at it add comments with the field names used in the DSDTs to make it easier to compare the register and bits used at each address with the datasheet. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/pmic/intel_pmic_xpower.c | 50 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) --- a/drivers/acpi/pmic/intel_pmic_xpower.c +++ b/drivers/acpi/pmic/intel_pmic_xpower.c @@ -28,97 +28,97 @@ static struct pmic_table power_table[] = .address = 0x00, .reg = 0x13, .bit = 0x05, - }, + }, /* ALD1 */ { .address = 0x04, .reg = 0x13, .bit = 0x06, - }, + }, /* ALD2 */ { .address = 0x08, .reg = 0x13, .bit = 0x07, - }, + }, /* ALD3 */ { .address = 0x0c, .reg = 0x12, .bit = 0x03, - }, + }, /* DLD1 */ { .address = 0x10, .reg = 0x12, .bit = 0x04, - }, + }, /* DLD2 */ { .address = 0x14, .reg = 0x12, .bit = 0x05, - }, + }, /* DLD3 */ { .address = 0x18, .reg = 0x12, .bit = 0x06, - }, + }, /* DLD4 */ { .address = 0x1c, .reg = 0x12, .bit = 0x00, - }, + }, /* ELD1 */ { .address = 0x20, .reg = 0x12, .bit = 0x01, - }, + }, /* ELD2 */ { .address = 0x24, .reg = 0x12, .bit = 0x02, - }, + }, /* ELD3 */ { .address = 0x28, .reg = 0x13, .bit = 0x02, - }, + }, /* FLD1 */ { .address = 0x2c, .reg = 0x13, .bit = 0x03, - }, + }, /* FLD2 */ { .address = 0x30, .reg = 0x13, .bit = 0x04, - }, + }, /* FLD3 */ { - .address = 0x38, + .address = 0x34, .reg = 0x10, .bit = 0x03, - }, + }, /* BUC1 */ { - .address = 0x3c, + .address = 0x38, .reg = 0x10, .bit = 0x06, - }, + }, /* BUC2 */ { - .address = 0x40, + .address = 0x3c, .reg = 0x10, .bit = 0x05, - }, + }, /* BUC3 */ { - .address = 0x44, + .address = 0x40, .reg = 0x10, .bit = 0x04, - }, + }, /* BUC4 */ { - .address = 0x48, + .address = 0x44, .reg = 0x10, .bit = 0x01, - }, + }, /* BUC5 */ { - .address = 0x4c, + .address = 0x48, .reg = 0x10, .bit = 0x00 - }, + }, /* BUC6 */ }; /* TMP0 - TMP5 are the same, all from GPADC */