linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] pinctrl: add ACPI support to pin controller
@ 2022-11-30 16:40 Niyas Sait
  2022-11-30 16:40 ` [PATCH v3 1/2] pinctrl: add support for ACPI pin function and config resources Niyas Sait
  2022-11-30 16:40 ` [PATCH v3 2/2] pinctrl: add support for ACPI pin groups Niyas Sait
  0 siblings, 2 replies; 16+ messages in thread
From: Niyas Sait @ 2022-11-30 16:40 UTC (permalink / raw)
  To: linux-gpio, andriy.shevchenko, mika.westerberg, rafael,
	linus.walleij, fugang.duan
  Cc: Niyas Sait

This is a proposal for adding ACPI support to pin controller.

The patch supports following resources introduced in ACPI from v6.2

- PinFunction
- PinConfig
- PinGroupFunction
- PinGroupConfig
- PinGroup

The patch has been tested on NXP I.MX8MP platform with ACPI. Please checkout [1]
and [2] to see prototype driver and firmware implementation.

--
V3: 1, Reworked interface between pinctrl-acpi subsystem and driver
    2, Dropped API to get ACPI pin groups as they are no longer required
    3, Fix styling issues pointed out by Mika Westerberg
    4, Added helper functions and refactored code for simplicity
    5, Added documentation

V2: 1, Fix styling issues pointed out by Mika Westerberg
    2, Added a new interface to free pin group descriptor
    3, Added vendor length to the descriptors
    4, Reworked map_config_acpi_to_general to pass an error value
    5, Few refactoring to keep functions shorter
    6, Dropped new generic pinconf types added in v1

[1] https://github.com/nsait-linaro/linux-patches/blob/main/0001-imx8mp-add-ACPI-support-for-pin-controller.patch
[2] https://github.com/nsait-linaro/linux-patches/blob/main/0001-add-acpi-pinctrl-support-for-i2c-controllers.patch

Niyas Sait (2):
  pinctrl: add support for ACPI pin function and config resources
  pinctrl: add support for ACPI pin groups

 Documentation/driver-api/index.rst            |   1 +
 Documentation/driver-api/pin-control-acpi.rst | 297 ++++++++
 drivers/pinctrl/Makefile                      |   1 +
 drivers/pinctrl/core.c                        |  18 +-
 drivers/pinctrl/core.h                        |   3 +
 drivers/pinctrl/pinctrl-acpi.c                | 672 ++++++++++++++++++
 drivers/pinctrl/pinctrl-acpi.h                |  77 ++
 include/linux/pinctrl/pinctrl.h               |  15 +
 8 files changed, 1080 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/driver-api/pin-control-acpi.rst
 create mode 100644 drivers/pinctrl/pinctrl-acpi.c
 create mode 100644 drivers/pinctrl/pinctrl-acpi.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-01-09 21:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-30 16:40 [PATCH v3 0/2] pinctrl: add ACPI support to pin controller Niyas Sait
2022-11-30 16:40 ` [PATCH v3 1/2] pinctrl: add support for ACPI pin function and config resources Niyas Sait
2022-11-30 21:02   ` Andy Shevchenko
2022-11-30 21:33     ` Niyas Sait
2022-11-30 23:30       ` Andy Shevchenko
2022-12-01  9:27         ` Niyas Sait
2022-12-01 23:04           ` Andy Shevchenko
2022-12-05  7:20             ` Niyas Sait
2022-12-05 12:47               ` Andy Shevchenko
2022-12-20 10:53                 ` Niyas Sait
2023-01-03 16:49                   ` Niyas Sait
2023-01-09 14:09                     ` Andy Shevchenko
2023-01-09 21:33                       ` Niyas Sait
2022-11-30 21:10   ` Andy Shevchenko
2022-11-30 21:36     ` Niyas Sait
2022-11-30 16:40 ` [PATCH v3 2/2] pinctrl: add support for ACPI pin groups Niyas Sait

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).