Skip to content

pinctrl: samsung: Usability and extensibiltiy improvements

Tomasz Figa linux-arm-kernel linux-devicetree linux-samsung-soc 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 0 repliesNew
  2. v10 of 16 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- dropped moving SoC-specific data to device tree
(might be added in further patches)
- dropped per-bank specification of configuration register offsets (thus limiting scope of the driver to Exynos SoCs; will be added in further patches)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15pinctrl: samsung: Detect and handle unsupported configuration typesdrivers/pinctrl/pinctrl-samsung.c+3 -03 replies
2/15pinctrl: samsung: Do not pass gpio_chip to pin_to_reg_bankdrivers/pinctrl/pinctrl-samsung.c+16 -90 replies
3/15pinctrl: samsung: Assing pin numbers dynamicallydrivers/pinctrl/pinctrl-exynos.c drivers/pinctrl/pinctrl-exynos.h drivers/pinctrl/pinctrl-samsung.c+62 -540 replies
4/15pinctrl: samsung: Remove static pin enumerationsdrivers/pinctrl/pinctrl-exynos.h+0 -1190 replies
5/15pinctrl: samsung: Distinguish between pin group and bank nodesdrivers/pinctrl/pinctrl-samsung.c+1 -10 replies
6/15ARM: dts: exynos4210-pinctrl: Add nodes for pin banksarch/arm/boot/dts/exynos4210-pinctrl.dtsi arch/arm/boot/dts/exynos4210.dtsi+272 -2290 replies
7/15pinctrl: samsung: Match pin banks with their device nodesdrivers/pinctrl/pinctrl-samsung.c drivers/pinctrl/pinctrl-samsung.h+15 -00 replies
8/15pinctrl: samsung: Hold pointer to driver data in bank structdrivers/pinctrl/pinctrl-samsung.c drivers/pinctrl/pinctrl-samsung.h+12 -80 replies
9/15pinctrl: samsung: Include bank-specific eint offset in bank structdrivers/pinctrl/pinctrl-exynos.c drivers/pinctrl/pinctrl-exynos.h drivers/pinctrl/pinctrl-samsung.h+30 -290 replies
10/15pinctrl: exynos: Use one IRQ domain per pin bankarch/arm/boot/dts/exynos4210.dtsi drivers/pinctrl/pinctrl-exynos.c drivers/pinctrl/pinctrl-exynos.h +2 more+35 -1090 replies
11/15pinctrl: samsung: Use one GPIO chip per pin bankdrivers/pinctrl/pinctrl-samsung.c drivers/pinctrl/pinctrl-samsung.h+79 -490 replies
12/15pinctrl: samsung: Use per-bank IRQ domain for wake-up interruptsarch/arm/boot/dts/exynos4210-pinctrl.dtsi arch/arm/boot/dts/exynos4210.dtsi drivers/pinctrl/pinctrl-exynos.c +2 more+136 -760 replies
13/15pinctrl: exynos: Set pin function to EINT in irq_set_type of wake-up EINTdrivers/pinctrl/pinctrl-exynos.c+11 -00 replies
14/15pinctrl: samsung: Add GPIO to IRQ translationdrivers/pinctrl/pinctrl-samsung.c+19 -00 replies
15/15Documentation: Update samsung-pinctrl device tree bindings documentationDocumentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt+93 -250 replies

Reviews trailers per patch

None of the 15 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKyungmin ParkThomas Abraham
SeriesR-b A-b
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/15] pinctrl: samsung: Usability and extensibiltiy improvements

This patch series is a work on improving usability and extensibiltiy of the pinctrl-samsung driver. It consists of three main parts:
- improving flexibility of SoC-specific data specification
- converting the driver to one GPIO chip and IRQ domain per pin bank
- improving wake-up IRQ setup and handling

1) What the first part does, in addition to various related fixes, is removing any unnecessary static data from pinctrl-exynos driver.

This is achieved mostly thanks to assigning pin numbers dynamically, with help of only pin counts of particular banks. It also simplifies adding next SoC variants, since much less static data needs to be specified.

2) The second part attempts to simplify usage of the driver and fix several problems of current implementation, in particular:

- Simplifies GPIO pin specification in device tree by using pin

    namespace local to pin bank instead of local to pin controller, e.g.

        gpios = <&gpj0 3 0>;

    instead of

        gpios = <&pinctrl0 115 0>;

- Simplifies GPIO interrupt specification in device tree by using

    namespace local to pin bank (and equal to GPIO namespace), e.g.

        interrupt-parent = <&gpj0>;
        interrupts = <3 0>;

    instead of

        interrupt-parent = <&pinctrl0>;
        interrupts = <115 0>;

- Simplifies internal GPIO pin to bank translation thanks to correspondence of particular GPIO chips to pin banks. This allows to remove the (costly in case of GPIO bit-banging drivers) lookup over all banks to find the one that the pin is from.

3) Third part is focused on removing the hard-coded description of wake-up interrupt layout.

It moves wake-up interrupt description to bank struct and device tree, which allows to specify which pin banks support wake-up interrupts and how they are handled (direct or multiplexed/chained).

See particular patches for more detailed descriptions and the last patch for updated device tree bindings.

Changes since v1:
- dropped moving SoC-specific data to device tree
(might be added in further patches)
- dropped per-bank specification of configuration register offsets (thus limiting scope of the driver to Exynos SoCs; will be added in further patches)

Tomasz Figa (15):
pinctrl: samsung: Detect and handle unsupported configuration types
pinctrl: samsung: Do not pass gpio_chip to pin_to_reg_bank
pinctrl: samsung: Assing pin numbers dynamically
pinctrl: samsung: Remove static pin enumerations
pinctrl: samsung: Distinguish between pin group and bank nodes
ARM: dts: exynos4210-pinctrl: Add nodes for pin banks
pinctrl: samsung: Match pin banks with their device nodes
pinctrl: samsung: Hold pointer to driver data in bank struct
pinctrl: samsung: Include bank-specific eint offset in bank struct
pinctrl: exynos: Use one IRQ domain per pin bank
pinctrl: samsung: Use one GPIO chip per pin bank
pinctrl: samsung: Use per-bank IRQ domain for wake-up interrupts
pinctrl: exynos: Set pin function to EINT in irq_set_type of wake-up
EINT
pinctrl: samsung: Add GPIO to IRQ translation
Documentation: Update samsung-pinctrl device tree bindings
documentation

 .../bindings/pinctrl/samsung-pinctrl.txt           | 118 +++++--
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi          | 278 ++++++++++++++++
 arch/arm/boot/dts/exynos4210.dtsi                  | 241 +-------------
 drivers/pinctrl/pinctrl-exynos.c                   | 367 ++++++++++-----------
 drivers/pinctrl/pinctrl-exynos.h                   | 170 ++--------
 drivers/pinctrl/pinctrl-samsung.c                  | 203 ++++++++----
 drivers/pinctrl/pinctrl-samsung.h                  |  29 +-
 7 files changed, 741 insertions(+), 665 deletions(-)
Signature · 1 line
1.7.12