658 Commits

Author SHA1 Message Date
Andy Shevchenko 1ca468e78e pinctrl: intel: Enable 3-bit PAD_OWN feature
Starting from revision 1.1 of the Chassis specification the PAD_OWN
is represented by 3 bits instead of 2 bits in the previous revisions.
Update the driver to support this feature.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-03-19 07:58:53 +01:00
Andy Shevchenko a4337a24d1 pinctrl: intel: Fix the revision for new features (1kOhm PD, HW debouncer)
The 1kOhm pull down and hardware debouncer are features of the revision 0.92
of the Chassis specification. Fix that in the code accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-03-19 07:58:53 +01:00
Andy Shevchenko 340bba73c5 pinctrl: intel: Improve capability support
The register space of a certain capability starts at the offset just after
the respective node in the capability list. It means that there are no fixed
offsets for them from SoC to SoC generation and they have to be calculated
at run-time. Improve capability support by adding the respective calculation
algorithm and in the result enable PWM on more platforms that currently may
use the wrong register.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-03-19 07:58:52 +01:00
Andy Shevchenko 6e544d8748 pinctrl: intel: Align Copyright note with corporate guidelines
The Copyright note must follow the

	Copyright (C) <year(s)> Intel Corporation

template, where (C) is always capitalised and <year(s)> either
a single year or a range. Update the Intel pin control drivers
to follow.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-06 12:05:29 +01:00
Andy Shevchenko 8e03e6ecc2 pinctrl: tangier: Join tng_pinctrl_probe() into its wrapper
There is no clear sign why we have tng_pinctrl_probe() in the first
place when it has already been using managed calls. Join the function
into its devm_tng_pinctrl_probe() wrapper.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-28 14:32:23 +01:00
Andy Shevchenko ae15231c49 pinctrl: tangier: Remove duplicate error messages
The pin control core is covered to report any error via message.
Since that it's not needed in the callers.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-28 14:32:23 +01:00
Andy Shevchenko 8a924c6bd0 pinctrl: lynxpoint: Remove duplicate error messages
The pin control core is covered to report any error via message.
Since that it's not needed in the callers.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-28 14:26:48 +01:00
Andy Shevchenko 04c15be548 pinctrl: cherryview: Remove duplicate error messages
The pin control core is covered to report any error via message.
Since that it's not needed in the callers.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-28 14:26:45 +01:00
Andy Shevchenko bcdcd19e25 pinctrl: baytrail: Remove duplicate error messages
The pin control core is covered to report any error via message.
Since that it's not needed in the callers.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-28 14:26:31 +01:00
Andy Shevchenko a887bcb4dc pinctrl: intel: Remove duplicate error messages
The pin control core is covered to report any error via message.
Since that it's not needed in the callers.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-28 14:26:27 +01:00
Raag Jadav fc32c5725f pinctrl: intel: Add code name documentation
Intel pinctrl drivers support large set of platforms and the IPs are
often reused by their different variants, but it's currently not possible
to figure out the exact driver that supports specific variant. Add user
friendly documentation for them.

Cc: stable@vger.kernel.org
Reported-by: Guido Trentalancia <guido@trentalancia.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220056
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Guido Trentalancia <guido@trentalancia.com>
[andy: added Oxford comma]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-24 10:56:22 +01:00
Andy Shevchenko 069bb6f69a pinctrl: intel: platform: Add Nova Lake to the list of supported
Intel Nova Lake is supported by the generic platform driver,
so add it to the list of supported in Kconfig.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-20 09:35:41 +01:00
Andy Shevchenko bfec8ce11a pinctrl: lynxpoint: Convert to use intel_gpio_add_pin_ranges()
Driver is ready to use intel_gpio_add_pin_ranges() directly instead of
custom approach. Convert it now.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-13 21:46:40 +01:00
Andy Shevchenko 57db74bdaa pinctrl: baytrail: Convert to use intel_gpio_add_pin_ranges()
Driver is ready to use intel_gpio_add_pin_ranges() directly instead of
custom approach. Convert it now.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-01-13 21:46:03 +01:00
Andy Shevchenko 3bcfd55bed pinctrl: cherryview: Convert to use intel_gpio_add_pin_ranges()
Driver is ready to use intel_gpio_add_pin_ranges() directly instead of
custom approach. Convert it now.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-18 15:13:59 +01:00
Andy Shevchenko 2f61c00972 pinctrl: intel: Export intel_gpio_add_pin_ranges()
Export intel_gpio_add_pin_ranges() for reuse in other drivers.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-18 15:13:59 +01:00
Andy Shevchenko cc4e46fa76 pinctrl: elkhartlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-12 07:28:36 +01:00
Andy Shevchenko dd0c7bffe3 pinctrl: cherryview: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-12 07:28:36 +01:00
Andy Shevchenko 6c7a997699 pinctrl: emmitsburg: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-12 07:28:36 +01:00
Andy Shevchenko d772897c7c pinctrl: denverton: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-12 07:28:36 +01:00
Andy Shevchenko ce884de219 pinctrl: cedarfork: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-12 07:28:36 +01:00
Andy Shevchenko d99b7a9d51 pinctrl: sunrisepoint: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:37 +01:00
Andy Shevchenko ba6467787b pinctrl: tigerlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:37 +01:00
Andy Shevchenko 9151857eef pinctrl: meteorpoint: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:37 +01:00
Andy Shevchenko cac89a3dca pinctrl: meteorlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:37 +01:00
Andy Shevchenko c11e90dc9a pinctrl: lakefield: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:37 +01:00
Andy Shevchenko 29d06c2d39 pinctrl: jasperlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:37 +01:00
Andy Shevchenko 51327d6839 pinctrl: icelake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:36 +01:00
Andy Shevchenko 9db14f7102 pinctrl: cannonlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:36 +01:00
Andy Shevchenko 16b37ed0f3 pinctrl: alderlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:36 +01:00
Andy Shevchenko e1a57abb3b pinctrl: intel: Introduce INTEL_GPP() macro
A new macro will be used for the further refactoring of the drivers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-05 18:14:36 +01:00
Andy Shevchenko 534ea60bc4 pinctrl: tangier: Unify messages with help of dev_err_probe()
Unify error messages that might appear during probe phase by
switching to use dev_err_probe().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-04 09:29:31 +01:00
Andy Shevchenko a13735785c pinctrl: lynxpoint: Unify messages with help of dev_err_probe()
Unify error messages that might appear during probe phase by
switching to use dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-04 09:29:31 +01:00
Andy Shevchenko e2620a2c44 pinctrl: intel: Unify messages with help of dev_err_probe()
Unify error messages that might appear during probe phase by
switching to use dev_err_probe().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-04 09:28:56 +01:00
Andy Shevchenko 6afe489df6 pinctrl: cherryview: Unify messages with help of dev_err_probe()
Unify error messages that might appear during probe phase by
switching to use dev_err_probe().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-04 09:28:56 +01:00
Andy Shevchenko cf6dd6cafd pinctrl: baytrail: Unify messages with help of dev_err_probe()
Unify error messages that might appear during probe phase by
switching to use dev_err_probe().

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-11-04 09:28:55 +01:00
Bartosz Golaszewski d9d87d90cc treewide: rename GPIO set callbacks back to their original names
The conversion of all GPIO drivers to using the .set_rv() and
.set_multiple_rv() callbacks from struct gpio_chip (which - unlike their
predecessors - return an integer and allow the controller drivers to
indicate failures to users) is now complete and the legacy ones have
been removed. Rename the new callbacks back to their original names in
one sweeping change.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-08-07 10:07:06 +02:00
Andy Shevchenko 3b4408038d pinctrl: intel: fix build warnings about export.h
After commit a934a57a42 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and 7d95680d64 ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1"), we get some build
warnings with W=1:

pinctrl-intel.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing

So fix these build warnings for the driver code.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-06-12 15:19:08 +03:00
Bartosz Golaszewski 20e62271fb pinctrl: lynxpoint: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-06-11 11:27:30 +03:00
Bartosz Golaszewski 241d79f025 pinctrl: intel: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-06-11 11:27:30 +03:00
Bartosz Golaszewski 83ab731cb2 pinctrl: cherryview: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-06-11 11:27:30 +03:00
Bartosz Golaszewski 4863d750fd pinctrl: baytrail: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-06-11 11:27:30 +03:00
Raag Jadav 0ee2261d08 pinctrl: intel: drop repeated config dependency
We already have ACPI dependency for Intel pinctrl menu. No need to
repeat it.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-03-03 16:20:51 +02:00
Andy Shevchenko aa0554d375 Merge tag 'ib-devres-iio-input-pinctrl-v6.15' into intel/pinctrl
There are a few Intel pin control drivers that are affected
by the devm_kmemdup_array() conversion, merge the ib-devres-iio-input-pinctrl
for making development going smoothly.

* Split devres APIs to a separate header (linux/device/devres.h)
* Move IOMEM_ERR_PTR() to err.h to avoid unneeded loops
* Introduce devm_kmemdup_array()
* Use devm_kmemdup_array() in input, IIO, and pinctrl subsystems

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-02-25 13:16:46 +02:00
Raag Jadav 91bfcc7a2f pinctrl: tangier: use devm_kmemdup_array()
Convert to use devm_kmemdup_array() and while at it, use source size
instead of destination.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-02-24 12:08:52 +02:00
Raag Jadav d795fb90d6 pinctrl: cherryview: use devm_kmemdup_array()
Convert to use devm_kmemdup_array() and while at it, use source size
instead of destination.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-02-24 12:08:52 +02:00
Raag Jadav f192c8447f pinctrl: baytrail: copy communities using devm_kmemdup_array()
Copy communities using devm_kmemdup_array() instead of doing it manually.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-02-24 12:08:52 +02:00
Raag Jadav 753764aa8e pinctrl: intel: copy communities using devm_kmemdup_array()
Copy communities using devm_kmemdup_array() instead of doing it manually.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-02-24 12:08:52 +02:00
Andy Shevchenko 0eee258cdf pinctrl: intel: Fix wrong bypass assignment in intel_pinctrl_probe_pwm()
When instantiating PWM, the bypass should be set to false. The field
is used for the selected Intel SoCs that do not have PWM feature enabled
in their pin control IPs.

Fixes: eb78d3604d ("pinctrl: intel: Enumerate PWM device when community has a capability")
Reported-by: Alexis GUILLEMET <alexis.guillemet@dunasys.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Alexis GUILLEMET <alexis.guillemet@dunasys.com>
2025-02-11 16:27:50 +02:00
Uwe Kleine-König c42a407bee pinctrl: intel: Import PWM_LPSS namespace for devm_pwm_lpss_probe()
The Intel pinctrl driver can provide a PWM device and for that needs to
call the function devm_pwm_lpss_probe(). That function is provided by
the pwm-lpss driver which intends to export it in the "PWM_LPSS"
namespace. To prepare fixing the pwm-lpss driver to indeed use the
"PWM_LPSS" namespace, import that namespace when used.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-02-03 17:22:36 +02:00