From: Nicolas George <george@nsup.org>
To: linux-kernel@vger.kernel.org
Subject: Help configuring kernel for Baytrail system
Date: Mon, 15 Jun 2015 14:41:53 +0200 [thread overview]
Message-ID: <20150615124152.GA3311637@phare.normalesup.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2713 bytes --]
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 <david.e.box@linux.intel.com>
# Date: Thu Jan 15 01:12:17 2015 -0800
#
# 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 == One))
{
BUF7 = CMD7 /* \_SB_.I2C1.CMD7 */
If ((STAT != 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,
--
Nicolas George
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2015-06-15 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 12:41 Nicolas George [this message]
2015-06-25 17:30 Andy Shevchenko
2015-06-26 9:18 ` Nicolas George
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150615124152.GA3311637@phare.normalesup.org \
--to=george@nsup.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®