* [PATCH v1 0/2] pinctrl: intel: retrieve pure platform driver data as well
@ 2026-08-31 14:25 Andy Shevchenko
2026-08-31 14:25 ` [PATCH v1 1/2] pinctrl: intel: Move intel_pinctrl_get_soc_data() upper in the code Andy Shevchenko
2026-08-31 14:25 ` [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers Andy Shevchenko
0 siblings, 2 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-08-31 14:25 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij, Radek Válko
The reported platform can't be enumerated as it misses driver data
associated with the firmware node. Instead we should use platform
driver data. This mini-series to make it happen.
Radek, please test at least the second patch and provide your formal
Tested-by tag in case it works as expected.
Cc: Radek Válko <rvalko@lipicko.cz>
Andy Shevchenko (2):
pinctrl: intel: Move intel_pinctrl_get_soc_data() upper in the code
pinctrl: intel: Try to retrieve driver data for pure platform drivers
drivers/pinctrl/intel/pinctrl-intel.c | 47 +++++++++++++++++++--------
1 file changed, 33 insertions(+), 14 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 1/2] pinctrl: intel: Move intel_pinctrl_get_soc_data() upper in the code
2026-08-31 14:25 [PATCH v1 0/2] pinctrl: intel: retrieve pure platform driver data as well Andy Shevchenko
@ 2026-08-31 14:25 ` Andy Shevchenko
2026-08-31 14:25 ` [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers Andy Shevchenko
1 sibling, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-08-31 14:25 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij
While it's exported function, move it upper in the code to be on top
of the local user. This brings a consistency to the follow change
that will introduce similar helper for the intel_pinctrl_probe_by_hid().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-intel.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 981535e023aa..7aa7f81ac405 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1728,18 +1728,6 @@ int intel_pinctrl_probe_by_hid(struct platform_device *pdev)
}
EXPORT_SYMBOL_NS_GPL(intel_pinctrl_probe_by_hid, "PINCTRL_INTEL");
-int intel_pinctrl_probe_by_uid(struct platform_device *pdev)
-{
- const struct intel_pinctrl_soc_data *data;
-
- data = intel_pinctrl_get_soc_data(pdev);
- if (IS_ERR(data))
- return PTR_ERR(data);
-
- return intel_pinctrl_probe(pdev, data);
-}
-EXPORT_SYMBOL_NS_GPL(intel_pinctrl_probe_by_uid, "PINCTRL_INTEL");
-
const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_device *pdev)
{
const struct intel_pinctrl_soc_data * const *table;
@@ -1771,6 +1759,18 @@ const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_
}
EXPORT_SYMBOL_NS_GPL(intel_pinctrl_get_soc_data, "PINCTRL_INTEL");
+int intel_pinctrl_probe_by_uid(struct platform_device *pdev)
+{
+ const struct intel_pinctrl_soc_data *data;
+
+ data = intel_pinctrl_get_soc_data(pdev);
+ if (IS_ERR(data))
+ return PTR_ERR(data);
+
+ return intel_pinctrl_probe(pdev, data);
+}
+EXPORT_SYMBOL_NS_GPL(intel_pinctrl_probe_by_uid, "PINCTRL_INTEL");
+
static bool __intel_gpio_is_direct_irq(u32 value)
{
return (value & PADCFG0_GPIROUTIOXAPIC) &&
--
2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers
2026-08-31 14:25 [PATCH v1 0/2] pinctrl: intel: retrieve pure platform driver data as well Andy Shevchenko
2026-08-31 14:25 ` [PATCH v1 1/2] pinctrl: intel: Move intel_pinctrl_get_soc_data() upper in the code Andy Shevchenko
@ 2026-08-31 14:25 ` Andy Shevchenko
2026-09-01 10:24 ` Mika Westerberg
2026-09-02 18:12 ` Radek Válko
1 sibling, 2 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-08-31 14:25 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij, Radek Válko
The Denverton pinctrl device can be instantiated by the Intel LPC
driver as an MFD platform device named "denverton-pinctrl".
On affected systems the platform device does not carry the INTC3000
ACPI match data itself. As a result, intel_pinctrl_probe_by_hid()
fails to obtain the SoC data using device_get_match_data() and
returns -ENODATA.
This might be also true for other platforms that can be enumerated
by ACPI _HID. Fix the above by trying the pure platform driver data
in case the firmware node is not set or doesn't carry the necessary
information.
Reported-by: Radek Válko <rvalko@lipicko.cz>
Closes: https://lore.kernel.org/r/20260827184259.32386-1-rvalko@lipicko.cz
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-intel.c | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 7aa7f81ac405..50ffad6a7610 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1716,13 +1716,32 @@ int intel_pinctrl_probe(struct platform_device *pdev,
}
EXPORT_SYMBOL_NS_GPL(intel_pinctrl_probe, "PINCTRL_INTEL");
+static const struct intel_pinctrl_soc_data *
+intel_pinctrl_get_soc_data_by_hid(struct platform_device *pdev)
+{
+ const struct intel_pinctrl_soc_data *data;
+ const struct platform_device_id *id;
+ struct device *dev = &pdev->dev;
+
+ data = device_get_match_data(dev);
+ if (data)
+ return data;
+
+ id = platform_get_device_id(pdev);
+ if (!id)
+ return ERR_PTR(-ENODEV);
+
+ data = (const struct intel_pinctrl_soc_data *)id->driver_data;
+ return data ?: ERR_PTR(-ENODATA);
+}
+
int intel_pinctrl_probe_by_hid(struct platform_device *pdev)
{
const struct intel_pinctrl_soc_data *data;
- data = device_get_match_data(&pdev->dev);
- if (!data)
- return -ENODATA;
+ data = intel_pinctrl_get_soc_data_by_hid(pdev);
+ if (IS_ERR(data))
+ return PTR_ERR(data);
return intel_pinctrl_probe(pdev, data);
}
--
2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers
2026-08-31 14:25 ` [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers Andy Shevchenko
@ 2026-09-01 10:24 ` Mika Westerberg
2026-09-01 10:27 ` Andy Shevchenko
2026-09-02 18:12 ` Radek Válko
1 sibling, 1 reply; 7+ messages in thread
From: Mika Westerberg @ 2026-09-01 10:24 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij,
Radek Válko
On Mon, Aug 31, 2026 at 04:25:47PM +0200, Andy Shevchenko wrote:
> The Denverton pinctrl device can be instantiated by the Intel LPC
> driver as an MFD platform device named "denverton-pinctrl".
>
> On affected systems the platform device does not carry the INTC3000
> ACPI match data itself. As a result, intel_pinctrl_probe_by_hid()
> fails to obtain the SoC data using device_get_match_data() and
> returns -ENODATA.
>
> This might be also true for other platforms that can be enumerated
> by ACPI _HID. Fix the above by trying the pure platform driver data
> in case the firmware node is not set or doesn't carry the necessary
> information.
>
> Reported-by: Radek Válko <rvalko@lipicko.cz>
> Closes: https://lore.kernel.org/r/20260827184259.32386-1-rvalko@lipicko.cz
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/pinctrl/intel/pinctrl-intel.c | 25 ++++++++++++++++++++++---
> 1 file changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> index 7aa7f81ac405..50ffad6a7610 100644
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -1716,13 +1716,32 @@ int intel_pinctrl_probe(struct platform_device *pdev,
> }
> EXPORT_SYMBOL_NS_GPL(intel_pinctrl_probe, "PINCTRL_INTEL");
>
> +static const struct intel_pinctrl_soc_data *
> +intel_pinctrl_get_soc_data_by_hid(struct platform_device *pdev)
pdev can be const, no?
> +{
> + const struct intel_pinctrl_soc_data *data;
> + const struct platform_device_id *id;
> + struct device *dev = &pdev->dev;
> +
> + data = device_get_match_data(dev);
> + if (data)
> + return data;
> +
> + id = platform_get_device_id(pdev);
> + if (!id)
> + return ERR_PTR(-ENODEV);
> +
> + data = (const struct intel_pinctrl_soc_data *)id->driver_data;
> + return data ?: ERR_PTR(-ENODATA);
> +}
> +
> int intel_pinctrl_probe_by_hid(struct platform_device *pdev)
> {
> const struct intel_pinctrl_soc_data *data;
>
> - data = device_get_match_data(&pdev->dev);
> - if (!data)
> - return -ENODATA;
> + data = intel_pinctrl_get_soc_data_by_hid(pdev);
> + if (IS_ERR(data))
> + return PTR_ERR(data);
>
> return intel_pinctrl_probe(pdev, data);
> }
> --
> 2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers
2026-09-01 10:24 ` Mika Westerberg
@ 2026-09-01 10:27 ` Andy Shevchenko
2026-09-01 14:45 ` Radek Válko
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2026-09-01 10:27 UTC (permalink / raw)
To: Mika Westerberg
Cc: Andy Shevchenko, linux-gpio, linux-kernel, Andy Shevchenko,
Linus Walleij, Radek Válko
On Tue, Sep 1, 2026 at 1:24 PM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Mon, Aug 31, 2026 at 04:25:47PM +0200, Andy Shevchenko wrote:
> > The Denverton pinctrl device can be instantiated by the Intel LPC
> > driver as an MFD platform device named "denverton-pinctrl".
...
> > +static const struct intel_pinctrl_soc_data *
> > +intel_pinctrl_get_soc_data_by_hid(struct platform_device *pdev)
>
> pdev can be const, no?
Yes, but it will require also to change the existing prototype for
_uid case. After I get a confirmation the fix works I will issue a v2
with an additional patch included.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers
2026-09-01 10:27 ` Andy Shevchenko
@ 2026-09-01 14:45 ` Radek Válko
0 siblings, 0 replies; 7+ messages in thread
From: Radek Válko @ 2026-09-01 14:45 UTC (permalink / raw)
To: Andy Shevchenko, Mika Westerberg
Cc: Andy Shevchenko, linux-gpio, linux-kernel, Andy Shevchenko,
Linus Walleij, Radek Válko
Hi,
I test it hopefully tomorrow and will let you know.
Thanks.
Radek
On 9/1/26 12:27, Andy Shevchenko wrote:
> On Tue, Sep 1, 2026 at 1:24 PM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
>> On Mon, Aug 31, 2026 at 04:25:47PM +0200, Andy Shevchenko wrote:
>>> The Denverton pinctrl device can be instantiated by the Intel LPC
>>> driver as an MFD platform device named "denverton-pinctrl".
> ...
>
>>> +static const struct intel_pinctrl_soc_data *
>>> +intel_pinctrl_get_soc_data_by_hid(struct platform_device *pdev)
>> pdev can be const, no?
> Yes, but it will require also to change the existing prototype for
> _uid case. After I get a confirmation the fix works I will issue a v2
> with an additional patch included.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers
2026-08-31 14:25 ` [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers Andy Shevchenko
2026-09-01 10:24 ` Mika Westerberg
@ 2026-09-02 18:12 ` Radek Válko
1 sibling, 0 replies; 7+ messages in thread
From: Radek Válko @ 2026-09-02 18:12 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij, Radek Válko
Hi Andy,
thanks for the patch.
I tested [PATCH v1 2/2] successfully on the affected Intel Atom
C3000 / Denverton system, first with Linux 6.12.105 and now also
with Linux 6.12.107.
With the patch applied, the original -ENODATA (-61) probe failure
is gone. The pinctrl device registers successfully:
denverton-pinctrl.0 yes yes
and the GPIO controller exposes all 154 lines:
gpiochip0 - 154 lines
Tested-by: Radek Válko <rvalko@lipicko.cz>
Thanks,
Radek
On 8/31/26 16:25, Andy Shevchenko wrote:
> The Denverton pinctrl device can be instantiated by the Intel LPC
> driver as an MFD platform device named "denverton-pinctrl".
>
> On affected systems the platform device does not carry the INTC3000
> ACPI match data itself. As a result, intel_pinctrl_probe_by_hid()
> fails to obtain the SoC data using device_get_match_data() and
> returns -ENODATA.
>
> This might be also true for other platforms that can be enumerated
> by ACPI _HID. Fix the above by trying the pure platform driver data
> in case the firmware node is not set or doesn't carry the necessary
> information.
>
> Reported-by: Radek Válko <rvalko@lipicko.cz>
> Closes: https://lore.kernel.org/r/20260827184259.32386-1-rvalko@lipicko.cz
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/pinctrl/intel/pinctrl-intel.c | 25 ++++++++++++++++++++++---
> 1 file changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> index 7aa7f81ac405..50ffad6a7610 100644
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -1716,13 +1716,32 @@ int intel_pinctrl_probe(struct platform_device *pdev,
> }
> EXPORT_SYMBOL_NS_GPL(intel_pinctrl_probe, "PINCTRL_INTEL");
>
> +static const struct intel_pinctrl_soc_data *
> +intel_pinctrl_get_soc_data_by_hid(struct platform_device *pdev)
> +{
> + const struct intel_pinctrl_soc_data *data;
> + const struct platform_device_id *id;
> + struct device *dev = &pdev->dev;
> +
> + data = device_get_match_data(dev);
> + if (data)
> + return data;
> +
> + id = platform_get_device_id(pdev);
> + if (!id)
> + return ERR_PTR(-ENODEV);
> +
> + data = (const struct intel_pinctrl_soc_data *)id->driver_data;
> + return data ?: ERR_PTR(-ENODATA);
> +}
> +
> int intel_pinctrl_probe_by_hid(struct platform_device *pdev)
> {
> const struct intel_pinctrl_soc_data *data;
>
> - data = device_get_match_data(&pdev->dev);
> - if (!data)
> - return -ENODATA;
> + data = intel_pinctrl_get_soc_data_by_hid(pdev);
> + if (IS_ERR(data))
> + return PTR_ERR(data);
>
> return intel_pinctrl_probe(pdev, data);
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-02 18:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 14:25 [PATCH v1 0/2] pinctrl: intel: retrieve pure platform driver data as well Andy Shevchenko
2026-08-31 14:25 ` [PATCH v1 1/2] pinctrl: intel: Move intel_pinctrl_get_soc_data() upper in the code Andy Shevchenko
2026-08-31 14:25 ` [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers Andy Shevchenko
2026-09-01 10:24 ` Mika Westerberg
2026-09-01 10:27 ` Andy Shevchenko
2026-09-01 14:45 ` Radek Válko
2026-09-02 18:12 ` Radek Válko
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®