pinctrl: intel: Add generic platform driver
Subsystems (3)
v2 cover pinctrl: intel: Add generic platform driver
New Intel platforms one-by-one will be switching to use generic approach for the pin control description in ACPI, hence this driver.
It depends on the series
https://lore.kernel.org/r/[email protected],
which is pending for v6.8-rc1 (will be soon in Linux Next).
In v2:
- squashed ID patch into the driver one (Mika)
- added the list of platforms/SoCs that requires this driver (Mika)
- added a comment about single community per device (Mika)
- miscellaneous fixes (Mika)
Andy Shevchenko (2):
pinctrl: intel: Revert "Unexport intel_pinctrl_probe()"
pinctrl: intel: Add a generic Intel pin control platform driver
drivers/pinctrl/intel/Kconfig | 10 + drivers/pinctrl/intel/Makefile | 1 + .../pinctrl/intel/pinctrl-intel-platform.c | 225 ++++++++++++++++++ drivers/pinctrl/intel/pinctrl-intel.c | 5 +- drivers/pinctrl/intel/pinctrl-intel.h | 3 + 5 files changed, 242 insertions(+), 2 deletions(-) create mode 100644 drivers/pinctrl/intel/pinctrl-intel-platform.c
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
PATCH v2 1/2 pinctrl: intel: Revert "Unexport intel_pinctrl_probe()"
In order to prepare for a new coming driver export the original intel_pinctrl_probe() again.
This reverts commit 0dd519e3784b13befa1cdfeff847a0885b06650f.
--- drivers/pinctrl/intel/pinctrl-intel.c | 5 +++-- drivers/pinctrl/intel/pinctrl-intel.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/pinctrl/intel/pinctrl-intel.c +3 -2
@@ -1504,8 +1504,8 @@ static int intel_pinctrl_probe_pwm(struct intel_pinctrl *pctrl,return PTR_ERR_OR_ZERO (pwm); } -static int intel_pinctrl_probe (struct platform_device *pdev, -const struct intel_pinctrl_soc_data *soc_data) +int intel_pinctrl_probe (struct platform_device *pdev, +const struct intel_pinctrl_soc_data *soc_data) {struct device *dev = &pdev->dev;struct intel_pinctrl *pctrl;
@@ -1623,6 +1623,7 @@ static int intel_pinctrl_probe(struct platform_device *pdev,return 0 ; } +EXPORT_SYMBOL_NS_GPL (intel_pinctrl_probe,PINCTRL_INTEL );int intel_pinctrl_probe_by_hid (struct platform_device *pdev) {
drivers/pinctrl/intel/pinctrl-intel.h +3 -0
@@ -252,6 +252,9 @@ struct intel_pinctrl {int irq; }; +int intel_pinctrl_probe (struct platform_device *pdev, +const struct intel_pinctrl_soc_data *soc_data); +int intel_pinctrl_probe_by_hid (struct platform_device *pdev);int intel_pinctrl_probe_by_uid (struct platform_device *pdev);
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
PATCH v2 2/2 pinctrl: intel: Add a generic Intel pin control platform driver
In reply to Andy ShevchenkoNew generations of Intel platforms will provide better description of the pin control devices in the ACPI tables. Hence, we may provide a generic pin control platform driver to cover all of them. Currently the following Intel SoCs / platforms require this to be functional:
- Lunar Lake
--- drivers/pinctrl/intel/Kconfig | 10 + drivers/pinctrl/intel/Makefile | 1 + .../pinctrl/intel/pinctrl-intel-platform.c | 225 ++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 drivers/pinctrl/intel/pinctrl-intel-platform.c
drivers/pinctrl/intel/Kconfig +10 -0
@@ -37,6 +37,16 @@ config PINCTRL_INTEL select GPIOLIB select GPIOLIB_IRQCHIP +config PINCTRL_INTEL_PLATFORM + tristate "Intel pinctrl and GPIO platform driver" + depends on ACPI + select PINCTRL_INTEL + help + This pinctrl driver provides an interface that allows configuring + of Intel PCH pins and using them as GPIOs. Currently the following + Intel SoCs / platforms require this to be functional: + - Lunar Lake + config PINCTRL_ALDERLAKE tristate "Intel Alder Lake pinctrl and GPIO driver" select PINCTRL_INTEL
drivers/pinctrl/intel/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCTRL_TANGIER) += pinctrl-tangier.o obj-$(CONFIG_PINCTRL_MERRIFIELD) += pinctrl-merrifield.o obj-$(CONFIG_PINCTRL_MOOREFIELD) += pinctrl-moorefield.o obj-$(CONFIG_PINCTRL_INTEL) += pinctrl-intel.o +obj-$(CONFIG_PINCTRL_INTEL_PLATFORM) += pinctrl-intel-platform.o obj-$(CONFIG_PINCTRL_ALDERLAKE) += pinctrl-alderlake.o obj-$(CONFIG_PINCTRL_BROXTON) += pinctrl-broxton.o obj-$(CONFIG_PINCTRL_CANNONLAKE) += pinctrl-cannonlake.o
drivers/pinctrl/intel/pinctrl-intel-platform.c new file +225 -0
225 lines not on this page · raw message
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
kernel test robot
build botRe: [PATCH v2 2/2] pinctrl: intel: Add a generic Intel pin control platform driver
:::::: :::::: Manual check reason: "has kconfig file changed" :::::: Manual check reason: "has Makefile file changed" ::::::
::::::
:::::: Manual check reason: "has kconfig file changed" :::::: Manual check reason: "has Makefile file changed" ::::::
BCC: [email protected]
CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Andy Shevchenko <[email protected]>
TO: Andy Shevchenko <[email protected]>
TO: Raag Jadav <[email protected]>
TO: Mika Westerberg <[email protected]>
TO: [email protected]
TO: [email protected]
CC: Linus Walleij <[email protected]>
Hi Andy,
kernel test robot noticed the following build errors:
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next linus/master v6.7-rc1 next-20231113] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-intel-Revert-Unexport-intel_pinctrl_probe/20231113-204318 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel patch link: https://lore.kernel.org/r/20231113123147.4075203-3-andriy.shevchenko%40linux.intel.com patch subject: [PATCH v2 2/2] pinctrl: intel: Add a generic Intel pin control platform driver
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231114/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231114/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/nospec-branch.h:14,
from arch/x86/include/asm/paravirt_types.h:27,
from arch/x86/include/asm/ptrace.h:97,
from arch/x86/include/asm/math_emu.h:5,
from arch/x86/include/asm/processor.h:13,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/pinctrl/intel/pinctrl-intel-platform.c:10:
>> drivers/pinctrl/intel/pinctrl-intel-platform.c:217:37: error: 'intel_pinctrl_pm_ops' undeclared here (not in a function); did you mean 'intel_pinctrl_probe'?
217 | .pm = pm_sleep_ptr(&intel_pinctrl_pm_ops),
| ^~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:54:44: note: in definition of macro 'PTR_IF'
54 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^~~ drivers/pinctrl/intel/pinctrl-intel-platform.c:217:23: note: in expansion of macro 'pm_sleep_ptr'
217 | .pm = pm_sleep_ptr(&intel_pinctrl_pm_ops),
| ^~~~~~~~~~~~
vim +217 drivers/pinctrl/intel/pinctrl-intel-platform.c
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 211
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 212 static struct platform_driver intel_platform_pinctrl_driver = {
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 213 .probe = intel_platform_pinctrl_probe,
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 214 .driver = {
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 215 .name = "intel-pinctrl",
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 216 .acpi_match_table = intel_platform_pinctrl_acpi_match,
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 @217 .pm = pm_sleep_ptr(&intel_pinctrl_pm_ops),
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 218 },
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 219 };
5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 220 module_platform_driver(intel_platform_pinctrl_driver);5dacd710dc5f8ca8 Andy Shevchenko 2023-11-13 221
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 2/2] pinctrl: intel: Add a generic Intel pin control platform driver
Quoted 6 lines · kernel test robot
Hi Andy,
kernel test robot noticed the following build errors:
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next linus/master v6.7-rc1 next-20231113]
False positive as the dependencies appeared in today's Linux Next.
$ git tag --contains 22f57707fa0c next-20231114
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v2 2/2] pinctrl: intel: Add a generic Intel pin control platform driver
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · kernel test robot
Hi Andy,
kernel test robot noticed the following build errors:
Quoted 7 lines
Quoted 2 lines
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next linus/master v6.7-rc1 next-20231113]False positive as the dependencies appeared in today's Linux Next.
$ git tag --contains 22f57707fa0c next-20231114
Okay thanks for checking!
The series looks good to me so feel free to add,
Re: [PATCH v2 2/2] pinctrl: intel: Add a generic Intel pin control platform driver
Quoted 11 lines · Mika Westerberg
Quoted 10 lines · Andy Shevchenko
Quoted 6 lines · kernel test robot
Hi Andy,
kernel test robot noticed the following build errors:
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next linus/master v6.7-rc1 next-20231113]False positive as the dependencies appeared in today's Linux Next.
Quoted 8 lines
Quoted 2 lines
$ git tag --contains 22f57707fa0c next-20231114Okay thanks for checking!
The series looks good to me so feel free to add,
Acked-by Mika Westerberg <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko