Received: by 10.213.65.68 with SMTP id h4csp242769imn; Fri, 23 Mar 2018 03:44:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELvZMPDXXdWl2X/clBh50ynfIhK+KvduPXOIQ+acPAD85kksiXA7wz4kPi8qSyp7nlkucE1v X-Received: by 10.98.137.218 with SMTP id n87mr1200274pfk.48.1521801898814; Fri, 23 Mar 2018 03:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801898; cv=none; d=google.com; s=arc-20160816; b=WAmpEUoIsjdV6+JFPOuK7ZdbWrE7bQ6PEAh8xQJBP7vb29VlDUcr+++m+cRBnMr83l oIeREkcb7lEjfL5rTXJhbKo2RikqcqnLHVNVEFzsPlHeCJNJhAybIUsifEFuLIx3KC2/ XFeIN52+nOF7S3V/yecl6tzj0lrJXGw2tjN1EfQKLoxLtJw1eOjUjE/sEx5GwiP7ZF10 0dJn7+Q98D9naJyo+6ac97T21tapLUqi4XfUv0xq05YA96fI1/QSkm+9dW8LeBxgRvxH Z4+uUq14JFEK04P7I2H316eANxDLbcFoxY1kN+HDz6D3Q7IYb88fI/i7LBemBpajvbTc Ck4w== 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=M2LX1T6DhVmd0ULCsSAPDA6u93AT2f8i9XBJfNTa3vg=; b=RJeV9D+dZXFooJ7XQcdzjdGfdLfksv5us44tXBAfFo5IcihKEIIxBe0bmakmdamIV9 i2TfZoXBW9/nbqQjqkOovRWjcYtnkXWOzDG89lOtq0gxuMT3/F86311J+DQyRQQd33nT G0EdfhhlR1CKs8C25WmZuXfiiBad0ecKgKBSYDH1e7PTXsP8UdgdLblVh5VjYw4yuRSD N/P46LV6KOt797x8IMpxchY60AdiaeQVCICVtBv4EQy21vgbLqAJbZ03YVysnT6uLTUE bEw4nK50Z7KXAyG/VYUuYwfccUumxPosvDB0YYq02fDa4sEpNmqADxJgXGsgBHTuHHNs lF5A== 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 h14si6470804pfd.404.2018.03.23.03.44.43; Fri, 23 Mar 2018 03:44:58 -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 S1756465AbeCWKnp (ORCPT + 99 others); Fri, 23 Mar 2018 06:43:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46586 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933574AbeCWKQE (ORCPT ); Fri, 23 Mar 2018 06:16:04 -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 5977637; Fri, 23 Mar 2018 10:16:03 +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.4 58/97] ACPI / PMIC: xpower: Fix power_table addresses Date: Fri, 23 Mar 2018 10:54:45 +0100 Message-Id: <20180323094200.892454673@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@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.4-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 */