From: Sinan Kaya <okaya@codeaurora.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Timur Tabi <timur@codeaurora.org>,
Eric Auger <eric.auger@redhat.com>,
Hans de Goede <hdegoede@redhat.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>,
linux-i2c <linux-i2c@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v3] ACPI: Force I2C to be selected as a built-in module
Date: Thu, 25 Jan 2018 12:07:10 -0500 [thread overview]
Message-ID: <8637b666-19ce-5382-adab-94a9382cf635@codeaurora.org> (raw)
In-Reply-To: <CAJZ5v0ji0pJTSR8Z9Yabgu-A_KJ2wx3hF-gzoSEeaKwFd2m+iw@mail.gmail.com>
On 1/25/2018 11:57 AM, Rafael J. Wysocki wrote:
>> That was the original patch. Folks are saying that it breaks some systems.
>>
>> Conversation is here:
>>
>> https://patchwork.kernel.org/patch/10142425/
> Couldn't that be addressed by preventing the I2C module from being
> unloaded in the relevant cases?
>
Maybe, I'll let Andy And Hans speak for themselves. It is not my code.
I listed the spec behavior and expectation from the OS in the link above.
Apparently, Linux isn't playing nice.
Hans is also raising a concern about driver load order that is not being
handled well between the I2C driver, its sub modules like PMIC and the ACPI support.
"Lets pretend that all DSTDs are perfect and that some device described in ACPI
has a _PS0 method which uses an opregion to turn on some regulator powering
the device through i2c, but only if the _REG method for that opregion has
been called. So now lets say that the driver for this device loads and
tries to bind before the i2c-module has loaded. Before the driver's probe
method gets called the driver-core will call _PS0 to power-up the device,
which is a nop (*). Then the drivers probe function tries to talk to the
device, but fails as the device is not powered, so it returns with -ENODEV."
I'd think that driver would return -EPROBE_DEFER in order to wait until its
dependencies come in place. Maybe, driver was not designed for this.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2018-01-25 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 15:43 [PATCH v3] ACPI: Force I2C to be selected as a built-in module Sinan Kaya
2018-01-25 16:25 ` Rafael J. Wysocki
2018-01-25 16:32 ` Sinan Kaya
2018-01-25 16:47 ` Rafael J. Wysocki
2018-01-25 16:53 ` Sinan Kaya
2018-01-25 16:57 ` Rafael J. Wysocki
2018-01-25 17:07 ` Sinan Kaya [this message]
2018-01-25 17:11 ` Hans de Goede
2018-01-25 17:36 ` Randy Dunlap
2018-02-06 14:25 ` Sinan Kaya
2018-02-08 9:52 ` Rafael J. Wysocki
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=8637b666-19ce-5382-adab-94a9382cf635@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=andy.shevchenko@gmail.com \
--cc=eric.auger@redhat.com \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=timur@codeaurora.org \
--cc=wsa@the-dreams.de \
/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