From: Andrew Cooks <andrew.cooks@opengear.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Nehal Shah <Nehal-bakulchandra.Shah@amd.com>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Ken Xue <Ken.Xue@amd.com>,
Tobias Diedrich <ranma+kernel@tdiedrich.de>,
Sudheesh Mavila <sudheesh.mavila@amd.com>,
platypus-sw <platypus-sw@opengear.com>,
Timur Tabi <timur@codeaurora.org>
Subject: Re: pinctrl-amd: What hardware does it apply to?
Date: Fri, 22 Dec 2017 10:37:32 +1000 [thread overview]
Message-ID: <44f3de2a-4f1b-bc0c-ee5d-3cdf20a766cf@opengear.com> (raw)
In-Reply-To: <20171221121256.GY27654@lahna.fi.intel.com>
On 21/12/17 22:12, Mika Westerberg wrote:
> On Thu, Dec 21, 2017 at 11:11:18AM +0100, Linus Walleij wrote:
>>> In contrast, the pinctrl-amd driver only mentions the newer KERNCZ platform
>>> name and uses ACPI for probing without disclosing any Family or Model numbers.
>>>
>>> pinctrl-amd applies to "AMD0030" and "AMDI0030"
>>>
>>> The ACPI HID matching makes it difficult to determine what family and model the
>>> driver applies to, or rather, I have not been able to find such a mapping of HIDs
>>> to family and model numbers. It's also impossible to guess an ACPI _HID
>>> that may or may not exist for the Family 16h Model 30h platform and even if I
>>> allocate a new HID for our ACPI implementation, that HID has little hope of
>>> being accepted into the mainline driver.
>>
>> I didn't understand anything of what you just wrote.
>> I am basically ignorant when it comes to ACPI details.
>>
>> So let's CC the GPIO ACPI maintainer, Mika Westerberg.
>
> If the hardware is not the same that is already supported by the
> pinctrl-amd, then you definitely should allocate a new separate ACPI
> _HID for it. That's pretty much what we do with every new SoC because
> they typically don't have identical pin lists among other things.
>
Right. I wonder if my reasons for objecting to using ACPI _HID in this way (as the existing drivers do) are being overlooked, or if there's something missing in my understanding.
Given the HID "AMDI0030", it is difficult for anyone besides AMD to determine what SoC that is intended to match. Joe Random Developer would not be able to find the datasheet for the SoC and verify that this driver works correctly, or whether it is used by any firmware at all.
However, my specific problem is the inverse. Given a SoC without vendor-supplied HID or DSDT ASL (ie. I'm writing the DSDT ASL), I don't know what HID to allocate for the driver and DSDT, and I'm too low in the food chain to allocate the one true HID for this SoC that every firmware developer and driver developer should use. This is not a problem for out-of-tree patches, but it blocks me from contributing usable support for a new SoC.
So my objection is that the coupling between the driver and ACPI firmware, caused by these special HID strings, is both unnecessary and disempowering. If an appropriate ID register exists in the MMIO space, I think that would solve this issue.
I'm hoping to confirm whether my assessment is correct.
Thanks
a.
next prev parent reply other threads:[~2017-12-22 0:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 22:25 pinctrl-amd: What hardware does it apply to? Andrew Cooks
2017-12-21 10:11 ` Linus Walleij
2017-12-21 12:12 ` Mika Westerberg
2017-12-22 0:37 ` Andrew Cooks [this message]
2017-12-22 6:05 ` Mika Westerberg
2017-12-22 0:44 ` Andrew Cooks
[not found] ` <CAOdcoTnpiWkPu4_eOJ6bzUE58PqRHw-y5yHY2T8M3Ymp_2v0MQ@mail.gmail.com>
2017-12-22 1:05 ` Andrew Cooks
2017-12-21 13:02 ` Christian Lamparter
2017-12-22 1:17 ` Andrew Cooks
2017-12-22 7:48 ` Linus Walleij
2017-12-22 17:49 ` Christian Lamparter
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=44f3de2a-4f1b-bc0c-ee5d-3cdf20a766cf@opengear.com \
--to=andrew.cooks@opengear.com \
--cc=Ken.Xue@amd.com \
--cc=Nehal-bakulchandra.Shah@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platypus-sw@opengear.com \
--cc=ranma+kernel@tdiedrich.de \
--cc=sudheesh.mavila@amd.com \
--cc=timur@codeaurora.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;
as well as URLs for NNTP newsgroup(s).