Re: [PATCH v1 2/2] pinctrl: intel: Try to retrieve driver data for pure platform drivers
From: Radek Válko
Date: Wed Sep 02 2026 - 14:30:53 EST
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@xxxxxxxxxx>
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@xxxxxxxxxx>
Closes: https://lore.kernel.org/r/20260827184259.32386-1-rvalko@xxxxxxxxxx
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
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);
}