Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755278AbbFONQ5 (ORCPT ); Mon, 15 Jun 2015 09:16:57 -0400 Received: from nef2.ens.fr ([129.199.96.40]:3590 "EHLO nef2.ens.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089AbbFONQt (ORCPT ); Mon, 15 Jun 2015 09:16:49 -0400 X-Greylist: delayed 2092 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Jun 2015 09:16:49 EDT Date: Mon, 15 Jun 2015 14:41:53 +0200 From: Nicolas George To: linux-kernel@vger.kernel.org Subject: Help configuring kernel for Baytrail system Message-ID: <20150615124152.GA3311637@phare.normalesup.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Mon, 15 Jun 2015 14:41:53 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I am trying to configure a kernel for a Baytrail SoC-based hybrid laptop (a Lenovo Miix 3-1030). Amongst other things, the battery gauge is not detected. I suspect it may be related to the following commit: # commit 894acb2f823b13afacfe40b02efbd9146af58586 # Author: David Box # Date: Thu Jan 15 01:12:17 2015 -0800 #=20 # i2c: designware: Add Intel Baytrail PMIC I2C bus support It is very likely that I am missing a simple compile-time or run-time option, and in that case, on top of getting the configuration right, I have a second question: how could I find the solution by myself? Here is the problem data: - The battery gauge works with the kernel from the Ubuntu 15.4 live image. Quite a few other things fail to work with that kernel, so using it is not a solution, but it is proof that it can work. - I have tried with 3.16 from Debian, 4.0.1 and 4.1-rc* with custom configuration, and the battery is completely invisible. Nothing in dmesg. - The sysfs entry for the battery is this: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/80860F41:00/PNP0C0A:00 It should contain a driver link to bus/acpi/drivers/battery, but it does not. - Adding custom debug messages, I was able to find that acpi_bus_get_status_handle() evaluates the _STA attribute of the BATC device to 0, meaning the device is not present. - The corresponding code in the ACPI tables is this: Device (BATC) { [...] Method (_STA, 0, NotSerialized) // _STA: Status { If ((AVBL =3D=3D One)) { BUF7 =3D CMD7 /* \_SB_.I2C1.CMD7 */ If ((STAT !=3D Zero)) { Return (Zero) } Return (0x1F) } Return (Zero) } but I do not know how to debug further. Enabling full ACPI debug messages gives so much output that it is unusable. - I also suspect that the issue comes from the "dev->pm_runtime_disabled" flag on the corresponding I2C bus entry: it is enabled by i2c_dw_eval_lock_support() with a message "I2C bus managed by PUNIT", and inhibits probing the device. I did not manage to find how to re-enable it. Please let me know if you have any advice on this issue in particular or any more general documentation on how to investigate I2C and PLATFORM/ACPI-based systems. In the meantime, I have summarized what I was able to get working on this laptop on the following webpage: http://nsup.org/~george/comp/linux_lenovo_miix3/ Regards, --=20 Nicolas George --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVfsgQAAoJEHGVSyPKTcYM1SQQAIX9kAvTNuRc1xQHAFLJSg+F CK8iKN14mSJk1daZ3YEqW8Ax7k9QZ01UBISbyuILcJmLaOuN3q/pUIJtGoyJXXhO JP1/di5uClRz0phwYMu6lveLXmy3Uunycmb6ImAmO0qF0pP3yZsXSTpuqFs3lTFM MgTosLALYqaVW3E0UEc0wINBUEHm3dCystZbShw7KO3jj7Ld7uyeePTShkWnR4kA 6gTFRMXDdsDcvfg2QY1iOVa+RsT5+p+sGJzFi2eIaRnLkCcEnfljglreCmXKBSfY ZVVI38Jd39JS7MtRRzI7bWMMS5yx6Ntv41qyxObLpgWpyrKG3S8xkzxtsanCUqvC Xi0gfOc0cMhZq80PUQaKzEdpXdW5yn1klUsCWlFbokgZce8KUIpnMy/XPohFND/n jC4E+mS5c5GNMt68wF26xuBZ5waF6eWYfoWq7L/fgWQWsrd46Q5fwXK+HrZ+Go9f oagQOUaytTPFN8HwfvPgm+fikBHa4CN1shH0x93uCL8jcMTxDFYpVFYX6Df7eEYl 0HRILi6rzEVHiaYNoJXMqaJz2vy4p6GF8oyl45adAorevB6jcas3heqCGs4RE39+ Z/dNRX1EYHU29qTJYeSEO3MRev+L2+0QLbQ2T8QekoTgRiLlHXfF3xWbB4JOImlg Oa4qd50TOdRU8lBFUfbj =LzoC -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--