Skip to content

Refactor Ralink Pinctrl and Add Documentation

Arınç ÜNAL linux-arm-kernel linux-devicetree linux-gpio linux-mediatek linux-mips lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 7 repliesIn review
  2. v114 patches 22 repliesSuperseded

Changes in v2 from the cover letter

- Add Sergio’s Reviewed-by: tag to where it's given.
- Properly explain the addition of the new compatible strings.
- Remove asterisk on MAINTAINERS commit.
- Properly explain the compatible string change for the rt2880 binding.
- Mention adding myself as a maintainer to rt2880 binding.
- Fix typo "indiviual" on YAML bindings. Limit lines to 80 characters.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14pinctrl: ralink: rename MT7628(an) functions to MT76X8drivers/pinctrl/ralink/pinctrl-mt7620.c+109 -1090 replies
2/14pinctrl: ralink: rename pinctrl-rt2880 to pinctrl-ralinkdrivers/pinctrl/ralink/Kconfig drivers/pinctrl/ralink/Makefile drivers/pinctrl/ralink/pinctrl-mt7620.c +6 more+167 -1710 replies
3/14pinctrl: ralink: rename pinmux functions to pinctrldrivers/pinctrl/ralink/pinctrl-mt7620.c drivers/pinctrl/ralink/pinctrl-mt7621.c drivers/pinctrl/ralink/pinctrl-ralink.c +4 more+62 -620 replies
4/14pinctrl: ralink: rename pinctrl-rt288x to pinctrl-rt2880drivers/pinctrl/ralink/Kconfig drivers/pinctrl/ralink/Makefile drivers/pinctrl/ralink/pinctrl-rt2880.c+12 -120 replies
5/14pinctrl: ralink: rename variable names for functions on MT7620 and MT7621drivers/pinctrl/ralink/pinctrl-mt7620.c drivers/pinctrl/ralink/pinctrl-mt7621.c+106 -1060 replies
6/14pinctrl: ralink: rename driver names to subdriversdrivers/pinctrl/ralink/Kconfig+5 -50 replies
7/14pinctrl: ralink: add new compatible strings for each pinctrl subdriverdrivers/pinctrl/ralink/pinctrl-mt7620.c drivers/pinctrl/ralink/pinctrl-mt7621.c drivers/pinctrl/ralink/pinctrl-rt2880.c +2 more+10 -100 replies
8/14MAINTAINERS: add Ralink pinctrl driverMAINTAINERS+7 -00 replies
9/14mips: dts: ralink: mt7621: use the new compatible string for MT7621 pinctrlarch/mips/boot/dts/ralink/mt7621.dtsi+1 -10 replies
10/14dt-bindings: pinctrl: rt2880: fix binding name, pin groups and functionsDocumentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml+13 -131 reply
11/14dt-bindings: pinctrl: add binding for Ralink MT7620 pinctrlDocumentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml+91 -01 reply
12/14dt-bindings: pinctrl: add binding for Ralink MT7621 pinctrlDocumentation/devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml+71 -01 reply
13/14dt-bindings: pinctrl: add binding for Ralink RT305X pinctrlDocumentation/devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml+92 -02 replies
14/14dt-bindings: pinctrl: add binding for Ralink RT3883 pinctrlDocumentation/devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml+71 -01 reply

Reviews trailers per patch

11 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSergio ParacuellosRob Herring
SeriesA-b
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14
8/14R-b
9/14
10/14R-b
11/14R-b
12/14R-b
13/14
14/14R-b

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/14] Refactor Ralink Pinctrl and Add Documentation

Hey everyone.

This patch series brings complete refactoring to the Ralink pinctrl driver and its subdrivers.

The mt7620 pinctrl subdriver supports MT7628 and MT7688 SoCs along with MT7620. These two share the same pin layout. The code used for MT7628 and MT7688 is renamed from MT7628/mt7628an to MT76X8.

Ralink pinctrl driver is called rt2880 which is the name of the Ralink RT2880 SoC. A subdriver for the Ralink RT2880 SoC is called rt288x. Rename rt2880 to ralink.

Rename code from pinmux to pinctrl for where the operation is not about the muxing of pins.

Rename rt288x pinctrl subdriver for the RT2880 SoC to rt2880.

Variables for functions include "grp" on the Ralink MT7620 and MT7621 subdrivers. Rename them to "func" instead as they define the functions for the pin groups. This is already the case for the other 3 subdrivers; RT2880, RT305x, RT3883.

Fix Kconfig to call the subdrivers, well, subdrivers.

Add new compatible strings for each subdriver and update DT binding accordingly.

Add Ralink pinctrl driver to MAINTAINERS and add me and Sergio as the maintainers.

Finally, fix the current rt2880 documentation and add binding for all of the subdrivers.

I have the patches here should anyone prefer to read them there:
https://github.com/arinc9/linux/commits/ralink-pinctrl-refactor

Ralink pinctrl driver and the subdrivers were compile tested.
MT7621 pinctrl subdriver was tested on a private mt7621 board.
YAML bindings checked with:
ARCH=mips CROSS_COMPILE=mips-linux-gnu- make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/pinctrl/ -j$(nproc)

v2:
- Add Sergio’s Reviewed-by: tag to where it's given.
- Properly explain the addition of the new compatible strings.
- Remove asterisk on MAINTAINERS commit.
- Properly explain the compatible string change for the rt2880 binding.
- Mention adding myself as a maintainer to rt2880 binding.
- Fix typo "indiviual" on YAML bindings. Limit lines to 80 characters.

Arınç ÜNAL (14):
pinctrl: ralink: rename MT7628(an) functions to MT76X8
pinctrl: ralink: rename pinctrl-rt2880 to pinctrl-ralink
pinctrl: ralink: rename pinmux functions to pinctrl
pinctrl: ralink: rename pinctrl-rt288x to pinctrl-rt2880
pinctrl: ralink: rename variable names for functions on MT7620 and MT7621
pinctrl: ralink: rename driver names to subdrivers
pinctrl: ralink: add new compatible strings for each pinctrl subdriver
MAINTAINERS: add Ralink pinctrl driver
mips: dts: ralink: mt7621: use the new compatible string for MT7621 pinctrl
dt-bindings: pinctrl: rt2880: fix binding name, pin groups and functions
dt-bindings: pinctrl: add binding for Ralink MT7620 pinctrl
dt-bindings: pinctrl: add binding for Ralink MT7621 pinctrl
dt-bindings: pinctrl: add binding for Ralink RT305X pinctrl
dt-bindings: pinctrl: add binding for Ralink RT3883 pinctrl

 Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml            |  91 +++++++++
 .../bindings/pinctrl/{ralink,rt2880-pinmux.yaml => ralink,mt7621-pinctrl.yaml}  |  27 +--
 Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml            |  68 +++++++
 Documentation/devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml            |  92 +++++++++
 Documentation/devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml            |  71 +++++++
 MAINTAINERS                                                                     |   7 +
 arch/mips/boot/dts/ralink/mt7621.dtsi                                           |   2 +-
 drivers/pinctrl/ralink/Kconfig                                                  |  28 ++-
 drivers/pinctrl/ralink/Makefile                                                 |   4 +-
 drivers/pinctrl/ralink/pinctrl-mt7620.c                                         | 302 +++++++++++++++---------------
 drivers/pinctrl/ralink/pinctrl-mt7621.c                                         |  76 ++++----
 drivers/pinctrl/ralink/pinctrl-ralink.c                                         | 349 ++++++++++++++++++++++++++++++++++
 drivers/pinctrl/ralink/{pinmux.h => pinctrl-ralink.h}                           |  16 +-
 drivers/pinctrl/ralink/pinctrl-rt2880.c                                         | 381 +++++---------------------------------
 drivers/pinctrl/ralink/pinctrl-rt288x.c                                         |  60 ------
 drivers/pinctrl/ralink/pinctrl-rt305x.c                                         |  66 +++----
 drivers/pinctrl/ralink/pinctrl-rt3883.c                                         |  50 ++---
 17 files changed, 1009 insertions(+), 681 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml
 rename Documentation/devicetree/bindings/pinctrl/{ralink,rt2880-pinmux.yaml => ralink,mt7621-pinctrl.yaml} (63%)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml
 create mode 100644 drivers/pinctrl/ralink/pinctrl-ralink.c
 rename drivers/pinctrl/ralink/{pinmux.h => pinctrl-ralink.h} (75%)
 delete mode 100644 drivers/pinctrl/ralink/pinctrl-rt288x.c