Skip to contentSkip to conversation

This is a patch series for pinctrl driver of Sunplus SP7021 SoC.

PATCH Superseded Wells Lu 4 participants 20 messages Dec 24, 2021 – Jan 14, 2022

Subsystems (4)

v5 of 11 Superseded Latest is v11 →

lore
Share & tools
lore

Wells Lu

author maintainer
#0 lore raw

v5 cover This is a patch series for pinctrl driver of Sunplus SP7021 SoC.

Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control applications.

Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.html

Wells Lu (2):
dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021
pinctrl: Add driver for Sunplus SP7021

 .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml   |  373 +++++++
 MAINTAINERS                                        |   10 +
 drivers/pinctrl/Kconfig                            |    1 +
 drivers/pinctrl/Makefile                           |    1 +
 drivers/pinctrl/sunplus/Kconfig                    |   21 +
 drivers/pinctrl/sunplus/Makefile                   |    5 +
 drivers/pinctrl/sunplus/sppctl.c                   | 1178 ++++++++++++++++++++
 drivers/pinctrl/sunplus/sppctl.h                   |  155 +++
 drivers/pinctrl/sunplus/sppctl_sp7021.c            |  584 ++++++++++
 include/dt-bindings/pinctrl/sppctl-sp7021.h        |  171 +++
 include/dt-bindings/pinctrl/sppctl.h               |   30 +
 11 files changed, 2529 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
 create mode 100644 drivers/pinctrl/sunplus/Kconfig
 create mode 100644 drivers/pinctrl/sunplus/Makefile
 create mode 100644 drivers/pinctrl/sunplus/sppctl.c
 create mode 100644 drivers/pinctrl/sunplus/sppctl.h
 create mode 100644 drivers/pinctrl/sunplus/sppctl_sp7021.c
 create mode 100644 include/dt-bindings/pinctrl/sppctl-sp7021.h
 create mode 100644 include/dt-bindings/pinctrl/sppctl.h
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH v5 1/2 dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021

Add dt-bindings header files and documentation for Sunplus SP7021 SoC.

---
Changes in V5
- Removed "GPIOXT2" registers

 .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml   | 373 +++++++++++++++++++++
 MAINTAINERS                                        |   9 +
 include/dt-bindings/pinctrl/sppctl-sp7021.h        | 171 ++++++++++
 include/dt-bindings/pinctrl/sppctl.h               |  30 ++
 4 files changed, 583 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/sppctl-sp7021.h
 create mode 100644 include/dt-bindings/pinctrl/sppctl.h
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +373 -0
new file mode 100644
index 0000000..2672169
@@ -0,0 +1,373 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/sunplus,sp7021-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus SP7021 Pin Controller Device Tree Bindings
+
+maintainers:
+  - Dvorkin Dmitry <[email protected]>
+  - Wells Lu <[email protected]>
+
+description: |
+  The Sunplus SP7021 pin controller is used to control SoC pins. Please
+  refer to pinctrl-bindings.txt in this directory for details of the common
+  pinctrl bindings used by client devices.
+
+  SP7021 has 99 digital GPIO pins which are numbered from GPIO 0 to 98. All
+  are multiplexed with some special function pins. SP7021 has 3 types of
+  special function pins:
+
+  (1) function-group pins:
+      Ex 1 (SPI-NOR flash):
+        If control-field SPI_FLASH_SEL is set to 1, GPIO 83, 84, 86 and 87
+        will be pins of SPI-NOR flash. If it is set to 2, GPIO 76, 78, 79
+        and 81 will be pins of SPI-NOR flash.
+
+      Ex 2 (UART_0):
+        If control-bit UA0_SEL is set to 1, GPIO 88 and 89 will be TX and
+        RX pins of UART_0 (UART channel 0).
+
+      Ex 3 (eMMC):
+        If control-bit EMMC_SEL is set to 1, GPIO 72, 73, 74, 75, 76, 77,
+        78, 79, 80, 81 will be pins of an eMMC device.
+
+      Properties "function" and "groups" are used to select function-group
+      pins.
+
+  (2) fully pin-mux (like phone exchange mux) pins:
+      GPIO 8 to 71 are 'fully pin-mux' pins. Any pins of peripherals of
+      SP7021 (ex: UART_1, UART_2, UART_3, UART_4, I2C_0, I2C_1, and etc.)
+      can be routed to any pins of fully pin-mux pins.
+
+      Ex 1 (UART channel 1):
+        If control-field UA1_TX_SEL is set to 3, TX pin of UART_1 will be
+        routed to GPIO 10 (3 - 1 + 8 = 10).
+        If control-field UA1_RX_SEL is set to 4, RX pin of UART_1 will be
+        routed to GPIO 11 (4 - 1 + 8 = 11).
+        If control-field UA1_RTS_SEL is set to 5, RTS pin of UART_1 will
+        be routed to GPIO 12 (5 - 1 + 8 = 12).
+        If control-field UA1_CTS_SEL is set to 6, CTS pin of UART_1 will
+        be routed to GPIO 13 (6 - 1 + 8 = 13).
+
+      Ex 2 (I2C channel 0):
+        If control-field I2C0_CLK_SEL is set to 20, CLK pin of I2C_0 will
+        be routed to GPIO 27 (20 - 1 + 8 = 27).
+        If control-field I2C0_DATA_SEL is set to 21, DATA pin of I2C_0
+        will be routed to GPIO 28 (21 - 1 + 9 = 28).
+
+      Totally, SP7021 has 120 peripheral pins. The peripheral pins can be
+      routed to any of 64 'fully pin-mux' pins.
+
+  (3) I/O processor pins
+      SP7021 has a built-in I/O processor.
+      Any GPIO pins (GPIO 0 to 98) can be set to pins of I/O processor.
+
+  Vendor property "sunplus,pins" is used to select "fully pin-mux" pins,
+  "I/O processor pins" and "digital GPIO" pins.
+
+  The device node of pin controller of Sunplus SP7021 has following
+  properties.
+
+properties:
+  compatible:
+    const: sunplus,sp7021-pctl
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  reg:
+    items:
+      - description: the MOON2 registers
+      - description: the GPIOXT registers
+      - description: the FIRST registers
+      - description: the MOON1 registers
+
+  reg-names:
+    items:
+      - const: moon2
+      - const: gpioxt
+      - const: first
+      - const: moon1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+patternProperties:
+  '-pins$':
+    type: object
+    description: |
+      A pinctrl node should contain at least one subnodes representing the
+      pins or function-pins group available on the machine. Each subnode
+      will list the pins it needs, and how they should be configured.
+
+      Pinctrl node's client devices use subnodes for desired pin
+      configuration. Client device subnodes use below standard properties.
+
+    properties:
+      sunplus,pins:
+        description: |
+          Define 'sunplus,pins' which are used by pinctrl node's client
+          device.
+
+          It consists of one or more integers which represents the config
+          setting for corresponding pin. Each integer defines a individual
+          pin in which:
+
+          Bit 32~24: defines GPIO number. Its range is 0 ~ 98.
+          Bit 23~16: defines types: (1) fully pin-mux pins
+                                    (2) IO processor pins
+                                    (3) digital GPIO pins
+          Bit 15~8:  defines pins of peripherals (which are defined in
+                     'include/dt-binging/pinctrl/sppctl.h').
+          Bit 7~0:   defines types or initial-state of digital GPIO pins.
+
+          Please use macro SPPCTL_IOPAD to define the integers for pins.
+
+        $ref: /schemas/types.yaml#/definitions/uint32-array
+
+      function:
+        description: |
+          Define pin-function which is used by pinctrl node's client device.
+          The name should be one of string in the following enumeration.
+        $ref: "/schemas/types.yaml#/definitions/string"
+        enum: [ SPI_FLASH, SPI_FLASH_4BIT, SPI_NAND, CARD0_EMMC, SD_CARD,
+                UA0, FPGA_IFX, HDMI_TX, LCDIF, USB0_OTG, USB1_OTG ]
+
+      groups:
+        description: |
+          Define pin-group in a specified pin-function.
+          The name should be one of string in the following enumeration.
+        $ref: "/schemas/types.yaml#/definitions/string"
+        enum: [ SPI_FLASH1, SPI_FLASH2, SPI_FLASH_4BIT1, SPI_FLASH_4BIT2,
+                SPI_NAND, CARD0_EMMC, SD_CARD, UA0, FPGA_IFX, HDMI_TX1,
+                HDMI_TX2, HDMI_TX3, LCDIF, USB0_OTG, USB1_OTG ]
+
+      sunplus,zero_func:
+        description: |
+          This is a vendor specific property. It is used to disable pins
+          which are not used by pinctrl node's client device.
+          Some pins may be enabled by boot-loader. We can use this
+          property to disable them.
+        $ref: /schemas/types.yaml#/definitions/uint32-array
+
+    additionalProperties: false
+
+    allOf:
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_FLASH
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_FLASH1
+                - SPI_FLASH2
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_FLASH_4BIT
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_FLASH_4BIT1
+                - SPI_FLASH_4BIT2
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_NAND
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_NAND
+      - if:
+          properties:
+            function:
+              enum:
+                - CARD0_EMMC
+        then:
+          properties:
+            groups:
+              enum:
+                - CARD0_EMMC
+      - if:
+          properties:
+            function:
+              enum:
+                - SD_CARD
+        then:
+          properties:
+            groups:
+              enum:
+                - SD_CARD
+      - if:
+          properties:
+            function:
+              enum:
+                - UA0
+        then:
+          properties:
+            groups:
+              enum:
+                - UA0
+      - if:
+          properties:
+            function:
+              enum:
+                - FPGA_IFX
+        then:
+          properties:
+            groups:
+              enum:
+                - FPGA_IFX
+      - if:
+          properties:
+            function:
+              enum:
+                - HDMI_TX
+        then:
+          properties:
+            groups:
+              enum:
+                - HDMI_TX1
+                - HDMI_TX2
+                - HDMI_TX3
+      - if:
+          properties:
+            function:
+              enum:
+                - LCDIF
+        then:
+          properties:
+            groups:
+              enum:
+                - LCDIF
+      - if:
+          properties:
+            function:
+              enum:
+                - USB0_OTG
+        then:
+          properties:
+            groups:
+              enum:
+                - USB0_OTG
+      - if:
+          properties:
+            function:
+              enum:
+                - USB1_OTG
+        then:
+          properties:
+            groups:
+              enum:
+                - USB1_OTG
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - "#gpio-cells"
+  - gpio-controller
+  - clocks
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/pinctrl/sppctl-sp7021.h>
+
+    pinctl@9c000100 {
+        compatible = "sunplus,sp7021-pctl";
+        reg = <0x9c000100 0x100>, <0x9c000300 0x100>,
+              <0x9c0032e4 0x1c>, <0x9c000080 0x20>;
+        reg-names = "moon2", "gpioxt", "first", "moon1";
+        gpio-controller;
+        #gpio-cells = <2>;
+        clocks = <&clkc 0x83>;
+        resets = <&rstc 0x73>;
+
+        uart0-pins {
+            function = "UA0";
+            groups = "UA0";
+        };
+
+        spinand0-pins {
+            function = "SPI_NAND";
+            groups = "SPI_NAND";
+        };
+
+        uart1-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(11, SPPCTL_PCTL_G_PMUX, MUXF_UA1_TX, 0)
+                SPPCTL_IOPAD(10, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RX, 0)
+            >;
+        };
+
+        uart2-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(20, SPPCTL_PCTL_G_PMUX, MUXF_UA1_TX, 0)
+                SPPCTL_IOPAD(21, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RX, 0)
+                SPPCTL_IOPAD(22, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RTS, 0)
+                SPPCTL_IOPAD(23, SPPCTL_PCTL_G_PMUX, MUXF_UA1_CTS, 0)
+            >;
+        };
+
+        emmc-pins {
+            function = "CARD0_EMMC";
+            groups = "CARD0_EMMC";
+        };
+
+        sdcard-pins {
+            function = "SD_CARD";
+            groups = "SD_CARD";
+            sunplus,pins = < SPPCTL_IOPAD(91, SPPCTL_PCTL_G_GPIO, 0, 0) >;
+        };
+
+        hdmi_A_tx1-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX1";
+        };
+        hdmi_A_tx2-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX2";
+        };
+        hdmi_A_tx3-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX3";
+        };
+
+        ethernet-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(49,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_CLK_OUT,0)
+                SPPCTL_IOPAD(44,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_MAC_SMI_MDC,0)
+                SPPCTL_IOPAD(43,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_MAC_SMI_MDIO,0)
+                SPPCTL_IOPAD(52,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXEN,0)
+                SPPCTL_IOPAD(50,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXD0,0)
+                SPPCTL_IOPAD(51,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXD1,0)
+                SPPCTL_IOPAD(46,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_CRSDV,0)
+                SPPCTL_IOPAD(47,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_RXD0,0)
+                SPPCTL_IOPAD(48,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_RXD1,0)
+            >;
+            sunplus,zero_func = <
+                MUXF_L2SW_LED_FLASH0
+                MUXF_L2SW_LED_ON0
+                MUXF_L2SW_P0_MAC_RMII_RXER
+            >;
+        };
+    };
+...
MAINTAINERS +9 -0
index 8912b2c..6b1cfc2 100644
@@ -15127,6 +15127,15 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/pinctrl/pinctrl-single.c
 
+PIN CONTROLLER - SUNPLUS / TIBBO
+M:	Dvorkin Dmitry <[email protected]>
+M:	Wells Lu <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+W:	https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
+F:	Documentation/devicetree/bindings/pinctrl/sunplus,*
+F:	include/dt-bindings/pinctrl/sppctl*
+
 PKTCDVD DRIVER
 M:	[email protected]
 S:	Orphan
include/dt-bindings/pinctrl/sppctl-sp7021.h new file +171 -0

171 lines not on this page · raw message

include/dt-bindings/pinctrl/sppctl.h new file +30 -0
new file mode 100644
index 0000000..8bf5457
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/* Sunplus dt-bindings Pinctrl header file
+ * Copyright (C) Sunplus Tech / Tibbo Tech.
+ * Author: Dvorkin Dmitry <[email protected]>
+ */
+
+#ifndef __DT_BINDINGS_PINCTRL_SPPCTL_H__
+#define __DT_BINDINGS_PINCTRL_SPPCTL_H__
+
+#define IOP_G_MASTE		(0x01 << 0)
+#define IOP_G_FIRST		(0x01 << 1)
+
+#define SPPCTL_PCTL_G_PMUX	(0x00        | IOP_G_MASTE)
+#define SPPCTL_PCTL_G_GPIO	(IOP_G_FIRST | IOP_G_MASTE)
+#define SPPCTL_PCTL_G_IOPP	(IOP_G_FIRST | 0x00)
+
+#define SPPCTL_PCTL_L_OUT	(0x01 << 0)	/* Output LOW        */
+#define SPPCTL_PCTL_L_OU1	(0x01 << 1)	/* Output HIGH       */
+#define SPPCTL_PCTL_L_INV	(0x01 << 2)	/* Input Invert      */
+#define SPPCTL_PCTL_L_ONV	(0x01 << 3)	/* Output Invert     */
+#define SPPCTL_PCTL_L_ODR	(0x01 << 4)	/* Output Open Drain */
+
+/*
+ * pack into 32-bit value:
+ * pin#(8bit), typ(8bit), function(8bit), flag(8bit)
+ */
+#define SPPCTL_IOPAD(pin, typ, fun, flg)	(((pin) << 24) | ((typ) << 16) | \
+						((fun) << 8) | (flg))
+
+#endif
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Re: [PATCH v5 1/2] dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021

Quoted 7 lines · Wells Lu

Add dt-bindings header files and documentation for Sunplus SP7021 SoC.

---
Changes in V5
- Removed "GPIOXT2" registers

Quoted 9 lines
 .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml   | 373 +++++++++++++++++++++
 MAINTAINERS                                        |   9 +
 include/dt-bindings/pinctrl/sppctl-sp7021.h        | 171 ++++++++++
 include/dt-bindings/pinctrl/sppctl.h               |  30 ++
 4 files changed, 583 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/sppctl-sp7021.h
 create mode 100644 include/dt-bindings/pinctrl/sppctl.h

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.example.dt.yaml: uart1-pins: 'sunplus,pins' does not match any of the regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.example.dt.yaml: uart2-pins: 'sunplus,pins' does not match any of the regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.example.dt.yaml: sdcard-pins: 'sunplus,pins' does not match any of the regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.example.dt.yaml: ethernet-pins: 'sunplus,pins', 'sunplus,zero_func' do not match any of the regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1572989

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

Acked-by Rob Herring
#3 lore raw

RE: [PATCH v5 1/2] dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021

Hi Rob,

Thanks a lot for review.

I ran 'make dt_binding_check' and got PASS before I submitted the dt-binding doc (yaml) file.

I found the "dtschema/dtc warnings/errors:" is resulted from lack of vendor name in "vendor-prefixes.yaml".

My colleague has submitted a patch for adding our company name to the yaml file. It was acknowledged by you but not yet committed into Linux tree.

Refer to:

Quoted 7 lines · Qin Jian

Add vendor prefix for Sunplus Technology Co., Ltd.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

Can this error be waived?
When I send a new patch, should I add "vendor-prefixes.yaml"?

Best regards,
Wells

Quoted 551 lines
Quoted 7 lines

Add dt-bindings header files and documentation for Sunplus SP7021 SoC.

---
Changes in V5
- Removed "GPIOXT2" registers

Quoted 10 lines
 .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml   | 373 +++++++++++++++++++++
 MAINTAINERS                                        |   9 +
 include/dt-bindings/pinctrl/sppctl-sp7021.h        | 171 ++++++++++
 include/dt-bindings/pinctrl/sppctl.h               |  30 ++
 4 files changed, 583 insertions(+)
 create mode 100644
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/sppctl-sp7021.h
 create mode 100644 include/dt-bindings/pinctrl/sppctl.h

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus, sp7021-pinctrl.example.dt.yaml: uart1-pins: 'sunplus,pins' does not match any of the
regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio ),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes. yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus, sp7021-pinctrl.example.dt.yaml: uart2-pins: 'sunplus,pins' does not match any of the
regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio ),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes. yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus, sp7021-pinctrl.example.dt.yaml: sdcard-pins: 'sunplus,pins' does not match any of the
regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio ),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes. yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/sunplus, sp7021-pinctrl.example.dt.yaml: ethernet-pins: 'sunplus,pins', 'sunplus,zero_func' do not match any of the regexes: '^#.*', '^(at25|bm|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio-key|gpio|gpmc|hdmi|i2c-gpio ),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|st-plgpio|st-spics|ts),.*', '^70mai,.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abb,.*', '^abilis,.*', '^abracon,.*', '^abt,.*', '^acer,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^aesop,.*', '^al,.*', '^alcatel,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^alps,.*', '^alt,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^amd,.*', '^amediatech,.*', '^amlogic,.*', '^ampere,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^apple,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^asix,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^awinic,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^baikal,.*', '^bananapi,.*', '^beacon,.*', '^beagle,.*', '^bhf,.*', '^bitmain,.*', '^blutek,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calamp,.*', '^calaosystems,.*', '^calxeda,.*', '^canaan,.*', '^caninos,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^cellwise,.*', '^ceva,.*', '^checkpoint,.*', '^chefree,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrontel,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cisco,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^congatec,.*', '^coreriver,.*', '^corpro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cui,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dfi,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^ds,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebang,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edimax,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^eink,.*', '^elan,.*', '^element14,.*', '^elgin,.*', '^elida,.*', '^elimo,.*', '^elpida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^exegin,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feixin,.*', '^feiyang,.*', '^fii,.*', '^firefly,.*', '^focaltech,.*', '^forlinx,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hirschmann,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honestar,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hycon,.*', '^hydis,.*', '^hynix,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^imi,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^insignal,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^itian,.*', '^ivo,.*', '^iwave,.*', '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jethome,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^kobol,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kvg,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^liteon,.*', '^litex,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^lontium,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^lxa,.*', '^m5stack,.*', '^macnica,.*', '^mantix,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^mentor,.*', '^meraki,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.*', '^microsys,.*', '^mikroe,.*', '^mikrotik,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mntre,.*', '^modtronix,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mstar,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,..*', '^netronix,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^oct,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openembed,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^ouya,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^phytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^ply,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powertip,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^prt,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qishenglong,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^remarkable,.*', '^renesas,.*', '^rervision,.*', '^revotics,.*', '^rex,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riot,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^roseapplepi,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seeed,.*', '^seirobotics,.*', '^semtech,.*', '^senseair,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^shiratech,.*', '^si-en,.*', '^si-linux,.*', '^siemens,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*', '^silabs,.*', '^silead,.*', '^silergy,.*', '^silex-insight,.*', '^siliconfile,.*', '^siliconmitus,.*', '^silvaco,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skov,.*', '^skyworks,.*', '^smartlabs,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sparkfun,.*', '^spinalhdl,.*', '^sprd,.*', '^ssi,.*', '^sst,.*', '^sstar,.*', '^st,.*', '^st-ericsson,.*', '^starfive,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^storlink,.*', '^storm,.*', '^summit,.*', '^sunchip,.*', '^supermicro,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^tcs,.*', '^tdo,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^teltonika,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^thingyjp,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^topic,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^traverse,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^u-boot,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*', '^utoo,.*', '^v3,.*', '^vaisala,.*', '^vamrs,.*', '^variscite,.*', '^vdl,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^virtual,.*', '^vishay,.*', '^visionox,.*', '^vitesse,.*', '^vivante,.*', '^vivax,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^wand,.*', '^waveshare,.*', '^wd,.*', '^we,.*', '^welltech,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^wiligear,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xingbangda,.*', '^xinpeng,.*', '^xiphera,.*', '^xlnx,.*', '^xnano,.*', '^xunlong,.*', '^xylon,.*', '^yamaha,.*', '^yes-optoelectronics,.*', '^yic,.*', '^ylm,.*', '^yna,.*', '^yones-toptech,.*', '^ys,.*', '^ysoft,.*', '^zarlink,.*', '^zealz,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zinitix,.*', '^zkmagic,.*', '^zte,.*', '^zyxel,.*'
From schema:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/vendor-prefixes. yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1572989

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.

maintainer
#4 lore raw

Re: [PATCH v5 1/2] dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021

Quoted 21 lines · Wells Lu 呂芳騰

Hi Rob,

Thanks a lot for review.

I ran 'make dt_binding_check' and got PASS before I submitted the dt-binding doc (yaml) file.

I found the "dtschema/dtc warnings/errors:" is resulted from lack of vendor name in "vendor-prefixes.yaml".

My colleague has submitted a patch for adding our company name to the yaml file. It was acknowledged by you but not yet committed into Linux tree.

Refer to:

Quoted 7 lines · Qin Jian

Add vendor prefix for Sunplus Technology Co., Ltd.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Quoted 4 lines

Can this error be waived?

No. The patch for vendor prefix has to be applied before this one or we'll keep getting this error.

Quoted 1 line

When I send a new patch, should I add "vendor-prefixes.yaml"?

As it doesn't look like that series is going to make 5.17?, I can apply the vendor prefix patch.

Rob

maintainer
#5 lore raw

Re: [PATCH v5 1/2] dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021

In reply to Wells Lu
Quoted 124 lines · Wells Lu

Add dt-bindings header files and documentation for Sunplus SP7021 SoC.

---
Changes in V5
- Removed "GPIOXT2" registers

 .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml   | 373 +++++++++++++++++++++
 MAINTAINERS                                        |   9 +
 include/dt-bindings/pinctrl/sppctl-sp7021.h        | 171 ++++++++++
 include/dt-bindings/pinctrl/sppctl.h               |  30 ++
 4 files changed, 583 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/sppctl-sp7021.h
 create mode 100644 include/dt-bindings/pinctrl/sppctl.h
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +102 -0
new file mode 100644
index 0000000..2672169
@@ -0,0 +1,373 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/sunplus,sp7021-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus SP7021 Pin Controller Device Tree Bindings
+
+maintainers:
+  - Dvorkin Dmitry <[email protected]>
+  - Wells Lu <[email protected]>
+
+description: |
+  The Sunplus SP7021 pin controller is used to control SoC pins. Please
+  refer to pinctrl-bindings.txt in this directory for details of the common
+  pinctrl bindings used by client devices.
+
+  SP7021 has 99 digital GPIO pins which are numbered from GPIO 0 to 98. All
+  are multiplexed with some special function pins. SP7021 has 3 types of
+  special function pins:
+
+  (1) function-group pins:
+      Ex 1 (SPI-NOR flash):
+        If control-field SPI_FLASH_SEL is set to 1, GPIO 83, 84, 86 and 87
+        will be pins of SPI-NOR flash. If it is set to 2, GPIO 76, 78, 79
+        and 81 will be pins of SPI-NOR flash.
+
+      Ex 2 (UART_0):
+        If control-bit UA0_SEL is set to 1, GPIO 88 and 89 will be TX and
+        RX pins of UART_0 (UART channel 0).
+
+      Ex 3 (eMMC):
+        If control-bit EMMC_SEL is set to 1, GPIO 72, 73, 74, 75, 76, 77,
+        78, 79, 80, 81 will be pins of an eMMC device.
+
+      Properties "function" and "groups" are used to select function-group
+      pins.
+
+  (2) fully pin-mux (like phone exchange mux) pins:
+      GPIO 8 to 71 are 'fully pin-mux' pins. Any pins of peripherals of
+      SP7021 (ex: UART_1, UART_2, UART_3, UART_4, I2C_0, I2C_1, and etc.)
+      can be routed to any pins of fully pin-mux pins.
+
+      Ex 1 (UART channel 1):
+        If control-field UA1_TX_SEL is set to 3, TX pin of UART_1 will be
+        routed to GPIO 10 (3 - 1 + 8 = 10).
+        If control-field UA1_RX_SEL is set to 4, RX pin of UART_1 will be
+        routed to GPIO 11 (4 - 1 + 8 = 11).
+        If control-field UA1_RTS_SEL is set to 5, RTS pin of UART_1 will
+        be routed to GPIO 12 (5 - 1 + 8 = 12).
+        If control-field UA1_CTS_SEL is set to 6, CTS pin of UART_1 will
+        be routed to GPIO 13 (6 - 1 + 8 = 13).
+
+      Ex 2 (I2C channel 0):
+        If control-field I2C0_CLK_SEL is set to 20, CLK pin of I2C_0 will
+        be routed to GPIO 27 (20 - 1 + 8 = 27).
+        If control-field I2C0_DATA_SEL is set to 21, DATA pin of I2C_0
+        will be routed to GPIO 28 (21 - 1 + 9 = 28).
+
+      Totally, SP7021 has 120 peripheral pins. The peripheral pins can be
+      routed to any of 64 'fully pin-mux' pins.
+
+  (3) I/O processor pins
+      SP7021 has a built-in I/O processor.
+      Any GPIO pins (GPIO 0 to 98) can be set to pins of I/O processor.
+
+  Vendor property "sunplus,pins" is used to select "fully pin-mux" pins,
+  "I/O processor pins" and "digital GPIO" pins.
+
+  The device node of pin controller of Sunplus SP7021 has following
+  properties.
+
+properties:
+  compatible:
+    const: sunplus,sp7021-pctl
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  reg:
+    items:
+      - description: the MOON2 registers
+      - description: the GPIOXT registers
+      - description: the FIRST registers
+      - description: the MOON1 registers
+
+  reg-names:
+    items:
+      - const: moon2
+      - const: gpioxt
+      - const: first
+      - const: moon1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml line 112

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +10 -0
+patternProperties:
+  '-pins$':
+    type: object
+    description: |
+      A pinctrl node should contain at least one subnodes representing the
+      pins or function-pins group available on the machine. Each subnode
+      will list the pins it needs, and how they should be configured.
+
+      Pinctrl node's client devices use subnodes for desired pin
+      configuration. Client device subnodes use below standard properties.

Need a $ref to pinmux-node.yaml

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml line 115

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +3 -0
+
+    properties:
+      sunplus,pins:

Can't you just use 'pins' here?

Quoted 28 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +28 -0
+        description: |
+          Define 'sunplus,pins' which are used by pinctrl node's client
+          device.
+
+          It consists of one or more integers which represents the config
+          setting for corresponding pin. Each integer defines a individual
+          pin in which:
+
+          Bit 32~24: defines GPIO number. Its range is 0 ~ 98.
+          Bit 23~16: defines types: (1) fully pin-mux pins
+                                    (2) IO processor pins
+                                    (3) digital GPIO pins
+          Bit 15~8:  defines pins of peripherals (which are defined in
+                     'include/dt-binging/pinctrl/sppctl.h').
+          Bit 7~0:   defines types or initial-state of digital GPIO pins.
+
+          Please use macro SPPCTL_IOPAD to define the integers for pins.
+
+        $ref: /schemas/types.yaml#/definitions/uint32-array
+
+      function:
+        description: |
+          Define pin-function which is used by pinctrl node's client device.
+          The name should be one of string in the following enumeration.
+        $ref: "/schemas/types.yaml#/definitions/string"
+        enum: [ SPI_FLASH, SPI_FLASH_4BIT, SPI_NAND, CARD0_EMMC, SD_CARD,
+                UA0, FPGA_IFX, HDMI_TX, LCDIF, USB0_OTG, USB1_OTG ]
+

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml line 153

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +10 -0
+      groups:
+        description: |
+          Define pin-group in a specified pin-function.
+          The name should be one of string in the following enumeration.
+        $ref: "/schemas/types.yaml#/definitions/string"
+        enum: [ SPI_FLASH1, SPI_FLASH2, SPI_FLASH_4BIT1, SPI_FLASH_4BIT2,
+                SPI_NAND, CARD0_EMMC, SD_CARD, UA0, FPGA_IFX, HDMI_TX1,
+                HDMI_TX2, HDMI_TX3, LCDIF, USB0_OTG, USB1_OTG ]
+
+      sunplus,zero_func:

Don't use '_' in property names.

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml line 159

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +6 -0
+        description: |
+          This is a vendor specific property. It is used to disable pins
+          which are not used by pinctrl node's client device.
+          Some pins may be enabled by boot-loader. We can use this
+          property to disable them.
+        $ref: /schemas/types.yaml#/definitions/uint32-array

IMO, disabled pins should be unused by the board design, not ones the bootloader failed to disable.

Quoted 451 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml new file +214 -0
+
+    additionalProperties: false
+
+    allOf:
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_FLASH
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_FLASH1
+                - SPI_FLASH2
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_FLASH_4BIT
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_FLASH_4BIT1
+                - SPI_FLASH_4BIT2
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_NAND
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_NAND
+      - if:
+          properties:
+            function:
+              enum:
+                - CARD0_EMMC
+        then:
+          properties:
+            groups:
+              enum:
+                - CARD0_EMMC
+      - if:
+          properties:
+            function:
+              enum:
+                - SD_CARD
+        then:
+          properties:
+            groups:
+              enum:
+                - SD_CARD
+      - if:
+          properties:
+            function:
+              enum:
+                - UA0
+        then:
+          properties:
+            groups:
+              enum:
+                - UA0
+      - if:
+          properties:
+            function:
+              enum:
+                - FPGA_IFX
+        then:
+          properties:
+            groups:
+              enum:
+                - FPGA_IFX
+      - if:
+          properties:
+            function:
+              enum:
+                - HDMI_TX
+        then:
+          properties:
+            groups:
+              enum:
+                - HDMI_TX1
+                - HDMI_TX2
+                - HDMI_TX3
+      - if:
+          properties:
+            function:
+              enum:
+                - LCDIF
+        then:
+          properties:
+            groups:
+              enum:
+                - LCDIF
+      - if:
+          properties:
+            function:
+              enum:
+                - USB0_OTG
+        then:
+          properties:
+            groups:
+              enum:
+                - USB0_OTG
+      - if:
+          properties:
+            function:
+              enum:
+                - USB1_OTG
+        then:
+          properties:
+            groups:
+              enum:
+                - USB1_OTG
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - "#gpio-cells"
+  - gpio-controller
+  - clocks
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/pinctrl/sppctl-sp7021.h>
+
+    pinctl@9c000100 {
+        compatible = "sunplus,sp7021-pctl";
+        reg = <0x9c000100 0x100>, <0x9c000300 0x100>,
+              <0x9c0032e4 0x1c>, <0x9c000080 0x20>;
+        reg-names = "moon2", "gpioxt", "first", "moon1";
+        gpio-controller;
+        #gpio-cells = <2>;
+        clocks = <&clkc 0x83>;
+        resets = <&rstc 0x73>;
+
+        uart0-pins {
+            function = "UA0";
+            groups = "UA0";
+        };
+
+        spinand0-pins {
+            function = "SPI_NAND";
+            groups = "SPI_NAND";
+        };
+
+        uart1-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(11, SPPCTL_PCTL_G_PMUX, MUXF_UA1_TX, 0)
+                SPPCTL_IOPAD(10, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RX, 0)
+            >;
+        };
+
+        uart2-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(20, SPPCTL_PCTL_G_PMUX, MUXF_UA1_TX, 0)
+                SPPCTL_IOPAD(21, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RX, 0)
+                SPPCTL_IOPAD(22, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RTS, 0)
+                SPPCTL_IOPAD(23, SPPCTL_PCTL_G_PMUX, MUXF_UA1_CTS, 0)
+            >;
+        };
+
+        emmc-pins {
+            function = "CARD0_EMMC";
+            groups = "CARD0_EMMC";
+        };
+
+        sdcard-pins {
+            function = "SD_CARD";
+            groups = "SD_CARD";
+            sunplus,pins = < SPPCTL_IOPAD(91, SPPCTL_PCTL_G_GPIO, 0, 0) >;
+        };
+
+        hdmi_A_tx1-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX1";
+        };
+        hdmi_A_tx2-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX2";
+        };
+        hdmi_A_tx3-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX3";
+        };
+
+        ethernet-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(49,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_CLK_OUT,0)
+                SPPCTL_IOPAD(44,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_MAC_SMI_MDC,0)
+                SPPCTL_IOPAD(43,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_MAC_SMI_MDIO,0)
+                SPPCTL_IOPAD(52,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXEN,0)
+                SPPCTL_IOPAD(50,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXD0,0)
+                SPPCTL_IOPAD(51,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXD1,0)
+                SPPCTL_IOPAD(46,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_CRSDV,0)
+                SPPCTL_IOPAD(47,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_RXD0,0)
+                SPPCTL_IOPAD(48,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_RXD1,0)
+            >;
+            sunplus,zero_func = <
+                MUXF_L2SW_LED_FLASH0
+                MUXF_L2SW_LED_ON0
+                MUXF_L2SW_P0_MAC_RMII_RXER
+            >;
+        };
+    };
+...
MAINTAINERS +9 -0
index 8912b2c..6b1cfc2 100644
@@ -15127,6 +15127,15 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/pinctrl/pinctrl-single.c
 
+PIN CONTROLLER - SUNPLUS / TIBBO
+M:	Dvorkin Dmitry <[email protected]>
+M:	Wells Lu <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+W:	https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
+F:	Documentation/devicetree/bindings/pinctrl/sunplus,*
+F:	include/dt-bindings/pinctrl/sppctl*
+
 PKTCDVD DRIVER
 M:	[email protected]
 S:	Orphan
include/dt-bindings/pinctrl/sppctl-sp7021.h new file +171 -0
new file mode 100644
index 0000000..8299ca1
@@ -0,0 +1,171 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/* Sunplus SP7021 dt-bindings Pinctrl header file
+ * Copyright (C) Sunplus Tech/Tibbo Tech.
+ * Author: Dvorkin Dmitry <[email protected]>
+ */
+
+#ifndef	__DT_BINDINGS_PINCTRL_SPPCTL_SP7021_H__
+#define	__DT_BINDINGS_PINCTRL_SPPCTL_SP7021_H__
+
+#include <dt-bindings/pinctrl/sppctl.h>
+
+/* Please don't change the order of the
+ * following defines. They are based on
+ * order of control register define of
+ * MOON1 ~ MOON4 registers.
+ */
+#define MUXF_L2SW_CLK_OUT		0
+#define MUXF_L2SW_MAC_SMI_MDC		1
+#define MUXF_L2SW_LED_FLASH0		2
+#define MUXF_L2SW_LED_FLASH1		3
+#define MUXF_L2SW_LED_ON0		4
+#define MUXF_L2SW_LED_ON1		5
+#define MUXF_L2SW_MAC_SMI_MDIO		6
+#define MUXF_L2SW_P0_MAC_RMII_TXEN	7
+#define MUXF_L2SW_P0_MAC_RMII_TXD0	8
+#define MUXF_L2SW_P0_MAC_RMII_TXD1	9
+#define MUXF_L2SW_P0_MAC_RMII_CRSDV	10
+#define MUXF_L2SW_P0_MAC_RMII_RXD0	11
+#define MUXF_L2SW_P0_MAC_RMII_RXD1	12
+#define MUXF_L2SW_P0_MAC_RMII_RXER	13
+#define MUXF_L2SW_P1_MAC_RMII_TXEN	14
+#define MUXF_L2SW_P1_MAC_RMII_TXD0	15
+#define MUXF_L2SW_P1_MAC_RMII_TXD1	16
+#define MUXF_L2SW_P1_MAC_RMII_CRSDV	17
+#define MUXF_L2SW_P1_MAC_RMII_RXD0	18
+#define MUXF_L2SW_P1_MAC_RMII_RXD1	19
+#define MUXF_L2SW_P1_MAC_RMII_RXER	20
+#define MUXF_DAISY_MODE			21
+#define MUXF_SDIO_CLK			22
+#define MUXF_SDIO_CMD			23
+#define MUXF_SDIO_D0			24
+#define MUXF_SDIO_D1			25
+#define MUXF_SDIO_D2			26
+#define MUXF_SDIO_D3			27
+#define MUXF_PWM0			28
+#define MUXF_PWM1			29
+#define MUXF_PWM2			30
+#define MUXF_PWM3			31
+#define MUXF_PWM4			32
+#define MUXF_PWM5			33
+#define MUXF_PWM6			34
+#define MUXF_PWM7			35
+#define MUXF_ICM0_D			36
+#define MUXF_ICM1_D			37
+#define MUXF_ICM2_D			38
+#define MUXF_ICM3_D			39
+#define MUXF_ICM0_CLK			40
+#define MUXF_ICM1_CLK			41
+#define MUXF_ICM2_CLK			42
+#define MUXF_ICM3_CLK			43
+#define MUXF_SPIM0_INT			44
+#define MUXF_SPIM0_CLK			45
+#define MUXF_SPIM0_EN			46
+#define MUXF_SPIM0_DO			47
+#define MUXF_SPIM0_DI			48
+#define MUXF_SPIM1_INT			49
+#define MUXF_SPIM1_CLK			50
+#define MUXF_SPIM1_EN			51
+#define MUXF_SPIM1_DO			52
+#define MUXF_SPIM1_DI			53
+#define MUXF_SPIM2_INT			54
+#define MUXF_SPIM2_CLK			55
+#define MUXF_SPIM2_EN			56
+#define MUXF_SPIM2_DO			57
+#define MUXF_SPIM2_DI			58
+#define MUXF_SPIM3_INT			59
+#define MUXF_SPIM3_CLK			60
+#define MUXF_SPIM3_EN			61
+#define MUXF_SPIM3_DO			62
+#define MUXF_SPIM3_DI			63
+#define MUXF_SPI0S_INT			64
+#define MUXF_SPI0S_CLK			65
+#define MUXF_SPI0S_EN			66
+#define MUXF_SPI0S_DO			67
+#define MUXF_SPI0S_DI			68
+#define MUXF_SPI1S_INT			69
+#define MUXF_SPI1S_CLK			70
+#define MUXF_SPI1S_EN			71
+#define MUXF_SPI1S_DO			72
+#define MUXF_SPI1S_DI			73
+#define MUXF_SPI2S_INT			74
+#define MUXF_SPI2S_CLK			75
+#define MUXF_SPI2S_EN			76
+#define MUXF_SPI2S_DO			77
+#define MUXF_SPI2S_DI			78
+#define MUXF_SPI3S_INT			79
+#define MUXF_SPI3S_CLK			80
+#define MUXF_SPI3S_EN			81
+#define MUXF_SPI3S_DO			82
+#define MUXF_SPI3S_DI			83
+#define MUXF_I2CM0_CLK			84
+#define MUXF_I2CM0_DAT			85
+#define MUXF_I2CM1_CLK			86
+#define MUXF_I2CM1_DAT			87
+#define MUXF_I2CM2_CLK			88
+#define MUXF_I2CM2_DAT			89
+#define MUXF_I2CM3_CLK			90
+#define MUXF_I2CM3_DAT			91
+#define MUXF_UA1_TX			92
+#define MUXF_UA1_RX			93
+#define MUXF_UA1_CTS			94
+#define MUXF_UA1_RTS			95
+#define MUXF_UA2_TX			96
+#define MUXF_UA2_RX			97
+#define MUXF_UA2_CTS			98
+#define MUXF_UA2_RTS			99
+#define MUXF_UA3_TX			100
+#define MUXF_UA3_RX			101
+#define MUXF_UA3_CTS			102
+#define MUXF_UA3_RTS			103
+#define MUXF_UA4_TX			104
+#define MUXF_UA4_RX			105
+#define MUXF_UA4_CTS			106
+#define MUXF_UA4_RTS			107
+#define MUXF_TIMER0_INT			108
+#define MUXF_TIMER1_INT			109
+#define MUXF_TIMER2_INT			110
+#define MUXF_TIMER3_INT			111
+#define MUXF_GPIO_INT0			112
+#define MUXF_GPIO_INT1			113
+#define MUXF_GPIO_INT2			114
+#define MUXF_GPIO_INT3			115
+#define MUXF_GPIO_INT4			116
+#define MUXF_GPIO_INT5			117
+#define MUXF_GPIO_INT6			118
+#define MUXF_GPIO_INT7			119
+
+#define GROP_SPI_FLASH			120
+#define GROP_SPI_FLASH_4BIT		121
+#define GROP_SPI_NAND			122
+#define GROP_CARD0_EMMC			123
+#define GROP_SD_CARD			124
+#define GROP_UA0			125
+#define GROP_ACHIP_DEBUG		126
+#define GROP_ACHIP_UA2AXI		127
+#define GROP_FPGA_IFX			128
+#define GROP_HDMI_TX			129
+#define GROP_AUD_EXT_ADC_IFX0		130
+#define GROP_AUD_EXT_DAC_IFX0		131
+#define GROP_SPDIF_RX			132
+#define GROP_SPDIF_TX			133
+#define GROP_TDMTX_IFX0			134
+#define GROP_TDMRX_IFX0			135
+#define GROP_PDMRX_IFX0			136
+#define GROP_PCM_IEC_TX			137
+#define GROP_LCDIF			138
+#define GROP_DVD_DSP_DEBUG		139
+#define GROP_I2C_DEBUG			140
+#define GROP_I2C_SLAVE			141
+#define GROP_WAKEUP			142
+#define GROP_UART2AXI			143
+#define GROP_USB0_I2C			144
+#define GROP_USB1_I2C			145
+#define GROP_USB0_OTG			146
+#define GROP_USB1_OTG			147
+#define GROP_UPHY0_DEBUG		148
+#define GROP_UPHY1_DEBUG		149
+#define GROP_UPHY0_EXT			150
+#define GROP_PROBE_PORT			151
+
+#endif
include/dt-bindings/pinctrl/sppctl.h new file +30 -0
new file mode 100644
index 0000000..8bf5457
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/* Sunplus dt-bindings Pinctrl header file
+ * Copyright (C) Sunplus Tech / Tibbo Tech.
+ * Author: Dvorkin Dmitry <[email protected]>
+ */
+
+#ifndef __DT_BINDINGS_PINCTRL_SPPCTL_H__
+#define __DT_BINDINGS_PINCTRL_SPPCTL_H__
+
+#define IOP_G_MASTE		(0x01 << 0)
+#define IOP_G_FIRST		(0x01 << 1)
+
+#define SPPCTL_PCTL_G_PMUX	(0x00        | IOP_G_MASTE)
+#define SPPCTL_PCTL_G_GPIO	(IOP_G_FIRST | IOP_G_MASTE)
+#define SPPCTL_PCTL_G_IOPP	(IOP_G_FIRST | 0x00)
+
+#define SPPCTL_PCTL_L_OUT	(0x01 << 0)	/* Output LOW        */
+#define SPPCTL_PCTL_L_OU1	(0x01 << 1)	/* Output HIGH       */
+#define SPPCTL_PCTL_L_INV	(0x01 << 2)	/* Input Invert      */
+#define SPPCTL_PCTL_L_ONV	(0x01 << 3)	/* Output Invert     */
+#define SPPCTL_PCTL_L_ODR	(0x01 << 4)	/* Output Open Drain */
+
+/*
+ * pack into 32-bit value:
+ * pin#(8bit), typ(8bit), function(8bit), flag(8bit)
+ */
+#define SPPCTL_IOPAD(pin, typ, fun, flg)	(((pin) << 24) | ((typ) << 16) | \
+						((fun) << 8) | (flg))
+
+#endif
Signature · 1 line
2.7.4
#6 lore raw

RE: [PATCH v5 1/2] dt-bindings: pinctrl: Add dt-bindings for Sunplus SP7021

Hi Rob,

Thanks a lot for review.

Please see my replies below:

Quoted 137 lines
Quoted 137 lines

Add dt-bindings header files and documentation for Sunplus SP7021 SoC.

---
Changes in V5
- Removed "GPIOXT2" registers

 .../bindings/pinctrl/sunplus,sp7021-pinctrl.yaml   | 373 +++++++++++++++++++++
 MAINTAINERS                                        |   9 +
 include/dt-bindings/pinctrl/sppctl-sp7021.h        | 171 ++++++++++
 include/dt-bindings/pinctrl/sppctl.h               |  30 ++
 4 files changed, 583 insertions(+)
 create mode 100644
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/sppctl-sp7021.h
 create mode 100644 include/dt-bindings/pinctrl/sppctl.h

diff --git a/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yam l b/Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl.yam l
new file mode 100644
index 0000000..2672169

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +110 -0
+++ .yaml
@@ -0,0 +1,373 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright
+(C) Sunplus Co., Ltd.
+%YAML 1.2
+---
+$id:
+http://devicetree.org/schemas/pinctrl/sunplus,sp7021-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus SP7021 Pin Controller Device Tree Bindings
+
+maintainers:
+  - Dvorkin Dmitry <[email protected]>
+  - Wells Lu <[email protected]>
+
+description: |
+  The Sunplus SP7021 pin controller is used to control SoC pins.
+Please
+  refer to pinctrl-bindings.txt in this directory for details of the
+common
+  pinctrl bindings used by client devices.
+
+  SP7021 has 99 digital GPIO pins which are numbered from GPIO 0 to
+ 98. All  are multiplexed with some special function pins. SP7021 has
+ 3 types of  special function pins:
+
+  (1) function-group pins:
+      Ex 1 (SPI-NOR flash):
+        If control-field SPI_FLASH_SEL is set to 1, GPIO 83, 84, 86 and 87
+        will be pins of SPI-NOR flash. If it is set to 2, GPIO 76, 78, 79
+        and 81 will be pins of SPI-NOR flash.
+
+      Ex 2 (UART_0):
+        If control-bit UA0_SEL is set to 1, GPIO 88 and 89 will be TX and
+        RX pins of UART_0 (UART channel 0).
+
+      Ex 3 (eMMC):
+        If control-bit EMMC_SEL is set to 1, GPIO 72, 73, 74, 75, 76, 77,
+        78, 79, 80, 81 will be pins of an eMMC device.
+
+      Properties "function" and "groups" are used to select function-group
+      pins.
+
+  (2) fully pin-mux (like phone exchange mux) pins:
+      GPIO 8 to 71 are 'fully pin-mux' pins. Any pins of peripherals of
+      SP7021 (ex: UART_1, UART_2, UART_3, UART_4, I2C_0, I2C_1, and etc.)
+      can be routed to any pins of fully pin-mux pins.
+
+      Ex 1 (UART channel 1):
+        If control-field UA1_TX_SEL is set to 3, TX pin of UART_1 will be
+        routed to GPIO 10 (3 - 1 + 8 = 10).
+        If control-field UA1_RX_SEL is set to 4, RX pin of UART_1 will be
+        routed to GPIO 11 (4 - 1 + 8 = 11).
+        If control-field UA1_RTS_SEL is set to 5, RTS pin of UART_1 will
+        be routed to GPIO 12 (5 - 1 + 8 = 12).
+        If control-field UA1_CTS_SEL is set to 6, CTS pin of UART_1 will
+        be routed to GPIO 13 (6 - 1 + 8 = 13).
+
+      Ex 2 (I2C channel 0):
+        If control-field I2C0_CLK_SEL is set to 20, CLK pin of I2C_0 will
+        be routed to GPIO 27 (20 - 1 + 8 = 27).
+        If control-field I2C0_DATA_SEL is set to 21, DATA pin of I2C_0
+        will be routed to GPIO 28 (21 - 1 + 9 = 28).
+
+      Totally, SP7021 has 120 peripheral pins. The peripheral pins can be
+      routed to any of 64 'fully pin-mux' pins.
+
+  (3) I/O processor pins
+      SP7021 has a built-in I/O processor.
+      Any GPIO pins (GPIO 0 to 98) can be set to pins of I/O processor.
+
+  Vendor property "sunplus,pins" is used to select "fully pin-mux"
+ pins,  "I/O processor pins" and "digital GPIO" pins.
+
+  The device node of pin controller of Sunplus SP7021 has following
+ properties.
+
+properties:
+  compatible:
+    const: sunplus,sp7021-pctl
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  reg:
+    items:
+      - description: the MOON2 registers
+      - description: the GPIOXT registers
+      - description: the FIRST registers
+      - description: the MOON1 registers
+
+  reg-names:
+    items:
+      - const: moon2
+      - const: gpioxt
+      - const: first
+      - const: moon1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+patternProperties:
+  '-pins$':
+    type: object
+    description: |
Quoted 8 lines

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl line 115

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +6 -0
+      A pinctrl node should contain at least one subnodes representing the
+      pins or function-pins group available on the machine. Each subnode
+      will list the pins it needs, and how they should be configured.
+
+      Pinctrl node's client devices use subnodes for desired pin
+      configuration. Client device subnodes use below standard properties.

Need a $ref to pinmux-node.yaml

I'll add "$ref to pinmux-node.yaml" next patch.

Quoted 5 lines

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl line 118

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +3 -0
+
+    properties:
+      sunplus,pins:

Can't you just use 'pins' here?

No, property "sunplus,pins" defined here is different from standard property "pins". Mr. Linus Walleij asked me to add "sunplus," prefix.

Quoted 32 lines
Quoted 32 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +32 -0
+        description: |
+          Define 'sunplus,pins' which are used by pinctrl node's client
+          device.
+
+          It consists of one or more integers which represents the config
+          setting for corresponding pin. Each integer defines a individual
+          pin in which:
+
+          Bit 32~24: defines GPIO number. Its range is 0 ~ 98.
+          Bit 23~16: defines types: (1) fully pin-mux pins
+                                    (2) IO processor pins
+                                    (3) digital GPIO pins
+          Bit 15~8:  defines pins of peripherals (which are defined in
+                     'include/dt-binging/pinctrl/sppctl.h').
+          Bit 7~0:   defines types or initial-state of digital GPIO pins.
+
+          Please use macro SPPCTL_IOPAD to define the integers for pins.
+
+        $ref: /schemas/types.yaml#/definitions/uint32-array
+
+      function:
+        description: |
+          Define pin-function which is used by pinctrl node's client device.
+          The name should be one of string in the following enumeration.
+        $ref: "/schemas/types.yaml#/definitions/string"
+        enum: [ SPI_FLASH, SPI_FLASH_4BIT, SPI_NAND, CARD0_EMMC, SD_CARD,
+                UA0, FPGA_IFX, HDMI_TX, LCDIF, USB0_OTG, USB1_OTG ]
+
+      groups:
+        description: |
+          Define pin-group in a specified pin-function.
+          The name should be one of string in the following enumeration.
Quoted 8 lines

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl line 156

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +6 -0
+        $ref: "/schemas/types.yaml#/definitions/string"
+        enum: [ SPI_FLASH1, SPI_FLASH2, SPI_FLASH_4BIT1, SPI_FLASH_4BIT2,
+                SPI_NAND, CARD0_EMMC, SD_CARD, UA0, FPGA_IFX, HDMI_TX1,
+                HDMI_TX2, HDMI_TX3, LCDIF, USB0_OTG, USB1_OTG ]
+
+      sunplus,zero_func:

Don't use '_' in property names.

I'll rename it to "sunplus,zerofunc" next patch.

Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl line 162

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +6 -0
+        description: |
+          This is a vendor specific property. It is used to disable pins
+          which are not used by pinctrl node's client device.
+          Some pins may be enabled by boot-loader. We can use this
+          property to disable them.
+        $ref: /schemas/types.yaml#/definitions/uint32-array

IMO, disabled pins should be unused by the board design, not ones the bootloader failed to disable.

I am sorry. I don't understand this comment.
Could I have more explanation? What is IMO?

The property "sunplus,zerofunc" is used to disable pins which are enabled by boot-loader.

For example, boot-loader, U-Boot, enables a set of I2C pins. The I2C pins keep enabled when Linux boot up. We can use "sunplus,zerofunc" to disable the I2C pins in Linux.

Quoted 449 lines
Quoted 449 lines
Documentation/devicetree/bindings/pinctrl/sunplus,sp7021-pinctrl new file +214 -0
+
+    additionalProperties: false
+
+    allOf:
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_FLASH
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_FLASH1
+                - SPI_FLASH2
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_FLASH_4BIT
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_FLASH_4BIT1
+                - SPI_FLASH_4BIT2
+      - if:
+          properties:
+            function:
+              enum:
+                - SPI_NAND
+        then:
+          properties:
+            groups:
+              enum:
+                - SPI_NAND
+      - if:
+          properties:
+            function:
+              enum:
+                - CARD0_EMMC
+        then:
+          properties:
+            groups:
+              enum:
+                - CARD0_EMMC
+      - if:
+          properties:
+            function:
+              enum:
+                - SD_CARD
+        then:
+          properties:
+            groups:
+              enum:
+                - SD_CARD
+      - if:
+          properties:
+            function:
+              enum:
+                - UA0
+        then:
+          properties:
+            groups:
+              enum:
+                - UA0
+      - if:
+          properties:
+            function:
+              enum:
+                - FPGA_IFX
+        then:
+          properties:
+            groups:
+              enum:
+                - FPGA_IFX
+      - if:
+          properties:
+            function:
+              enum:
+                - HDMI_TX
+        then:
+          properties:
+            groups:
+              enum:
+                - HDMI_TX1
+                - HDMI_TX2
+                - HDMI_TX3
+      - if:
+          properties:
+            function:
+              enum:
+                - LCDIF
+        then:
+          properties:
+            groups:
+              enum:
+                - LCDIF
+      - if:
+          properties:
+            function:
+              enum:
+                - USB0_OTG
+        then:
+          properties:
+            groups:
+              enum:
+                - USB0_OTG
+      - if:
+          properties:
+            function:
+              enum:
+                - USB1_OTG
+        then:
+          properties:
+            groups:
+              enum:
+                - USB1_OTG
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - "#gpio-cells"
+  - gpio-controller
+  - clocks
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/pinctrl/sppctl-sp7021.h>
+
+    pinctl@9c000100 {
+        compatible = "sunplus,sp7021-pctl";
+        reg = <0x9c000100 0x100>, <0x9c000300 0x100>,
+              <0x9c0032e4 0x1c>, <0x9c000080 0x20>;
+        reg-names = "moon2", "gpioxt", "first", "moon1";
+        gpio-controller;
+        #gpio-cells = <2>;
+        clocks = <&clkc 0x83>;
+        resets = <&rstc 0x73>;
+
+        uart0-pins {
+            function = "UA0";
+            groups = "UA0";
+        };
+
+        spinand0-pins {
+            function = "SPI_NAND";
+            groups = "SPI_NAND";
+        };
+
+        uart1-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(11, SPPCTL_PCTL_G_PMUX, MUXF_UA1_TX, 0)
+                SPPCTL_IOPAD(10, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RX, 0)
+            >;
+        };
+
+        uart2-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(20, SPPCTL_PCTL_G_PMUX, MUXF_UA1_TX, 0)
+                SPPCTL_IOPAD(21, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RX, 0)
+                SPPCTL_IOPAD(22, SPPCTL_PCTL_G_PMUX, MUXF_UA1_RTS, 0)
+                SPPCTL_IOPAD(23, SPPCTL_PCTL_G_PMUX, MUXF_UA1_CTS, 0)
+            >;
+        };
+
+        emmc-pins {
+            function = "CARD0_EMMC";
+            groups = "CARD0_EMMC";
+        };
+
+        sdcard-pins {
+            function = "SD_CARD";
+            groups = "SD_CARD";
+            sunplus,pins = < SPPCTL_IOPAD(91, SPPCTL_PCTL_G_GPIO, 0, 0) >;
+        };
+
+        hdmi_A_tx1-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX1";
+        };
+        hdmi_A_tx2-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX2";
+        };
+        hdmi_A_tx3-pins {
+            function = "HDMI_TX";
+            groups = "HDMI_TX3";
+        };
+
+        ethernet-pins {
+            sunplus,pins = <
+                SPPCTL_IOPAD(49,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_CLK_OUT,0)
+                SPPCTL_IOPAD(44,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_MAC_SMI_MDC,0)
+                SPPCTL_IOPAD(43,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_MAC_SMI_MDIO,0)
+                SPPCTL_IOPAD(52,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXEN,0)
+                SPPCTL_IOPAD(50,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXD0,0)
+                SPPCTL_IOPAD(51,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_TXD1,0)
+                SPPCTL_IOPAD(46,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_CRSDV,0)
+                SPPCTL_IOPAD(47,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_RXD0,0)
+                SPPCTL_IOPAD(48,SPPCTL_PCTL_G_PMUX,MUXF_L2SW_P0_MAC_RMII_RXD1,0)
+            >;
+            sunplus,zero_func = <
+                MUXF_L2SW_LED_FLASH0
+                MUXF_L2SW_LED_ON0
+                MUXF_L2SW_P0_MAC_RMII_RXER
+            >;
+        };
+    };
+...
MAINTAINERS +9 -0
@@ -15127,6 +15127,15 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/pinctrl/pinctrl-single.c
 
+PIN CONTROLLER - SUNPLUS / TIBBO
+M:	Dvorkin Dmitry <[email protected]>
+M:	Wells Lu <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+W:	https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
+F:	Documentation/devicetree/bindings/pinctrl/sunplus,*
+F:	include/dt-bindings/pinctrl/sppctl*
+
 PKTCDVD DRIVER
 M:	[email protected]
 S:	Orphan
include/dt-bindings/pinctrl/sppctl-sp7021.h new file +170 -0
new file mode 100644
index 0000000..8299ca1
@@ -0,0 +1,171 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/* Sunplus SP7021 dt-bindings Pinctrl header file
+ * Copyright (C) Sunplus Tech/Tibbo Tech.
+ * Author: Dvorkin Dmitry <[email protected]>  */
+
+#ifndef	__DT_BINDINGS_PINCTRL_SPPCTL_SP7021_H__
+#define	__DT_BINDINGS_PINCTRL_SPPCTL_SP7021_H__
+
+#include <dt-bindings/pinctrl/sppctl.h>
+
+/* Please don't change the order of the
+ * following defines. They are based on
+ * order of control register define of
+ * MOON1 ~ MOON4 registers.
+ */
+#define MUXF_L2SW_CLK_OUT		0
+#define MUXF_L2SW_MAC_SMI_MDC		1
+#define MUXF_L2SW_LED_FLASH0		2
+#define MUXF_L2SW_LED_FLASH1		3
+#define MUXF_L2SW_LED_ON0		4
+#define MUXF_L2SW_LED_ON1		5
+#define MUXF_L2SW_MAC_SMI_MDIO		6
+#define MUXF_L2SW_P0_MAC_RMII_TXEN	7
+#define MUXF_L2SW_P0_MAC_RMII_TXD0	8
+#define MUXF_L2SW_P0_MAC_RMII_TXD1	9
+#define MUXF_L2SW_P0_MAC_RMII_CRSDV	10
+#define MUXF_L2SW_P0_MAC_RMII_RXD0	11
+#define MUXF_L2SW_P0_MAC_RMII_RXD1	12
+#define MUXF_L2SW_P0_MAC_RMII_RXER	13
+#define MUXF_L2SW_P1_MAC_RMII_TXEN	14
+#define MUXF_L2SW_P1_MAC_RMII_TXD0	15
+#define MUXF_L2SW_P1_MAC_RMII_TXD1	16
+#define MUXF_L2SW_P1_MAC_RMII_CRSDV	17
+#define MUXF_L2SW_P1_MAC_RMII_RXD0	18
+#define MUXF_L2SW_P1_MAC_RMII_RXD1	19
+#define MUXF_L2SW_P1_MAC_RMII_RXER	20
+#define MUXF_DAISY_MODE			21
+#define MUXF_SDIO_CLK			22
+#define MUXF_SDIO_CMD			23
+#define MUXF_SDIO_D0			24
+#define MUXF_SDIO_D1			25
+#define MUXF_SDIO_D2			26
+#define MUXF_SDIO_D3			27
+#define MUXF_PWM0			28
+#define MUXF_PWM1			29
+#define MUXF_PWM2			30
+#define MUXF_PWM3			31
+#define MUXF_PWM4			32
+#define MUXF_PWM5			33
+#define MUXF_PWM6			34
+#define MUXF_PWM7			35
+#define MUXF_ICM0_D			36
+#define MUXF_ICM1_D			37
+#define MUXF_ICM2_D			38
+#define MUXF_ICM3_D			39
+#define MUXF_ICM0_CLK			40
+#define MUXF_ICM1_CLK			41
+#define MUXF_ICM2_CLK			42
+#define MUXF_ICM3_CLK			43
+#define MUXF_SPIM0_INT			44
+#define MUXF_SPIM0_CLK			45
+#define MUXF_SPIM0_EN			46
+#define MUXF_SPIM0_DO			47
+#define MUXF_SPIM0_DI			48
+#define MUXF_SPIM1_INT			49
+#define MUXF_SPIM1_CLK			50
+#define MUXF_SPIM1_EN			51
+#define MUXF_SPIM1_DO			52
+#define MUXF_SPIM1_DI			53
+#define MUXF_SPIM2_INT			54
+#define MUXF_SPIM2_CLK			55
+#define MUXF_SPIM2_EN			56
+#define MUXF_SPIM2_DO			57
+#define MUXF_SPIM2_DI			58
+#define MUXF_SPIM3_INT			59
+#define MUXF_SPIM3_CLK			60
+#define MUXF_SPIM3_EN			61
+#define MUXF_SPIM3_DO			62
+#define MUXF_SPIM3_DI			63
+#define MUXF_SPI0S_INT			64
+#define MUXF_SPI0S_CLK			65
+#define MUXF_SPI0S_EN			66
+#define MUXF_SPI0S_DO			67
+#define MUXF_SPI0S_DI			68
+#define MUXF_SPI1S_INT			69
+#define MUXF_SPI1S_CLK			70
+#define MUXF_SPI1S_EN			71
+#define MUXF_SPI1S_DO			72
+#define MUXF_SPI1S_DI			73
+#define MUXF_SPI2S_INT			74
+#define MUXF_SPI2S_CLK			75
+#define MUXF_SPI2S_EN			76
+#define MUXF_SPI2S_DO			77
+#define MUXF_SPI2S_DI			78
+#define MUXF_SPI3S_INT			79
+#define MUXF_SPI3S_CLK			80
+#define MUXF_SPI3S_EN			81
+#define MUXF_SPI3S_DO			82
+#define MUXF_SPI3S_DI			83
+#define MUXF_I2CM0_CLK			84
+#define MUXF_I2CM0_DAT			85
+#define MUXF_I2CM1_CLK			86
+#define MUXF_I2CM1_DAT			87
+#define MUXF_I2CM2_CLK			88
+#define MUXF_I2CM2_DAT			89
+#define MUXF_I2CM3_CLK			90
+#define MUXF_I2CM3_DAT			91
+#define MUXF_UA1_TX			92
+#define MUXF_UA1_RX			93
+#define MUXF_UA1_CTS			94
+#define MUXF_UA1_RTS			95
+#define MUXF_UA2_TX			96
+#define MUXF_UA2_RX			97
+#define MUXF_UA2_CTS			98
+#define MUXF_UA2_RTS			99
+#define MUXF_UA3_TX			100
+#define MUXF_UA3_RX			101
+#define MUXF_UA3_CTS			102
+#define MUXF_UA3_RTS			103
+#define MUXF_UA4_TX			104
+#define MUXF_UA4_RX			105
+#define MUXF_UA4_CTS			106
+#define MUXF_UA4_RTS			107
+#define MUXF_TIMER0_INT			108
+#define MUXF_TIMER1_INT			109
+#define MUXF_TIMER2_INT			110
+#define MUXF_TIMER3_INT			111
+#define MUXF_GPIO_INT0			112
+#define MUXF_GPIO_INT1			113
+#define MUXF_GPIO_INT2			114
+#define MUXF_GPIO_INT3			115
+#define MUXF_GPIO_INT4			116
+#define MUXF_GPIO_INT5			117
+#define MUXF_GPIO_INT6			118
+#define MUXF_GPIO_INT7			119
+
+#define GROP_SPI_FLASH			120
+#define GROP_SPI_FLASH_4BIT		121
+#define GROP_SPI_NAND			122
+#define GROP_CARD0_EMMC			123
+#define GROP_SD_CARD			124
+#define GROP_UA0			125
+#define GROP_ACHIP_DEBUG		126
+#define GROP_ACHIP_UA2AXI		127
+#define GROP_FPGA_IFX			128
+#define GROP_HDMI_TX			129
+#define GROP_AUD_EXT_ADC_IFX0		130
+#define GROP_AUD_EXT_DAC_IFX0		131
+#define GROP_SPDIF_RX			132
+#define GROP_SPDIF_TX			133
+#define GROP_TDMTX_IFX0			134
+#define GROP_TDMRX_IFX0			135
+#define GROP_PDMRX_IFX0			136
+#define GROP_PCM_IEC_TX			137
+#define GROP_LCDIF			138
+#define GROP_DVD_DSP_DEBUG		139
+#define GROP_I2C_DEBUG			140
+#define GROP_I2C_SLAVE			141
+#define GROP_WAKEUP			142
+#define GROP_UART2AXI			143
+#define GROP_USB0_I2C			144
+#define GROP_USB1_I2C			145
+#define GROP_USB0_OTG			146
+#define GROP_USB1_OTG			147
+#define GROP_UPHY0_DEBUG		148
+#define GROP_UPHY1_DEBUG		149
+#define GROP_UPHY0_EXT			150
+#define GROP_PROBE_PORT			151
+
+#endif
include/dt-bindings/pinctrl/sppctl.h new file +28 -1
new file mode 100644
index 0000000..8bf5457
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/* Sunplus dt-bindings Pinctrl header file
+ * Copyright (C) Sunplus Tech / Tibbo Tech.
+ * Author: Dvorkin Dmitry <[email protected]>  */
+
+#ifndef __DT_BINDINGS_PINCTRL_SPPCTL_H__ #define
+__DT_BINDINGS_PINCTRL_SPPCTL_H__
+
+#define IOP_G_MASTE		(0x01 << 0)
+#define IOP_G_FIRST		(0x01 << 1)
+
+#define SPPCTL_PCTL_G_PMUX	(0x00        | IOP_G_MASTE)
+#define SPPCTL_PCTL_G_GPIO	(IOP_G_FIRST | IOP_G_MASTE)
+#define SPPCTL_PCTL_G_IOPP	(IOP_G_FIRST | 0x00)
+
+#define SPPCTL_PCTL_L_OUT	(0x01 << 0)	/* Output LOW        */
+#define SPPCTL_PCTL_L_OU1	(0x01 << 1)	/* Output HIGH       */
+#define SPPCTL_PCTL_L_INV	(0x01 << 2)	/* Input Invert      */
+#define SPPCTL_PCTL_L_ONV	(0x01 << 3)	/* Output Invert     */
+#define SPPCTL_PCTL_L_ODR	(0x01 << 4)	/* Output Open Drain */
+
+/*
+ * pack into 32-bit value:
+ * pin#(8bit), typ(8bit), function(8bit), flag(8bit)  */
+#define SPPCTL_IOPAD(pin, typ, fun, flg)	(((pin) << 24) | ((typ) << 16) | \
+						((fun) << 8) | (flg))
+
+#endif
--

2.7.4

author maintainer
#7 lore raw

PATCH v5 2/2 pinctrl: Add driver for Sunplus SP7021

In reply to Wells Lu

Add driver for Sunplus SP7021 SoC.

---
Changes in V5
- Addedssed comments of Mr. Andy Shevchenko
- Re-ordered and added more header files.
- Revised comment-style of multi-line.
- Added inline functions for GPIO-related registers accesses.
- Added lock/unlock for some GPIO operations.
- Removed most of dev_dbg() functions. Only keep some for dt node debug.
- Added extra comma at end of the last element of constant arraies.
- Added 'check_mul_overflow' for devm_kcalloc() function.
- Cleaned up code of sppctl_resource_map() function.
- Modified and added more comments.
- Others
- Removed "GPIOXT2" registers

 MAINTAINERS                             |    1 +
 drivers/pinctrl/Kconfig                 |    1 +
 drivers/pinctrl/Makefile                |    1 +
 drivers/pinctrl/sunplus/Kconfig         |   21 +
 drivers/pinctrl/sunplus/Makefile        |    5 +
 drivers/pinctrl/sunplus/sppctl.c        | 1178 +++++++++++++++++++++++++++++++
 drivers/pinctrl/sunplus/sppctl.h        |  155 ++++
 drivers/pinctrl/sunplus/sppctl_sp7021.c |  584 +++++++++++++++
 8 files changed, 1946 insertions(+)
 create mode 100644 drivers/pinctrl/sunplus/Kconfig
 create mode 100644 drivers/pinctrl/sunplus/Makefile
 create mode 100644 drivers/pinctrl/sunplus/sppctl.c
 create mode 100644 drivers/pinctrl/sunplus/sppctl.h
 create mode 100644 drivers/pinctrl/sunplus/sppctl_sp7021.c
MAINTAINERS +1 -0
index 6b1cfc2..e0dca8f 100644
@@ -15134,6 +15134,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
 F:	Documentation/devicetree/bindings/pinctrl/sunplus,*
+F:	drivers/pinctrl/sunplus/
 F:	include/dt-bindings/pinctrl/sppctl*
 
 PKTCDVD DRIVER
drivers/pinctrl/Kconfig +1 -0
index 6a961d5..5aa4e29 100644
@@ -459,6 +459,7 @@ source "drivers/pinctrl/samsung/Kconfig"
 source "drivers/pinctrl/spear/Kconfig"
 source "drivers/pinctrl/sprd/Kconfig"
 source "drivers/pinctrl/stm32/Kconfig"
+source "drivers/pinctrl/sunplus/Kconfig"
 source "drivers/pinctrl/sunxi/Kconfig"
 source "drivers/pinctrl/tegra/Kconfig"
 source "drivers/pinctrl/ti/Kconfig"
drivers/pinctrl/Makefile +1 -0
index 5e63de2..9f1eef3 100644
@@ -67,6 +67,7 @@ obj-$(CONFIG_PINCTRL_SAMSUNG)	+= samsung/
 obj-$(CONFIG_PINCTRL_SPEAR)	+= spear/
 obj-y				+= sprd/
 obj-$(CONFIG_PINCTRL_STM32)	+= stm32/
+obj-y				+= sunplus/
 obj-$(CONFIG_PINCTRL_SUNXI)	+= sunxi/
 obj-y				+= ti/
 obj-$(CONFIG_PINCTRL_UNIPHIER)	+= uniphier/
drivers/pinctrl/sunplus/Kconfig new file +21 -0
new file mode 100644
index 0000000..d9291a7
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Sunplus Pin control driver configuration
+#
+
+config PINCTRL_SPPCTL
+	bool "Sunplus SP7021 PinMux and GPIO driver"
+	depends on SOC_SP7021
+	depends on OF && HAS_IOMEM
+	select GENERIC_PINCTRL_GROUPS
+	select GENERIC_PINMUX_FUNCTIONS
+	select GENERIC_PINCONF
+	select PINCONF
+	select PINMUX
+	select GPIOLIB
+	select OF_GPIO
+	help
+	  Say Y here to support Sunplus SP7021 pinmux controller.
+	  The driver is selected automatically by platform.
+	  This driver requires the pinctrl framework.
+	  GPIO is provided by the same driver.
drivers/pinctrl/sunplus/Makefile new file +5 -0
new file mode 100644
index 0000000..63482da
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the Sunplus Pin control drivers.
+#
+obj-$(CONFIG_PINCTRL_SPPCTL) += sppctl.o sppctl_sp7021.o
drivers/pinctrl/sunplus/sppctl.c new file +1178 -0

1,178 lines not on this page · raw message

drivers/pinctrl/sunplus/sppctl.h new file +155 -0

155 lines not on this page · raw message

drivers/pinctrl/sunplus/sppctl_sp7021.c new file +584 -0

584 lines not on this page · raw message

Signature · 1 line
2.7.4
#8 lore raw

Re: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Quoted 2 lines · Wells Lu

Add driver for Sunplus SP7021 SoC.

Thanks for an update, my comments below.

...

drivers/pinctrl/sunplus/Kconfig line 7

Quoted 2 lines
drivers/pinctrl/sunplus/Kconfig new file +2 -0
+config PINCTRL_SPPCTL
+       bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Quoted 2 lines
drivers/pinctrl/sunplus/Kconfig new file +2 -0
+       depends on SOC_SP7021
+       depends on OF && HAS_IOMEM

...

drivers/pinctrl/sunplus/sppctl.c line 18

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +5 -0
+#include <linux/of.h>
+#include <linux/of_device.h>
 
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinmux.h>

Can you move this group...

drivers/pinctrl/sunplus/sppctl.c line 21

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>

...to be somewhere here?

Quoted 1 line

+#include <dt-bindings/pinctrl/sppctl-sp7021.h>

...

Quoted 1 line

+/* inline functions */

Useless.

...

drivers/pinctrl/sunplus/sppctl.c line 186

Quoted 2 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       mask = GENMASK(bit_sz - 1, 0) << (bit_off + SPPCTL_GROUP_PINMUX_MASK_SHIFT);
+       reg = mask | (val << bit_off);

Now you may do one step forward:

       mask = GENMASK(bit_sz - 1, 0) << SPPCTL_GROUP_PINMUX_MASK_SHIFT;
       reg = (val | mask) << bit_off;

...

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+static void sppctl_first_master_set(struct gpio_chip *chip, unsigned int offset,
+                                   enum mux_first_reg first, enum mux_master_reg master)
+{
+       struct sppctl_gpio_chip *spp_gchip = gpiochip_get_data(chip);
+       u32 reg_off, bit_off, reg;
+       int val;
+
+       /* FIRST register */
+       if (first != mux_f_keep) {
+               /*

drivers/pinctrl/sunplus/sppctl.c line 274

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +9 -0
+                * Refer to descriptions of function sppctl_first_get()
+                * for usage of FIRST registers.
+                */
+               reg_off = (offset / 32) * 4;
+               bit_off = offset % 32;
+
+               reg = sppctl_first_readl(spp_gchip, reg_off);
+               val = (reg & BIT(bit_off)) ? 1 : 0;
 
+               if (first != val) {

first is enum, val is int, are you sure it's good to compare like this?

drivers/pinctrl/sunplus/sppctl.c line 278

Quoted 4 lines
drivers/pinctrl/sunplus/sppctl.c new file +4 -0
+                       if (first == mux_f_gpio)
+                               reg |= BIT(bit_off);
+                       else
+                               reg &= ~BIT(bit_off);

Since you operate against enums it's better to use switch-case.

Quoted 19 lines
drivers/pinctrl/sunplus/sppctl.c new file +19 -0
+                       sppctl_first_writel(spp_gchip, reg, reg_off);
+               }
+       }
+
+       /* MASTER register */
+       if (master != mux_m_keep) {
+               /*
+                * Refer to descriptions of function sppctl_master_get()
+                * for usage of MASTER registers.
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+
+               reg = BIT(bit_off) << SPPCTL_MASTER_MASK_SHIFT;
+               if (master == mux_m_gpio)
+                       reg |= BIT(bit_off);
+               sppctl_gpio_master_writel(spp_gchip, reg, reg_off);
+       }
+}

...

drivers/pinctrl/sunplus/sppctl.c line 326

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);
 
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

Perhaps a macro with definitive name?

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

You can use it even here:

if (val)
reg = MY_MACRO(bit_off)
else
reg = BIT(...) // perhaps another macro

...

Quoted 1 line

+ reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);

Ditto.

...

Quoted 1 line

+ reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

Ditto.

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

Ditto.

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

Ditto.

And looking into repetition, you may even have a helper which does this conditional

static inline u32 sppctl_...()
{
...
return reg;
}

...

Quoted 1 line

+ int ret = 0;

Redudant variable, return directly.

drivers/pinctrl/sunplus/sppctl.c line 508

Quoted 9 lines
drivers/pinctrl/sunplus/sppctl.c new file +9 -0
+       switch (param) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+               /*
+                * Upper 16-bit word is mask. Lower 16-bit word is value.
+                * Refer to descriptions of function sppctl_master_get().
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+               reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

As I commented above use helper function which takes offset as input and returns you reg and reg_off.

Quoted 21 lines
drivers/pinctrl/sunplus/sppctl.c new file +21 -0
+               sppctl_gpio_od_writel(spp_gchip, reg, reg_off);
+               break;
+
+       case PIN_CONFIG_INPUT_ENABLE:
+               break;
+
+       case PIN_CONFIG_OUTPUT:
+               ret = sppctl_gpio_direction_output(chip, offset, 0);
+               break;
+
+       case PIN_CONFIG_PERSIST_STATE:
+               ret = -ENOTSUPP;
+               break;
+
+       default:
+               ret = -EINVAL;
+               break;
+       }
+
+       return ret;
+}

...

drivers/pinctrl/sunplus/sppctl.c line 563

Quoted 2 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       if (!of_find_property(pdev->dev.of_node, "gpio-controller", NULL))
+               return dev_err_probe(&pdev->dev, -EINVAL, "Not a gpio-controller!\n");

Why do you need this check for?

...

Quoted 1 line

+ gchip->can_sleep = 0;

Besides that it's already cleared, the type here is boolean.

...

Quoted 1 line

+/* pinconf operations */

Any value of this comment?

drivers/pinctrl/sunplus/sppctl.c line 613

Quoted 7 lines
drivers/pinctrl/sunplus/sppctl.c new file +6 -0
+static int sppctl_pin_config_get(struct pinctrl_dev *pctldev, unsigned int pin,
+                                unsigned long *config)
+{
+       struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev);
+       unsigned int param = pinconf_to_config_param(*config);
 
+       unsigned int arg = 0;

Move assignment to where it actually makes sense.

Quoted 23 lines
drivers/pinctrl/sunplus/sppctl.c new file +23 -0
+       switch (param) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+               if (!sppctl_gpio_output_od_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               break;
+
+       case PIN_CONFIG_OUTPUT:
+               if (!sppctl_first_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               if (!sppctl_master_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               if (sppctl_gpio_get_direction(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               arg = sppctl_gpio_get(&pctl->spp_gchip->chip, pin);
+               break;
+
+       default:
+               return -EOPNOTSUPP;
+       }
+       *config = pinconf_to_config_packed(param, arg);
+
+       return 0;
+}

...

Review

Quoted 2 lines
(quoted diff) +2 -0
+       switch (f->type) {
+       case pinmux_type_fpmx:  /* fully-pinmux */

Why do you need these comments?
Shouldn't you rather to kernel doc your enum entries?

Quoted 35 lines
drivers/pinctrl/sunplus/sppctl.c new file +33 -0
+               *num_groups = sppctl_pmux_list_sz;
+               *groups = sppctl_pmux_list_s;
+               break;
+
+       case pinmux_type_grp:   /* group-pinmux */
+               if (!f->grps)
+                       break;
+
+               *num_groups = f->gnum;
+               for (i = 0; i < pctl->unq_grps_sz; i++)
+                       if (pctl->g2fp_maps[i].f_idx == selector)
+                               break;
+               *groups = &pctl->unq_grps[i];
+               break;
 
+       }
 
+/** sppctl_fully_pinmux_conv - Convert GPIO# to fully-pinmux control-field setting
+ *
+ * Each fully-pinmux function can be mapped to any of GPIO 8 ~ 71 by
+ * settings its control-field. Refer to following table:
+ *
+ * control-field |  GPIO
+ * --------------+--------
+ *        0      |  No map
+ *        1      |    8
+ *        2      |    9
+ *        3      |   10
+ *        :      |    :
+ *       65      |   71
+ */
+static inline int sppctl_fully_pinmux_conv(unsigned int offset)
+{
+       return (offset < 8) ? 0 : offset - 7;
+}

...

drivers/pinctrl/sunplus/sppctl.c line 793

Quoted 8 lines
drivers/pinctrl/sunplus/sppctl.c new file +7 -0
+static const struct pinmux_ops sppctl_pinmux_ops = {
+       .get_functions_count = sppctl_get_functions_count,
+       .get_function_name   = sppctl_get_function_name,
+       .get_function_groups = sppctl_get_function_groups,
+       .set_mux             = sppctl_set_mux,
+       .gpio_request_enable = sppctl_gpio_request_enable,
 
+       .strict              = true

+ Comma.

Quoted 1 line

+};

...

Quoted 147 lines
drivers/pinctrl/sunplus/sppctl.c new file +147 -0
+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node *np_config,
+                                struct pinctrl_map **map, unsigned int *num_maps)
+{
+       struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev);
+       int nmG = of_property_count_strings(np_config, "groups");
+       const struct sppctl_func *f = NULL;
+       u8 pin_num, pin_type, pin_func;
+       struct device_node *parent;
+       unsigned long *configs;
+       struct property *prop;
+       const char *s_f, *s_g;
+
+       const __be32 *list;
+       u32 dt_pin, dt_fun;
+       int i, size = 0;
+
+       list = of_get_property(np_config, "sunplus,pins", &size);
+
+       if (nmG <= 0)
+               nmG = 0;
+
+       parent = of_get_parent(np_config);
+       *num_maps = size / sizeof(*list);
+
+       /*
+        * Process property:
+        *     sunplus,pins = < u32 u32 u32 ... >;
+        *
+        * Each 32-bit integer defines a individual pin in which:
+        *
+        *   Bit 32~24: defines GPIO pin number. Its range is 0 ~ 98.
+        *   Bit 23~16: defines types: (1) fully-pinmux pins
+        *                             (2) IO processor pins
+        *                             (3) digital GPIO pins
+        *   Bit 15~8:  defines pins of peripherals (which are defined in
+        *              'include/dt-binging/pinctrl/sppctl.h').
+        *   Bit 7~0:   defines types or initial-state of digital GPIO pins.
+        */
+       for (i = 0; i < (*num_maps); i++) {
+               dt_pin = be32_to_cpu(list[i]);
+               pin_num = FIELD_GET(GENMASK(31, 24), dt_pin);
+
+               /* Check if out of range? */
+               if (pin_num >= sppctl_pins_all_sz) {
+                       dev_err(pctldev->dev, "Invalid pin property at index %d (0x%08x)\n",
+                               i, dt_pin);
+                       return -EINVAL;
+               }
+       }
+
+       *map = kcalloc(*num_maps + nmG, sizeof(**map), GFP_KERNEL);
+       for (i = 0; i < (*num_maps); i++) {
+               dt_pin = be32_to_cpu(list[i]);
+               pin_num = FIELD_GET(GENMASK(31, 24), dt_pin);
+               pin_type = FIELD_GET(GENMASK(23, 16), dt_pin);
+               pin_func = FIELD_GET(GENMASK(15, 8), dt_pin);
+               (*map)[i].name = parent->name;
+
+               if (pin_type == SPPCTL_PCTL_G_GPIO) {
+                       /* A digital GPIO pin */
+                       (*map)[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
+                       (*map)[i].data.configs.num_configs = 1;
+                       (*map)[i].data.configs.group_or_pin = pin_get_name(pctldev, pin_num);
+                       configs = kmalloc(sizeof(*configs), GFP_KERNEL);
+                       *configs = FIELD_GET(GENMASK(7, 0), dt_pin);
+                       (*map)[i].data.configs.configs = configs;
+
+                       dev_dbg(pctldev->dev, "%s: GPIO (%s)\n",
+                               (*map)[i].data.configs.group_or_pin,
+                               (*configs & (SPPCTL_PCTL_L_OUT | SPPCTL_PCTL_L_OU1)) ?
+                               "OUT" : "IN");
+               } else if (pin_type == SPPCTL_PCTL_G_IOPP) {
+                       /* A IO Processor (IOP) pin */
+                       (*map)[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
+                       (*map)[i].data.configs.num_configs = 1;
+                       (*map)[i].data.configs.group_or_pin = pin_get_name(pctldev, pin_num);
+                       configs = kmalloc(sizeof(*configs), GFP_KERNEL);
+                       *configs = SPPCTL_IOP_CONFIGS;
+                       (*map)[i].data.configs.configs = configs;
+
+                       dev_dbg(pctldev->dev, "%s: IOP\n",
+                               (*map)[i].data.configs.group_or_pin);
+               } else {
+                       /* A fully-pinmux pin */
+                       (*map)[i].type = PIN_MAP_TYPE_MUX_GROUP;
+                       (*map)[i].data.mux.function = sppctl_list_funcs[pin_func].name;
+                       (*map)[i].data.mux.group = pin_get_name(pctldev, pin_num);
+
+                       dev_dbg(pctldev->dev, "%s: %s\n", (*map)[i].data.mux.group,
+                               (*map)[i].data.mux.function);
+               }
+       }
+
+       /*
+        * Process properties:
+        *     function = "xxx";
+        *     groups = "yyy";
+        */
+       if (nmG > 0 && of_property_read_string(np_config, "function", &s_f) == 0) {
+               of_property_for_each_string(np_config, "groups", prop, s_g) {
+                       (*map)[*num_maps].type = PIN_MAP_TYPE_MUX_GROUP;
+                       (*map)[*num_maps].data.mux.function = s_f;
+                       (*map)[*num_maps].data.mux.group = s_g;
+                       (*num_maps)++;
+
+                       dev_dbg(pctldev->dev, "%s: %s\n", s_f, s_g);
+               }
+       }
+
+       /*
+        * Process property:
+        *     sunplus,zero_func = < u32 u32 u32 ...>
+        */
+       list = of_get_property(np_config, "sunplus,zero_func", &size);
+       if (list) {
+               for (i = 0; i < (size / sizeof(*list)); i++) {
+                       dt_fun = be32_to_cpu(list[i]);
+                       if (dt_fun >= sppctl_list_funcs_sz) {
+                               dev_err(pctldev->dev, "Zero-func %d out of range!\n",
+                                       dt_fun);
+                               continue;
+                       }
+
+                       f = &sppctl_list_funcs[dt_fun];
+                       switch (f->type) {
+                       case pinmux_type_fpmx:
+                               sppctl_func_set(pctl, dt_fun, 0);
+                               dev_dbg(pctldev->dev, "%s: No map\n", f->name);
+                               break;
+
+                       case pinmux_type_grp:
+                               sppctl_gmx_set(pctl, f->roff, f->boff, f->blen, 0);
+                               dev_dbg(pctldev->dev, "%s: No map\n", f->name);
+                               break;
+
+                       default:
+                               dev_err(pctldev->dev, "Wrong zero-group: %d (%s)\n",
+                                       dt_fun, f->name);
+                               break;
+                       }
+               }
+       }
+
+       of_node_put(parent);
+       dev_dbg(pctldev->dev, "%d pins mapped\n", *num_maps);
+       return 0;
+}

...

drivers/pinctrl/sunplus/sppctl.c line 1050

Quoted 12 lines
drivers/pinctrl/sunplus/sppctl.c new file +11 -0
+       sppctl->g2fp_maps = devm_kcalloc(&pdev->dev, sppctl->unq_grps_sz + 1,
+                                        sizeof(*sppctl->g2fp_maps), GFP_KERNEL);
+       if (!sppctl->g2fp_maps)
+               return -ENOMEM;
 
+       /*
+        * Check only product of n and size of the second devm_kcalloc()
+        * because its size is the largest of the two.
+        */
+       if (unlikely(check_mul_overflow(sppctl->unq_grps_sz + 1,
+                                       sizeof(*sppctl->g2fp_maps), &prod)))
+               return -EINVAL;

What the point to check it after? What the point to use it with kcalloc()? Please, do your homework, i.e. read the code which implements that.

...

Quoted 1 line

+ struct device_node *np = of_node_get(pdev->dev.of_node);

What's the role of of_node_get()?

...

Quoted 1 line

+ /* Initialize pctl_desc */

Useless. Drop all useless comments like this from the code.

...

Quoted 1 line

+ dev_info(&pdev->dev, "SP7021 PinCtrl by Sunplus/Tibbo Tech.");

Is it useful?

...

drivers/pinctrl/sunplus/sppctl.h line 14

Quoted 9 lines
drivers/pinctrl/sunplus/sppctl.h new file +8 -0
+#ifndef __SPPCTL_H__
+#define __SPPCTL_H__
+
+#include <linux/bits.h>
+#include <linux/gpio/driver.h>
 
+#include <linux/kernel.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/spinlock.h>

types.h is missed.

...

Quoted 1 line

+/** enum mux_first_reg - define modes of FIRST register accesses

Fix the multi-line comment style. You mentioned you fixed, but seems not (not in all places).

Quoted 8 lines
+ *    - mux_f_mux:  Select the pin to a fully-pinmux pin
+ *    - mux_f_gpio: Select the pin to a GPIO or IOP pin
+ *    - mux_f_keep: Don't change (keep intact)

+ */

drivers/pinctrl/sunplus/sppctl.h new file +4 -0
+enum mux_first_reg {
+       mux_f_mux = 0,          /* select fully-pinmux       */
+       mux_f_gpio = 1,         /* select GPIO or IOP pinmux */
+       mux_f_keep = 2,         /* keep no change            */

drivers/pinctrl/sunplus/sppctl.h line 106

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.h new file +8 -0
+};
 
 
+struct sppctl_gpio_chip {
+       void __iomem *gpioxt_base;      /* MASTER, OE, OUT, IN, I_INV, O_INV, OD */
+       void __iomem *first_base;       /* GPIO_FIRST                            */
+
+       struct gpio_chip chip;
+       spinlock_t lock;                /* lock for accessing OE register        */
+};

Why is this in the header?

...

Quoted 3 lines

+/* SP7021 Pin Controller Driver.
+ * Copyright (C) Sunplus Tech / Tibbo Tech.
+ */

Multi-line comments.

I stopped here, please read my comments for previous versions and here and try your best.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#9 lore raw

RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Hi Andy,

Thanks a lot for your review.

Please see my answers below:

Quoted 11 lines
Quoted 2 lines

Add driver for Sunplus SP7021 SoC.

Thanks for an update, my comments below.

...

drivers/pinctrl/sunplus/Kconfig line 7

Quoted 2 lines
drivers/pinctrl/sunplus/Kconfig new file +2 -0
+config PINCTRL_SPPCTL
+       bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Should we set it to tristate?

Quoted 15 lines
Quoted 3 lines
drivers/pinctrl/sunplus/Kconfig new file +2 -0
+       depends on SOC_SP7021
+       depends on OF && HAS_IOMEM

...

drivers/pinctrl/sunplus/sppctl.c

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +5 -0
+#include <linux/of.h>
+#include <linux/of_device.h>
 
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinconf-generic.h> #include
+<linux/pinctrl/pinmux.h>

Can you move this group...

Quoted 5 lines

drivers/pinctrl/sunplus/sppctl.c line 21

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>

...to be somewhere here?

Yes, I'll move it next patch.

Quoted 7 lines
Quoted 1 line

+#include <dt-bindings/pinctrl/sppctl-sp7021.h>

...

Quoted 1 line

+/* inline functions */

Useless.

I'll remove all this kind of comments next patch.

Quoted 9 lines

...

drivers/pinctrl/sunplus/sppctl.c line 186

Quoted 2 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       mask = GENMASK(bit_sz - 1, 0) << (bit_off + SPPCTL_GROUP_PINMUX_MASK_SHIFT);
+       reg = mask | (val << bit_off);

Now you may do one step forward:

       mask = GENMASK(bit_sz - 1, 0) << SPPCTL_GROUP_PINMUX_MASK_SHIFT;
       reg = (val | mask) << bit_off;

I'll revise these statements as code you've shared.

Quoted 21 lines

...

Quoted 18 lines
drivers/pinctrl/sunplus/sppctl.c new file +18 -0
+static void sppctl_first_master_set(struct gpio_chip *chip, unsigned int offset,
+                                   enum mux_first_reg first, enum
+mux_master_reg master) {
+       struct sppctl_gpio_chip *spp_gchip = gpiochip_get_data(chip);
+       u32 reg_off, bit_off, reg;
+       int val;
+
+       /* FIRST register */
+       if (first != mux_f_keep) {
+               /*
+                * Refer to descriptions of function sppctl_first_get()
+                * for usage of FIRST registers.
+                */
+               reg_off = (offset / 32) * 4;
+               bit_off = offset % 32;
+
+               reg = sppctl_first_readl(spp_gchip, reg_off);
+               val = (reg & BIT(bit_off)) ? 1 : 0;
Quoted 3 lines
Quoted 1 line

+ if (first != val) {

first is enum, val is int, are you sure it's good to compare like this?

No, it is always not good to compare different type of things. I'll modify code as shown below:

	enum mux_first_reg val;
		:
		:
	val = (reg & BIT(bit_off)) ? mux_f_gpio : mux_f_mux;
Quoted 7 lines

drivers/pinctrl/sunplus/sppctl.c line 278

Quoted 4 lines
drivers/pinctrl/sunplus/sppctl.c new file +4 -0
+                       if (first == mux_f_gpio)
+                               reg |= BIT(bit_off);
+                       else
+                               reg &= ~BIT(bit_off);

Since you operate against enums it's better to use switch-case.

I'll modify code as shown below:

			if (first != val)
				switch (first) {
				case mux_f_gpio:
					reg |= BIT(bit_off);
					sppctl_first_writel(spp_gchip, reg, reg_off);
					break;

				case mux_f_mux:
					reg &= ~BIT(bit_off);
					sppctl_first_writel(spp_gchip, reg, reg_off);
					break;

				case mux_f_keep:
					break;
				}
Quoted 22 lines
Quoted 19 lines
drivers/pinctrl/sunplus/sppctl.c new file +19 -0
+                       sppctl_first_writel(spp_gchip, reg, reg_off);
+               }
+       }
+
+       /* MASTER register */
+       if (master != mux_m_keep) {
+               /*
+                * Refer to descriptions of function sppctl_master_get()
+                * for usage of MASTER registers.
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+
+               reg = BIT(bit_off) << SPPCTL_MASTER_MASK_SHIFT;
+               if (master == mux_m_gpio)
+                       reg |= BIT(bit_off);
+               sppctl_gpio_master_writel(spp_gchip, reg, reg_off);
+       }
+}

...

Quoted 5 lines

drivers/pinctrl/sunplus/sppctl.c line 326

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);
 
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

Perhaps a macro with definitive name?

I'll define two new macros:

#define SPPCTL_MOON_REG_MASK_SHIFT 16
#define SPPCTL_SET_MOON_REG_BIT(bit) (BIT(bit + SPPCTL_MOON_REG_MASK_SHIFT) | BIT(bit))
#define SPPCTL_CLR_MOON_REG_BIT(bit) BIT(bit + SPPCTL_MOON_REG_MASK_SHIFT)

And modify code as shown below:

			reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
Quoted 6 lines

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);
Quoted 6 lines

You can use it even here:

if (val)
reg = MY_MACRO(bit_off)
else
reg = BIT(...) // perhaps another macro

I'll modify code as shown below:

	if (val)
		reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
	else
		reg = SPPCTL_CLR_MOON_REG_BIT(bit_off);
Quoted 5 lines

...

Quoted 1 line

+ reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);

Ditto.

I'll modify code as shown below:

			reg = SPPCTL_CLR_MOON_REG_BIT(bit_off);
Quoted 5 lines

...

Quoted 1 line

+ reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

Ditto.

I'll modify code as shown shown below:

			reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
Quoted 7 lines

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

Ditto.

I'll modify code as shown below:

	if (val)
		reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
	else
		reg = SPPCTL_CLR_MOON_REG_BIT(bit_off);
Quoted 7 lines

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

Ditto.

I'll modify code as shown in above case.

Quoted 7 lines

And looking into repetition, you may even have a helper which does this conditional

static inline u32 sppctl_...()
{
...
return reg;
}

I'll add an inline function as shown below:

static inline u32 sppctl_prep_moon_reg(u32 bit_off, int val)

{
	if (val)
		return SPPCTL_SET_MOON_REG_BIT(bit_off);
	else
		return SPPCTL_CLR_MOON_REG_BIT(bit_off);
}

And replace all "if (val) ... " with the inline function.

Quoted 5 lines

...

Quoted 1 line

+ int ret = 0;

Redundant variable, return directly.

I'll remove the redundant variable.

Quoted 11 lines

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+       switch (param) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+               /*
+                * Upper 16-bit word is mask. Lower 16-bit word is value.
+                * Refer to descriptions of function sppctl_master_get().
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+               reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) |
+ BIT(bit_off);
Quoted 2 lines

As I commented above use helper function which takes offset as input and returns you reg and reg_off.

I'll modify code as shown below:

		reg = SPPCTL_SET_MOON_REG_BIT(bit_off);

Sorry, I don't understand your meaning "returns you reg and reg_off". The helper macro will return reg but not reg_off, right?

Quoted 24 lines
Quoted 21 lines
drivers/pinctrl/sunplus/sppctl.c new file +21 -0
+               sppctl_gpio_od_writel(spp_gchip, reg, reg_off);
+               break;
+
+       case PIN_CONFIG_INPUT_ENABLE:
+               break;
+
+       case PIN_CONFIG_OUTPUT:
+               ret = sppctl_gpio_direction_output(chip, offset, 0);
+               break;
+
+       case PIN_CONFIG_PERSIST_STATE:
+               ret = -ENOTSUPP;
+               break;
+
+       default:
+               ret = -EINVAL;
+               break;
+       }
+
+       return ret;
+}

...

Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+       if (!of_find_property(pdev->dev.of_node, "gpio-controller", NULL))
+               return dev_err_probe(&pdev->dev, -EINVAL, "Not a
+ gpio-controller!\n");

Why do you need this check for?

By referring to other pinctrl driver, we check if property "gpio-controller" exists? Will core help us check this?
Is this redundant?

Quoted 5 lines

...

Quoted 1 line

+ gchip->can_sleep = 0;

Besides that it's already cleared, the type here is boolean.

I'll remove the unnecessary assignment as the whole structure is initialized to 0. Should I also remove the assignment:

		gchip->base 		= 0;
Quoted 5 lines

...

Quoted 1 line

+/* pinconf operations */

Any value of this comment?

I'll remove it.

Quoted 8 lines

drivers/pinctrl/sunplus/sppctl.c line 613

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +5 -0
+static int sppctl_pin_config_get(struct pinctrl_dev *pctldev, unsigned int pin,
+                                unsigned long *config) {
+       struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev);
+       unsigned int param = pinconf_to_config_param(*config);
 
+       unsigned int arg = 0;

Move assignment to where it actually makes sense.

I'll move it as shown below:

		case PIN_CONFIG_DRIVE_OPEN_DRAIN:
			if (!sppctl_gpio_output_od_get(&pctl->spp_gchip->chip, pin))
				return -EINVAL;
			arg = 0;
			break;
Quoted 26 lines
Quoted 23 lines
drivers/pinctrl/sunplus/sppctl.c new file +23 -0
+       switch (param) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+               if (!sppctl_gpio_output_od_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               break;
+
+       case PIN_CONFIG_OUTPUT:
+               if (!sppctl_first_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               if (!sppctl_master_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               if (sppctl_gpio_get_direction(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               arg = sppctl_gpio_get(&pctl->spp_gchip->chip, pin);
+               break;
+
+       default:
+               return -EOPNOTSUPP;
+       }
+       *config = pinconf_to_config_packed(param, arg);
+
+       return 0;
+}

...

Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+       switch (f->type) {
+       case pinmux_type_fpmx:  /* fully-pinmux */

Why do you need these comments?
Shouldn't you rather to kernel doc your enum entries?

I'll remove the comments.
Could you please tell me where I should write and put my kernel doc? Is there any examples I can refer to?

Quoted 44 lines
Quoted 34 lines
drivers/pinctrl/sunplus/sppctl.c new file +32 -0
+               *num_groups = sppctl_pmux_list_sz;
+               *groups = sppctl_pmux_list_s;
+               break;
+
+       case pinmux_type_grp:   /* group-pinmux */
+               if (!f->grps)
+                       break;
+
+               *num_groups = f->gnum;
+               for (i = 0; i < pctl->unq_grps_sz; i++)
+                       if (pctl->g2fp_maps[i].f_idx == selector)
+                               break;
+               *groups = &pctl->unq_grps[i];
+               break;
 
+       }
 
+/** sppctl_fully_pinmux_conv - Convert GPIO# to fully-pinmux
+control-field setting
+ *
+ * Each fully-pinmux function can be mapped to any of GPIO 8 ~ 71 by
+ * settings its control-field. Refer to following table:
+ *
+ * control-field |  GPIO
+ * --------------+--------
+ *        0      |  No map
+ *        1      |    8
+ *        2      |    9
+ *        3      |   10
+ *        :      |    :
+ *       65      |   71
+ */
+static inline int sppctl_fully_pinmux_conv(unsigned int offset) {
+       return (offset < 8) ? 0 : offset - 7; }

...

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +6 -0
+static const struct pinmux_ops sppctl_pinmux_ops = {
+       .get_functions_count = sppctl_get_functions_count,
+       .get_function_name   = sppctl_get_function_name,
+       .get_function_groups = sppctl_get_function_groups,
+       .set_mux             = sppctl_set_mux,
+       .gpio_request_enable = sppctl_gpio_request_enable,
Quoted 3 lines
Quoted 1 line

+ .strict = true

+ Comma.

I'll add a comma right after 'true'.

Quoted 172 lines
Quoted 1 line

+};

...

Quoted 1 line

+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node

*np_config,

Quoted 34 lines
drivers/pinctrl/sunplus/sppctl.c new file +34 -0
+                                struct pinctrl_map **map, unsigned
+int *num_maps) {
+       struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev);
+       int nmG = of_property_count_strings(np_config, "groups");
+       const struct sppctl_func *f = NULL;
+       u8 pin_num, pin_type, pin_func;
+       struct device_node *parent;
+       unsigned long *configs;
+       struct property *prop;
+       const char *s_f, *s_g;
+
+       const __be32 *list;
+       u32 dt_pin, dt_fun;
+       int i, size = 0;
+
+       list = of_get_property(np_config, "sunplus,pins", &size);
+
+       if (nmG <= 0)
+               nmG = 0;
+
+       parent = of_get_parent(np_config);
+       *num_maps = size / sizeof(*list);
+
+       /*
+        * Process property:
+        *     sunplus,pins = < u32 u32 u32 ... >;
+        *
+        * Each 32-bit integer defines a individual pin in which:
+        *
+        *   Bit 32~24: defines GPIO pin number. Its range is 0 ~ 98.
+        *   Bit 23~16: defines types: (1) fully-pinmux pins
+        *                             (2) IO processor pins
+        *                             (3) digital GPIO pins
+        *   Bit 15~8:  defines pins of peripherals (which are defined in

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+        *              'include/dt-binging/pinctrl/sppctl.h').
+        *   Bit 7~0:   defines types or initial-state of digital GPIO pins.
+        */
+       for (i = 0; i < (*num_maps); i++) {
+               dt_pin = be32_to_cpu(list[i]);
+               pin_num = FIELD_GET(GENMASK(31, 24), dt_pin);
+
+               /* Check if out of range? */
+               if (pin_num >= sppctl_pins_all_sz) {
+                       dev_err(pctldev->dev, "Invalid pin property at index %d

(0x%08x)\n",

Quoted 8 lines
drivers/pinctrl/sunplus/sppctl.c new file +8 -0
+                               i, dt_pin);
+                       return -EINVAL;
+               }
+       }
+
+       *map = kcalloc(*num_maps + nmG, sizeof(**map), GFP_KERNEL);
+       for (i = 0; i < (*num_maps); i++) {
+               dt_pin = be32_to_cpu(list[i]);

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+               pin_num = FIELD_GET(GENMASK(31, 24), dt_pin);
+               pin_type = FIELD_GET(GENMASK(23, 16), dt_pin);
+               pin_func = FIELD_GET(GENMASK(15, 8), dt_pin);
+               (*map)[i].name = parent->name;
+
+               if (pin_type == SPPCTL_PCTL_G_GPIO) {
+                       /* A digital GPIO pin */
+                       (*map)[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
+                       (*map)[i].data.configs.num_configs = 1;
+                       (*map)[i].data.configs.group_or_pin = pin_get_name(pctldev,

pin_num);

drivers/pinctrl/sunplus/sppctl.c

Quoted 13 lines
drivers/pinctrl/sunplus/sppctl.c new file +13 -0
+                       configs = kmalloc(sizeof(*configs), GFP_KERNEL);
+                       *configs = FIELD_GET(GENMASK(7, 0), dt_pin);
+                       (*map)[i].data.configs.configs = configs;
+
+                       dev_dbg(pctldev->dev, "%s: GPIO (%s)\n",
+                               (*map)[i].data.configs.group_or_pin,
+                               (*configs & (SPPCTL_PCTL_L_OUT | SPPCTL_PCTL_L_OU1)) ?
+                               "OUT" : "IN");
+               } else if (pin_type == SPPCTL_PCTL_G_IOPP) {
+                       /* A IO Processor (IOP) pin */
+                       (*map)[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
+                       (*map)[i].data.configs.num_configs = 1;
+                       (*map)[i].data.configs.group_or_pin = pin_get_name(pctldev,

pin_num);

Quoted 72 lines
drivers/pinctrl/sunplus/sppctl.c new file +72 -0
+                       configs = kmalloc(sizeof(*configs), GFP_KERNEL);
+                       *configs = SPPCTL_IOP_CONFIGS;
+                       (*map)[i].data.configs.configs = configs;
+
+                       dev_dbg(pctldev->dev, "%s: IOP\n",
+                               (*map)[i].data.configs.group_or_pin);
+               } else {
+                       /* A fully-pinmux pin */
+                       (*map)[i].type = PIN_MAP_TYPE_MUX_GROUP;
+                       (*map)[i].data.mux.function = sppctl_list_funcs[pin_func].name;
+                       (*map)[i].data.mux.group =
+ pin_get_name(pctldev, pin_num);
+
+                       dev_dbg(pctldev->dev, "%s: %s\n", (*map)[i].data.mux.group,
+                               (*map)[i].data.mux.function);
+               }
+       }
+
+       /*
+        * Process properties:
+        *     function = "xxx";
+        *     groups = "yyy";
+        */
+       if (nmG > 0 && of_property_read_string(np_config, "function", &s_f) == 0) {
+               of_property_for_each_string(np_config, "groups", prop, s_g) {
+                       (*map)[*num_maps].type = PIN_MAP_TYPE_MUX_GROUP;
+                       (*map)[*num_maps].data.mux.function = s_f;
+                       (*map)[*num_maps].data.mux.group = s_g;
+                       (*num_maps)++;
+
+                       dev_dbg(pctldev->dev, "%s: %s\n", s_f, s_g);
+               }
+       }
+
+       /*
+        * Process property:
+        *     sunplus,zero_func = < u32 u32 u32 ...>
+        */
+       list = of_get_property(np_config, "sunplus,zero_func", &size);
+       if (list) {
+               for (i = 0; i < (size / sizeof(*list)); i++) {
+                       dt_fun = be32_to_cpu(list[i]);
+                       if (dt_fun >= sppctl_list_funcs_sz) {
+                               dev_err(pctldev->dev, "Zero-func %d out of range!\n",
+                                       dt_fun);
+                               continue;
+                       }
+
+                       f = &sppctl_list_funcs[dt_fun];
+                       switch (f->type) {
+                       case pinmux_type_fpmx:
+                               sppctl_func_set(pctl, dt_fun, 0);
+                               dev_dbg(pctldev->dev, "%s: No map\n", f->name);
+                               break;
+
+                       case pinmux_type_grp:
+                               sppctl_gmx_set(pctl, f->roff, f->boff, f->blen, 0);
+                               dev_dbg(pctldev->dev, "%s: No map\n", f->name);
+                               break;
+
+                       default:
+                               dev_err(pctldev->dev, "Wrong zero-group: %d (%s)\n",
+                                       dt_fun, f->name);
+                               break;
+                       }
+               }
+       }
+
+       of_node_put(parent);
+       dev_dbg(pctldev->dev, "%d pins mapped\n", *num_maps);
+       return 0;
+}

...

drivers/pinctrl/sunplus/sppctl.c line 1050

Quoted 12 lines
drivers/pinctrl/sunplus/sppctl.c new file +11 -0
+       sppctl->g2fp_maps = devm_kcalloc(&pdev->dev, sppctl->unq_grps_sz + 1,
+                                        sizeof(*sppctl->g2fp_maps), GFP_KERNEL);
+       if (!sppctl->g2fp_maps)
+               return -ENOMEM;
 
+       /*
+        * Check only product of n and size of the second devm_kcalloc()
+        * because its size is the largest of the two.
+        */
+       if (unlikely(check_mul_overflow(sppctl->unq_grps_sz + 1,
+                                       sizeof(*sppctl->g2fp_maps), &prod)))
+               return -EINVAL;
Quoted 2 lines

What the point to check it after? What the point to use it with kcalloc()? Please, do your homework, i.e. read the code which implements that.

I'll remove the "if (unlikely(check_mul_overflow()...) return -EINVAL" statement next patch.

I think I mis-understood your previous comment.
I thought I was asked to add check_mul_overflow() function for devm_kcalloc(...). Sorry for strange codes.

I should study devm_kcalloc() furthermore. Now I know devm_kcalloc(...) does multiplication overflow check for us. That's why we need to devm_kzalloc() with devm_kcalloc().

One question left in my mind is, in this case, even we have 10,000 pins, we will never get overflow. It looks not so necessary.

Quoted 5 lines

...

Quoted 1 line

+ struct device_node *np = of_node_get(pdev->dev.of_node);

What's the role of of_node_get()?

I'll remove the unused codes.
I think it was used to check if OF node exists.

Quoted 5 lines

...

Quoted 1 line

+ /* Initialize pctl_desc */

Useless. Drop all useless comments like this from the code.

I'll remove all this kind of comments.

Quoted 5 lines

...

Quoted 1 line

+ dev_info(&pdev->dev, "SP7021 PinCtrl by Sunplus/Tibbo Tech.");

Is it useful?

I think yes. It tells users that Pinctrl driver has probed successfully. If no this message, users don't know if Pinctrl driver has probed successfully or not. For example, because that dts node of pinctrl is "disabled" or Pinctrl driver is even not enabled.

Can I keep this?

Quoted 8 lines

...

Quoted 5 lines
drivers/pinctrl/sunplus/sppctl.h new file +5 -0
+#ifndef __SPPCTL_H__
+#define __SPPCTL_H__
+
+#include <linux/bits.h>
+#include <linux/gpio/driver.h>
Quoted 5 lines

drivers/pinctrl/sunplus/sppctl.h line 14

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.h new file +3 -0
+#include <linux/kernel.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/spinlock.h>

types.h is missed.

I'll add the header file next patch.

Quoted 5 lines

...

Quoted 1 line

+/** enum mux_first_reg - define modes of FIRST register accesses

Fix the multi-line comment style. You mentioned you fixed, but seems not (not in all places).

I'll fix it.

Sorry for my mistake.
I modified multi-line comments for all.
Later, I added more comments. But I
forgot to switch back from network mode.

Quoted 11 lines
Quoted 9 lines
+ *    - mux_f_mux:  Select the pin to a fully-pinmux pin
+ *    - mux_f_gpio: Select the pin to a GPIO or IOP pin
+ *    - mux_f_keep: Don't change (keep intact)

+ */

drivers/pinctrl/sunplus/sppctl.h new file +5 -0
+enum mux_first_reg {
+       mux_f_mux = 0,          /* select fully-pinmux       */
+       mux_f_gpio = 1,         /* select GPIO or IOP pinmux */
+       mux_f_keep = 2,         /* keep no change            */
+};
Quoted 9 lines

drivers/pinctrl/sunplus/sppctl.h line 106

Quoted 7 lines
drivers/pinctrl/sunplus/sppctl.h new file +7 -0
+struct sppctl_gpio_chip {
+       void __iomem *gpioxt_base;      /* MASTER, OE, OUT, IN, I_INV, O_INV, OD */
+       void __iomem *first_base;       /* GPIO_FIRST                            */
+
+       struct gpio_chip chip;
+       spinlock_t lock;                /* lock for accessing OE register        */
+};

Why is this in the header?

Do you mean I need to move this "struct sppctl_gpio_chip { ... }" declaration to c file because it is only used by the c file?

Quoted 7 lines

...

Quoted 3 lines

+/* SP7021 Pin Controller Driver.
+ * Copyright (C) Sunplus Tech / Tibbo Tech.
+ */

Multi-line comments.

I'll fix it.
Sorry for mistake. I overlooked the file header.

Quoted 1 line

I stopped here, please read my comments for previous versions and here and try your best.

I read all your comments many times.
I'll do my best to address all comments.
Sorry for mis-understand some comments.

Your previous comments:

Quoted 11 lines
Quoted 9 lines
Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node *np_config,
+                                struct pinctrl_map **map, unsigned 
+int *num_maps) {

Looking into this rather quite big function why you can't use what pin control core provides?

No, we cannot use functions pin-control core provides.
Please refer to dt-bindings document, "pinctrl/sunplus,sp7021-pinctrl.yaml". We have more explanation there.

Fine, can you reuse some library functions, etc? Please, consider refactoring to make it more readable.

Could you please share me your idea about "refactoring"? Or could you give me some hints?
I think many times, but have no idea about refactoring.

Quoted 3 lines

--
With Best Regards,
Andy Shevchenko

#10 lore raw

Re: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

On Tue, Dec 28, 2021 at 5:38 PM Wells Lu 呂芳騰 <[email protected]> wrote:

...

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

...

Quoted 12 lines
Quoted 11 lines

drivers/pinctrl/sunplus/sppctl.c

Quoted 8 lines
drivers/pinctrl/sunplus/sppctl.c new file +8 -0
+               /*
+                * Upper 16-bit word is mask. Lower 16-bit word is value.
+                * Refer to descriptions of function sppctl_master_get().
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+               reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) |
+ BIT(bit_off);

As I commented above use helper function which takes offset as input and returns you reg and reg_off.

Quoted 6 lines

I'll modify code as shown below:

                reg = SPPCTL_SET_MOON_REG_BIT(bit_off);

Sorry, I don't understand your meaning "returns you reg and reg_off". The helper macro will return reg but not reg_off, right?

Something like (fix types accordingly to your needs):

static inline u32 sppctl_get_reg_and_offset(unsigned int offset, u32 *roff)

{
              u32 boff = offset % 16;
              *roff = (offset / 16) * 4;

               return  MY_COOL_MACRO(boff); // BIT(boff +

SPPCTL_GPIO_MASK_SHIFT) | BIT(boff)
}

    reg = sppctl_get_reg_and_offset(offset, &reg_off);

...

Quoted 9 lines
Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+       if (!of_find_property(pdev->dev.of_node, "gpio-controller", NULL))
+               return dev_err_probe(&pdev->dev, -EINVAL, "Not a
+ gpio-controller!\n");

Why do you need this check for?

By referring to other pinctrl driver, we check if property "gpio-controller" exists? Will core help us check this?
Is this redundant?

You should answer this question, not me.

...

Quoted 3 lines

Should I also remove the assignment:

                gchip->base             = 0;

Actually this is a good catch. Why do you use 0 as a base? In the new code we are supposed to have -1 to be assigned.

...

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

+ case pinmux_type_fpmx: /* fully-pinmux */

Why do you need these comments?
Shouldn't you rather to kernel doc your enum entries?

I'll remove the comments.
Could you please tell me where I should write and put my kernel doc? Is there any examples I can refer to?

In the enum definition you do something like this (and read documentation):

/**
* enum ...
* @pinmux_type_fpmx: fully pin muxing
* @pinmux_type_grp: group pin muxing
* ...
*/

...

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       if (unlikely(check_mul_overflow(sppctl->unq_grps_sz + 1,
+                                       sizeof(*sppctl->g2fp_maps), &prod)))
+               return -EINVAL;
Quoted 8 lines
Quoted 2 lines

What the point to check it after? What the point to use it with kcalloc()? Please, do your homework, i.e. read the code which implements that.

I'll remove the "if (unlikely(check_mul_overflow()...) return -EINVAL" statement next patch.

I think I mis-understood your previous comment.
I thought I was asked to add check_mul_overflow() function for devm_kcalloc(...). Sorry for strange codes.

There were basically two iterative comments, i.e.
first one suggested adding a check, but second one suggested switching to kcalloc() API.

Quoted 6 lines

I should study devm_kcalloc() furthermore. Now I know devm_kcalloc(...) does multiplication overflow check for us. That's why we need to devm_kzalloc() with devm_kcalloc().

One question left in my mind is, in this case, even we have 10,000 pins, we will never get overflow. It looks not so necessary.

But it's not your issue, the kcalloc() does it for you for the good sake.

...

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

+ struct device_node *np = of_node_get(pdev->dev.of_node);

What's the role of of_node_get()?

I'll remove the unused codes.
I think it was used to check if OF node exists.

And if it doesn't, what is the difference?

You are the author of this code, please be prepared to explain every line in it.

...

Quoted 10 lines
Quoted 3 lines
Quoted 1 line

+ dev_info(&pdev->dev, "SP7021 PinCtrl by Sunplus/Tibbo Tech.");

Is it useful?

I think yes. It tells users that Pinctrl driver has probed successfully. If no this message, users don't know if Pinctrl driver has probed successfully or not. For example, because that dts node of pinctrl is "disabled" or Pinctrl driver is even not enabled.

Can I keep this?

You can, but I think it's not needed.
Users may easily get this from other sources. Why do you need to have such noise in the valuable resource, i.e. kernel message buffer?

...

Quoted 7 lines
Quoted 7 lines

drivers/pinctrl/sunplus/sppctl.h line 72

Quoted 7 lines
+ *    - mux_f_mux:  Select the pin to a fully-pinmux pin
+ *    - mux_f_gpio: Select the pin to a GPIO or IOP pin
+ *    - mux_f_keep: Don't change (keep intact)
drivers/pinctrl/sunplus/sppctl.h new file +3 -0
+       mux_f_mux = 0,          /* select fully-pinmux       */
+       mux_f_gpio = 1,         /* select GPIO or IOP pinmux */
+       mux_f_keep = 2,         /* keep no change            */

These comments are replaced by the kernel doc above, no need to keep them.

...

Quoted 4 lines
Quoted 1 line

Why is this in the header?

Do you mean I need to move this "struct sppctl_gpio_chip { ... }" declaration to c file because it is only used by the c file?

Yes.

...

Quoted 11 lines

Your previous comments:

Quoted 10 lines
Quoted 9 lines
Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node *np_config,
+                                struct pinctrl_map **map, unsigned
+int *num_maps) {

Looking into this rather quite big function why you can't use what pin control core provides?

No, we cannot use functions pin-control core provides.
Please refer to dt-bindings document, "pinctrl/sunplus,sp7021-pinctrl.yaml". We have more explanation there.

Quoted 5 lines
Quoted 1 line

Fine, can you reuse some library functions, etc? Please, consider refactoring to make it more readable.

Could you please share me your idea about "refactoring"? Or could you give me some hints?
I think many times, but have no idea about refactoring.

Just split it to a few logical parts so that code can be easier to read.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#11 lore raw

RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Quoted 6 lines

...

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Quoted 7 lines
Quoted 5 lines

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

I am puzzled because I think I have answered "why".

Because Pinctrl driver is necessary for all SP7021-based platforms. Pinctrl driver is always built into kernel, never be built as module. We use "bool" and select "y" for all platforms. No need "tristate".

"bool" means you can select "Y" for built in kernel or "N" not built. "tristate" means besides "Y" and "N", you can also select "M" to build as module which can be loaded or unloaded manually.

Sorry, I really don't know what more I can answer. Could you please give me some hits?

Quoted 28 lines

...

Quoted 12 lines
Quoted 11 lines

drivers/pinctrl/sunplus/sppctl.c

Quoted 8 lines
drivers/pinctrl/sunplus/sppctl.c new file +8 -0
+               /*
+                * Upper 16-bit word is mask. Lower 16-bit word is value.
+                * Refer to descriptions of function sppctl_master_get().
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+               reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) |
+ BIT(bit_off);

As I commented above use helper function which takes offset as input and returns you reg and reg_off.

Quoted 6 lines

I'll modify code as shown below:

                reg = SPPCTL_SET_MOON_REG_BIT(bit_off);

Sorry, I don't understand your meaning "returns you reg and reg_off". The helper macro will return reg but not reg_off, right?

Something like (fix types accordingly to your needs):

static inline u32 sppctl_get_reg_and_offset(unsigned int offset, u32 *roff) {
              u32 boff = offset % 16;
              *roff = (offset / 16) * 4;

               return  MY_COOL_MACRO(boff); // BIT(boff +
Quoted 4 lines

SPPCTL_GPIO_MASK_SHIFT) | BIT(boff)
}

    reg = sppctl_get_reg_and_offset(offset, &reg_off);

Thanks for sharing the code.
I'll add the inline function.

Quoted 6 lines

...

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
(quoted diff) +3 -0
+       if (!of_find_property(pdev->dev.of_node, "gpio-controller", NULL))
+               return dev_err_probe(&pdev->dev, -EINVAL, "Not a
+ gpio-controller!\n");
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Why do you need this check for?

By referring to other pinctrl driver, we check if property "gpio-controller" exists? Will core help us check this?
Is this redundant?

You should answer this question, not me.

I'll remove the statements.
Only need to check if "gpio-controller" exists or not for child nodes.

Quoted 8 lines

...

Quoted 3 lines

Should I also remove the assignment:

                gchip->base             = 0;

Actually this is a good catch. Why do you use 0 as a base? In the new code we are supposed to have -1 to be assigned.

I'll modify the statement to:

	gchip->base		= -1;

to "request dynamic ID allocation".

And I'll remove the statement:

	pctl->pctl_grange.base = gchip->base;

because the whole structure (*pctl) is initialized to zero already.

Quoted 11 lines

...

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

+ case pinmux_type_fpmx: /* fully-pinmux */

Why do you need these comments?
Shouldn't you rather to kernel doc your enum entries?

I'll remove the comments.
Could you please tell me where I should write and put my kernel doc? Is there any examples I can refer to?

Quoted 8 lines

In the enum definition you do something like this (and read documentation):

/**
* enum ...
* @pinmux_type_fpmx: fully pin muxing
* @pinmux_type_grp: group pin muxing
* ...
*/

I see, thanks!

I searched and found the article "Writing kernel-doc comment" in:
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html

I thought kernel-doc is a document put in folder Documentation/. Now I know they are comments prefixed with /** and embedded in sources.

Quoted 33 lines

...

Quoted 8 lines
Quoted 6 lines

drivers/pinctrl/sunplus/sppctl.c line 1050

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       if (unlikely(check_mul_overflow(sppctl->unq_grps_sz + 1,
+                                       sizeof(*sppctl->g2fp_maps), &prod)))
+               return -EINVAL;

What the point to check it after? What the point to use it with kcalloc()? Please, do your homework, i.e. read the code which implements that.

I'll remove the "if (unlikely(check_mul_overflow()...) return -EINVAL" statement

next patch.

Quoted 4 lines

I think I mis-understood your previous comment.
I thought I was asked to add check_mul_overflow() function for devm_kcalloc(...). Sorry for strange codes.

There were basically two iterative comments, i.e.
first one suggested adding a check, but second one suggested switching to kcalloc() API.

Quoted 6 lines

I should study devm_kcalloc() furthermore. Now I know devm_kcalloc(...) does multiplication overflow check for us. That's why we need to replace devm_kzalloc() with devm_kcalloc().

One question left in my mind is, in this case, even we have 10,000 pins, we will never get overflow. It looks not so necessary.

But it's not your issue, the kcalloc() does it for you for the good sake.

...

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

+ struct device_node *np = of_node_get(pdev->dev.of_node);

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

What's the role of of_node_get()?

I'll remove the unused codes.
I think it was used to check if OF node exists.

And if it doesn't, what is the difference?

You are the author of this code, please be prepared to explain every line in it.

From kernel-doc comment, of_node_get() increments refcount of a node. I think as a platform driver, we don't need to check if the node exists or not. If not exist, platform driver will not be probed.

Quoted 12 lines

...

Quoted 10 lines
Quoted 4 lines
Quoted 2 lines

+ dev_info(&pdev->dev, "SP7021 PinCtrl by Sunplus/Tibbo
+ Tech.");

Is it useful?

I think yes. It tells users that Pinctrl driver has probed successfully. If no this message, users don't know if Pinctrl driver has probed successfully or not. For example, because that dts node of pinctrl is "disabled" or Pinctrl driver is even not enabled.

Quoted 5 lines
Quoted 1 line

Can I keep this?

You can, but I think it's not needed.
Users may easily get this from other sources. Why do you need to have such noise in the valuable resource, i.e. kernel message buffer?

I'll remove the dev_info() next patch.

Quoted 11 lines

...

Quoted 7 lines
Quoted 7 lines

drivers/pinctrl/sunplus/sppctl.h line 72

Quoted 7 lines
+ *    - mux_f_mux:  Select the pin to a fully-pinmux pin
+ *    - mux_f_gpio: Select the pin to a GPIO or IOP pin
+ *    - mux_f_keep: Don't change (keep intact)
drivers/pinctrl/sunplus/sppctl.h new file +3 -0
+       mux_f_mux = 0,          /* select fully-pinmux       */
+       mux_f_gpio = 1,         /* select GPIO or IOP pinmux */
+       mux_f_keep = 2,         /* keep no change            */

These comments are replaced by the kernel doc above, no need to keep them.

I'll remove them next patch.

Quoted 8 lines

...

Quoted 4 lines
Quoted 1 line

Why is this in the header?

Do you mean I need to move this "struct sppctl_gpio_chip { ... }" declaration to c file because it is only used by the c file?

Yes.

But "struct sppctl_gpio_chip" is not only used in c file, but also used in the same header file just beneath it. Refer to code below:

struct sppctl_gpio_chip {
	:
	:
};
struct sppctl_pdata {
	:
	:
	struct sppctl_gpio_chip *spp_gchip;
	:
	:
};
Quoted 15 lines

...

Quoted 2 lines

Your previous comments:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct

device_node *np_config,

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+                                struct pinctrl_map **map,
+unsigned int *num_maps) {

Looking into this rather quite big function why you can't use what pin control

core provides?

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

No, we cannot use functions pin-control core provides.
Please refer to dt-bindings document, "pinctrl/sunplus,sp7021-pinctrl.yaml". We have more explanation there.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

Fine, can you reuse some library functions, etc? Please, consider refactoring to

make it more readable.

Quoted 4 lines

Could you please share me your idea about "refactoring"? Or could you give me some hints?
I think many times, but have no idea about refactoring.

Just split it to a few logical parts so that code can be easier to read.

I see. I'll do it, thanks.

Quoted 3 lines

--
With Best Regards,
Andy Shevchenko

Thanks,
Wells Lu

#12 lore raw

Re: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

On Thu, Jan 13, 2022 at 7:04 PM Wells Lu 呂芳騰 <[email protected]> wrote:

...

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

I am puzzled because I think I have answered "why".

Nope. :-)

Quoted 1 line

Because Pinctrl driver is necessary for all SP7021-based platforms.

"Why?" Why is it necessary (to be built-in)?

...

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

+ struct device_node *np = of_node_get(pdev->dev.of_node);

What's the role of of_node_get()?

I'll remove the unused codes.
I think it was used to check if OF node exists.

Quoted 7 lines
Quoted 3 lines

And if it doesn't, what is the difference?

You are the author of this code, please be prepared to explain every line in it.

From kernel-doc comment, of_node_get() increments refcount of a node. I think as a platform driver, we don't need to check if the node exists or not. If not exist, platform driver will not be probed.

Right!

...

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Why is this in the header?

Do you mean I need to move this "struct sppctl_gpio_chip { ... }" declaration to c file because it is only used by the c file?

Yes.

But "struct sppctl_gpio_chip" is not only used in c file, but also used in the same header file just beneath it. Refer to code below:

Thanks for the snippet. It actually shows the opposite. No, below is the user of the _pointer_ to the struct of that type. You may easily use the "opaque pointer" approach. I.o.w. my comment stays.

Quoted 12 lines
struct sppctl_gpio_chip {
        :
        :
};
struct sppctl_pdata {
        :
        :
        struct sppctl_gpio_chip *spp_gchip;
        :
        :
};
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#13 lore raw

RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

Quoted 7 lines
Quoted 1 line

I am puzzled because I think I have answered "why".

Nope. :-)

Quoted 1 line

Because Pinctrl driver is necessary for all SP7021-based platforms.

"Why?" Why is it necessary (to be built-in)?

Pinctrl is necessary to be built-in because drivers of boot-device, like eMMC, SD card, NAND flash, and NOR flash drivers, need it.

SP7021 supports booting from eMMC, SD card, NAND flash and NOR flash devices. Their drivers need Pinctrl driver probes in advance.

Quoted 27 lines

...

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

+ struct device_node *np =
+ of_node_get(pdev->dev.of_node);

What's the role of of_node_get()?

I'll remove the unused codes.
I think it was used to check if OF node exists.

Quoted 7 lines
Quoted 3 lines

And if it doesn't, what is the difference?

You are the author of this code, please be prepared to explain every line in it.

From kernel-doc comment, of_node_get() increments refcount of a node. I think as a platform driver, we don't need to check if the node exists or not. If not exist, platform driver will not be probed.

Right!

...

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Why is this in the header?

Do you mean I need to move this "struct sppctl_gpio_chip { ... }" declaration to c file because it is only used by the c file?

Quoted 21 lines
Quoted 4 lines
Quoted 1 line

Yes.

But "struct sppctl_gpio_chip" is not only used in c file, but also used in the same header file just beneath it. Refer to code below:

Thanks for the snippet. It actually shows the opposite. No, below is the user of the _pointer_ to the struct of that type. You may easily use the "opaque pointer" approach. I.o.w. my comment stays.

Quoted 12 lines
struct sppctl_gpio_chip {
        :
        :
};
struct sppctl_pdata {
        :
        :
        struct sppctl_gpio_chip *spp_gchip;
        :
        :
};

I see!
I'll move struct sppctl_gpio_chip {...} to c file next patch.

Quoted 3 lines

--
With Best Regards,
Andy Shevchenko

Thanks,
Wells Lu

#14 lore raw

Re: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

On Fri, Jan 14, 2022 at 4:51 AM Wells Lu 呂芳騰 <[email protected]> wrote:

...

Quoted 18 lines
Quoted 18 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

I am puzzled because I think I have answered "why".

Nope. :-)

Quoted 1 line

Because Pinctrl driver is necessary for all SP7021-based platforms.

Quoted 7 lines
Quoted 1 line

"Why?" Why is it necessary (to be built-in)?

Pinctrl is necessary to be built-in because drivers of boot-device, like eMMC, SD card, NAND flash, and NOR flash drivers, need it.

SP7021 supports booting from eMMC, SD card, NAND flash and NOR flash devices. Their drivers need Pinctrl driver probes in advance.

On x86 platforms, for example, booting from eMMC and SD card does not require a pin control driver to be built-in. Why is this requirement for SP platforms?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#15 lore raw

RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Quoted 28 lines

...

Quoted 18 lines
Quoted 18 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

I am puzzled because I think I have answered "why".

Nope. :-)

Quoted 1 line

Because Pinctrl driver is necessary for all SP7021-based platforms.

Quoted 7 lines
Quoted 1 line

"Why?" Why is it necessary (to be built-in)?

Pinctrl is necessary to be built-in because drivers of boot-device, like eMMC, SD card, NAND flash, and NOR flash drivers, need it.

SP7021 supports booting from eMMC, SD card, NAND flash and NOR flash devices. Their drivers need Pinctrl driver probes in advance.

Quoted 6 lines

On x86 platforms, for example, booting from eMMC and SD card does not require a pin control driver to be built-in. Why is this requirement for SP platforms?

--
With Best Regards,
Andy Shevchenko

Because all pins of boot-device multiplex with GPIO pins.

SP7021 platforms support multi boot devices, including eMMC, SD card, SPI-NOR flash, SPI-NAND flash. Each boot device has control-bit(s) to enable it.

For example #1, if control-bits of SPI-NOR flash is set 1, GPIO 83, 84, 86, 87 are connected to SPI-NOR flash. If control-bits of SPI-NOR flash is set 2,
GPIO 76, 78, 79, 81 are connected to SPI-NOR flash. If control-bits of SPI-NOR flash is set 0, no pin is connected SPI-NOR flash.

For example #2, if control-bits of eMMC device is set 1, GPIO 72, 73, 74, 75, 76, 77, 78, 79, 80, 81 are connected to eMMC device.
If control-bits of eMMC device is set 0, no pin is connected eMMC device.

For example #3, if control-bits of SDCard device is set 1, GPIO 65, 66, 67, 68, 69, 70 are connected to SD Card device. If control-bits of SDCard device is set 0, no pin is connected SDCard device.

Note that all pins multiplex with GPIO pins.

Normally, only a boot-device is enabled. All other GPIO pins are released for peripherals (controlled by fully-pinmux Or group pinmux) or IO processor

Pinctrl driver is responsible for setup the pins. If Pinctrl fails to probe, boot-device also fails to probe.

Best regards,
Wells Lu

#16 lore raw

Re: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

On Fri, Jan 14, 2022 at 12:55 PM Wells Lu 呂芳騰 <[email protected]> wrote:

...

Quoted 53 lines
Quoted 20 lines
Quoted 20 lines
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

I am puzzled because I think I have answered "why".

Nope. :-)

Quoted 1 line

Because Pinctrl driver is necessary for all SP7021-based platforms.

"Why?" Why is it necessary (to be built-in)?

Quoted 8 lines
Quoted 5 lines

Pinctrl is necessary to be built-in because drivers of boot-device, like eMMC, SD card, NAND flash, and NOR flash drivers, need it.

SP7021 supports booting from eMMC, SD card, NAND flash and NOR flash devices. Their drivers need Pinctrl driver probes in advance.

On x86 platforms, for example, booting from eMMC and SD card does not require a pin control driver to be built-in. Why is this requirement for SP platforms?

Because all pins of boot-device multiplex with GPIO pins.

SP7021 platforms support multi boot devices, including eMMC, SD card, SPI-NOR flash, SPI-NAND flash. Each boot device has control-bit(s) to enable it.

For example #1, if control-bits of SPI-NOR flash is set 1, GPIO 83, 84, 86, 87 are connected to SPI-NOR flash. If control-bits of SPI-NOR flash is set 2,
GPIO 76, 78, 79, 81 are connected to SPI-NOR flash. If control-bits of SPI-NOR flash is set 0, no pin is connected SPI-NOR flash.

For example #2, if control-bits of eMMC device is set 1, GPIO 72, 73, 74, 75, 76, 77, 78, 79, 80, 81 are connected to eMMC device.
If control-bits of eMMC device is set 0, no pin is connected eMMC device.

For example #3, if control-bits of SDCard device is set 1, GPIO 65, 66, 67, 68, 69, 70 are connected to SD Card device. If control-bits of SDCard device is set 0, no pin is connected SDCard device.

Quoted 5 lines

Note that all pins multiplex with GPIO pins.

Normally, only a boot-device is enabled. All other GPIO pins are released for peripherals (controlled by fully-pinmux Or group pinmux) or IO processor

Thanks for this detailed picture of the HW configuration.

Quoted 2 lines

Pinctrl driver is responsible for setup the pins. If Pinctrl fails to probe, boot-device also fails to probe.

But have you tried to compile it as a module and supply it in the initramfs?

What kernel does in this case it takes address of initramfs from memory (I believe you have bootloader that capable to setup kernel, initramfs, command line, and device
tree blob and pass the control to the kernel) at some point, mounts it and probes the modules that are required to get your boot device ready.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#17 lore raw

RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Quoted 68 lines

...

Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

+ bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Should we set it to tristate?

You still haven't answered "why", so I can't tell you.

I am puzzled because I think I have answered "why".

Nope. :-)

Quoted 1 line

Because Pinctrl driver is necessary for all SP7021-based platforms.

"Why?" Why is it necessary (to be built-in)?

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

Pinctrl is necessary to be built-in because drivers of boot-device, like eMMC, SD card, NAND flash, and NOR flash drivers, need it.

SP7021 supports booting from eMMC, SD card, NAND flash and NOR flash devices. Their drivers need Pinctrl driver probes in advance.

On x86 platforms, for example, booting from eMMC and SD card does not require a pin control driver to be built-in. Why is this requirement for SP

platforms?

Quoted 23 lines

Because all pins of boot-device multiplex with GPIO pins.

SP7021 platforms support multi boot devices, including eMMC, SD card, SPI-NOR flash, SPI-NAND flash. Each boot device has control-bit(s) to enable it.

For example #1, if control-bits of SPI-NOR flash is set 1, GPIO 83, 84, 86, 87 are connected to SPI-NOR flash.
If control-bits of SPI-NOR flash is set 2, GPIO 76, 78, 79, 81 are connected to SPI-NOR flash.
If control-bits of SPI-NOR flash is set 0, no pin is connected SPI-NOR flash.

For example #2, if control-bits of eMMC device is set 1, GPIO 72, 73, 74, 75, 76, 77, 78, 79, 80, 81 are connected to eMMC device. If control-bits of eMMC device is set 0, no pin is connected eMMC device.

For example #3, if control-bits of SDCard device is set 1, GPIO 65, 66, 67, 68, 69, 70 are connected to SD Card device.
If control-bits of SDCard device is set 0, no pin is connected SDCard device.

Quoted 5 lines

Note that all pins multiplex with GPIO pins.

Normally, only a boot-device is enabled. All other GPIO pins are released for peripherals (controlled by fully-pinmux Or group pinmux) or IO processor

Thanks for this detailed picture of the HW configuration.

Quoted 2 lines

Pinctrl driver is responsible for setup the pins. If Pinctrl fails to probe, boot-device also fails to probe.

But have you tried to compile it as a module and supply it in the initramfs?

Quoted 8 lines

What kernel does in this case it takes address of initramfs from memory (I believe you have bootloader that capable to setup kernel, initramfs, command line, and device tree blob and pass the control to the kernel) at some point, mounts it and probes the modules that are required to get your boot device ready.

--
With Best Regards,
Andy Shevchenko

Yes, I'll modify Kconfig and Makefile to support "compile as module".

Actually, SP7021 platforms also support booting from tftp and nfs server. In these two cases, no boot device is enabled in Linux kernel (but boot device is enabled in U-Boot). Pinctrl driver can be a module.

Thanks,
Wells Lu

#18 lore raw

RE: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

In reply to Andy Shevchenko

Hi Andy,

Could you please answer my questions in previous mail? I need your answers to proceed submission.

Sorry, I am not sure if my previous mail is lost or you are busy.

Best regards,

Wells Lu

Smart Computing Program
Home Entertainment Business Unit
Sunplus Technology Co., Ltd.
19, Innovation 1st Road,
Science-based Industrial Park
Hsin-Chu, Taiwan 300
TEL:886-3-5786005 ext. 2580

Quoted 791 lines

Hi Andy,

Thanks a lot for your review.

Please see my answers below:

Quoted 11 lines
Quoted 2 lines

Add driver for Sunplus SP7021 SoC.

Thanks for an update, my comments below.

...

drivers/pinctrl/sunplus/Kconfig line 7

Quoted 2 lines
drivers/pinctrl/sunplus/Kconfig new file +2 -0
+config PINCTRL_SPPCTL
+       bool "Sunplus SP7021 PinMux and GPIO driver"

Why bool and not tristate?

Pinctrl driver is selected by many drivers in SP7021 platform. We never build it as a module, but build-in to kernel. So we use "bool".

Should we set it to tristate?

Quoted 15 lines
Quoted 3 lines
drivers/pinctrl/sunplus/Kconfig new file +2 -0
+       depends on SOC_SP7021
+       depends on OF && HAS_IOMEM

...

drivers/pinctrl/sunplus/sppctl.c

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +5 -0
+#include <linux/of.h>
+#include <linux/of_device.h>
 
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinconf-generic.h> #include
+<linux/pinctrl/pinmux.h>

Can you move this group...

Quoted 5 lines

drivers/pinctrl/sunplus/sppctl.c line 21

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>

...to be somewhere here?

Yes, I'll move it next patch.

Quoted 7 lines
Quoted 1 line

+#include <dt-bindings/pinctrl/sppctl-sp7021.h>

...

Quoted 1 line

+/* inline functions */

Useless.

I'll remove all this kind of comments next patch.

Quoted 9 lines

...

drivers/pinctrl/sunplus/sppctl.c line 186

Quoted 2 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       mask = GENMASK(bit_sz - 1, 0) << (bit_off + SPPCTL_GROUP_PINMUX_MASK_SHIFT);
+       reg = mask | (val << bit_off);

Now you may do one step forward:

       mask = GENMASK(bit_sz - 1, 0) << SPPCTL_GROUP_PINMUX_MASK_SHIFT;
       reg = (val | mask) << bit_off;

I'll revise these statements as code you've shared.

Quoted 21 lines

...

Quoted 18 lines
drivers/pinctrl/sunplus/sppctl.c new file +18 -0
+static void sppctl_first_master_set(struct gpio_chip *chip, unsigned int offset,
+                                   enum mux_first_reg first, enum
+mux_master_reg master) {
+       struct sppctl_gpio_chip *spp_gchip = gpiochip_get_data(chip);
+       u32 reg_off, bit_off, reg;
+       int val;
+
+       /* FIRST register */
+       if (first != mux_f_keep) {
+               /*
+                * Refer to descriptions of function sppctl_first_get()
+                * for usage of FIRST registers.
+                */
+               reg_off = (offset / 32) * 4;
+               bit_off = offset % 32;
+
+               reg = sppctl_first_readl(spp_gchip, reg_off);
+               val = (reg & BIT(bit_off)) ? 1 : 0;
Quoted 3 lines
Quoted 1 line

+ if (first != val) {

first is enum, val is int, are you sure it's good to compare like this?

No, it is always not good to compare different type of things. I'll modify code as shown below:

	enum mux_first_reg val;
		:
		:
	val = (reg & BIT(bit_off)) ? mux_f_gpio : mux_f_mux;
Quoted 7 lines

drivers/pinctrl/sunplus/sppctl.c line 278

Quoted 4 lines
drivers/pinctrl/sunplus/sppctl.c new file +4 -0
+                       if (first == mux_f_gpio)
+                               reg |= BIT(bit_off);
+                       else
+                               reg &= ~BIT(bit_off);

Since you operate against enums it's better to use switch-case.

I'll modify code as shown below:

			if (first != val)
				switch (first) {
				case mux_f_gpio:
					reg |= BIT(bit_off);
					sppctl_first_writel(spp_gchip, reg, reg_off);
					break;

				case mux_f_mux:
					reg &= ~BIT(bit_off);
					sppctl_first_writel(spp_gchip, reg, reg_off);
					break;

				case mux_f_keep:
					break;
				}
Quoted 22 lines
Quoted 19 lines
drivers/pinctrl/sunplus/sppctl.c new file +19 -0
+                       sppctl_first_writel(spp_gchip, reg, reg_off);
+               }
+       }
+
+       /* MASTER register */
+       if (master != mux_m_keep) {
+               /*
+                * Refer to descriptions of function sppctl_master_get()
+                * for usage of MASTER registers.
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+
+               reg = BIT(bit_off) << SPPCTL_MASTER_MASK_SHIFT;
+               if (master == mux_m_gpio)
+                       reg |= BIT(bit_off);
+               sppctl_gpio_master_writel(spp_gchip, reg, reg_off);
+       }
+}

...

Quoted 5 lines

drivers/pinctrl/sunplus/sppctl.c line 326

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +2 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);
 
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

Perhaps a macro with definitive name?

I'll define two new macros:

#define SPPCTL_MOON_REG_MASK_SHIFT 16
#define SPPCTL_SET_MOON_REG_BIT(bit) (BIT(bit + SPPCTL_MOON_REG_MASK_SHIFT) |
BIT(bit))
#define SPPCTL_CLR_MOON_REG_BIT(bit) BIT(bit + SPPCTL_MOON_REG_MASK_SHIFT)

And modify code as shown below:

			reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
Quoted 6 lines

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);
Quoted 6 lines

You can use it even here:

if (val)
reg = MY_MACRO(bit_off)
else
reg = BIT(...) // perhaps another macro

I'll modify code as shown below:

	if (val)
		reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
	else
		reg = SPPCTL_CLR_MOON_REG_BIT(bit_off);
Quoted 5 lines

...

Quoted 1 line

+ reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);

Ditto.

I'll modify code as shown below:

			reg = SPPCTL_CLR_MOON_REG_BIT(bit_off);
Quoted 5 lines

...

Quoted 1 line

+ reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) | BIT(bit_off);

Ditto.

I'll modify code as shown shown below:

			reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
Quoted 7 lines

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

Ditto.

I'll modify code as shown below:

	if (val)
		reg = SPPCTL_SET_MOON_REG_BIT(bit_off);
	else
		reg = SPPCTL_CLR_MOON_REG_BIT(bit_off);
Quoted 7 lines

...

drivers/pinctrl/sunplus/sppctl.c line 361

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.c new file +3 -0
+       reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT);
+       if (val)
+               reg |= BIT(bit_off);

Ditto.

I'll modify code as shown in above case.

Quoted 8 lines

And looking into repetition, you may even have a helper which does this conditional

static inline u32 sppctl_...()
{
...
return reg;
}

I'll add an inline function as shown below:

static inline u32 sppctl_prep_moon_reg(u32 bit_off, int val) {
	if (val)
		return SPPCTL_SET_MOON_REG_BIT(bit_off);
	else
		return SPPCTL_CLR_MOON_REG_BIT(bit_off); }

And replace all "if (val) ... " with the inline function.

Quoted 5 lines

...

Quoted 1 line

+ int ret = 0;

Redundant variable, return directly.

I'll remove the redundant variable.

Quoted 11 lines

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+       switch (param) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+               /*
+                * Upper 16-bit word is mask. Lower 16-bit word is value.
+                * Refer to descriptions of function sppctl_master_get().
+                */
+               reg_off = (offset / 16) * 4;
+               bit_off = offset % 16;
+               reg = BIT(bit_off + SPPCTL_GPIO_MASK_SHIFT) |
+ BIT(bit_off);
Quoted 2 lines

As I commented above use helper function which takes offset as input and returns you reg and reg_off.

I'll modify code as shown below:

		reg = SPPCTL_SET_MOON_REG_BIT(bit_off);

Sorry, I don't understand your meaning "returns you reg and reg_off". The helper macro will return reg but not reg_off, right?

Quoted 24 lines
Quoted 21 lines
drivers/pinctrl/sunplus/sppctl.c new file +21 -0
+               sppctl_gpio_od_writel(spp_gchip, reg, reg_off);
+               break;
+
+       case PIN_CONFIG_INPUT_ENABLE:
+               break;
+
+       case PIN_CONFIG_OUTPUT:
+               ret = sppctl_gpio_direction_output(chip, offset, 0);
+               break;
+
+       case PIN_CONFIG_PERSIST_STATE:
+               ret = -ENOTSUPP;
+               break;
+
+       default:
+               ret = -EINVAL;
+               break;
+       }
+
+       return ret;
+}

...

Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+       if (!of_find_property(pdev->dev.of_node, "gpio-controller", NULL))
+               return dev_err_probe(&pdev->dev, -EINVAL, "Not a
+ gpio-controller!\n");

Why do you need this check for?

By referring to other pinctrl driver, we check if property "gpio-controller" exists? Will core help us check this?
Is this redundant?

Quoted 5 lines

...

Quoted 1 line

+ gchip->can_sleep = 0;

Besides that it's already cleared, the type here is boolean.

I'll remove the unnecessary assignment as the whole structure is initialized to 0. Should I also remove the assignment:

		gchip->base 		= 0;
Quoted 5 lines

...

Quoted 1 line

+/* pinconf operations */

Any value of this comment?

I'll remove it.

Quoted 8 lines

drivers/pinctrl/sunplus/sppctl.c line 613

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +5 -0
+static int sppctl_pin_config_get(struct pinctrl_dev *pctldev, unsigned int pin,
+                                unsigned long *config) {
+       struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev);
+       unsigned int param = pinconf_to_config_param(*config);
 
+       unsigned int arg = 0;

Move assignment to where it actually makes sense.

I'll move it as shown below:

		case PIN_CONFIG_DRIVE_OPEN_DRAIN:
			if (!sppctl_gpio_output_od_get(&pctl->spp_gchip->chip, pin))
				return -EINVAL;
			arg = 0;
			break;
Quoted 26 lines
Quoted 23 lines
drivers/pinctrl/sunplus/sppctl.c new file +23 -0
+       switch (param) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+               if (!sppctl_gpio_output_od_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               break;
+
+       case PIN_CONFIG_OUTPUT:
+               if (!sppctl_first_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               if (!sppctl_master_get(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               if (sppctl_gpio_get_direction(&pctl->spp_gchip->chip, pin))
+                       return -EINVAL;
+               arg = sppctl_gpio_get(&pctl->spp_gchip->chip, pin);
+               break;
+
+       default:
+               return -EOPNOTSUPP;
+       }
+       *config = pinconf_to_config_packed(param, arg);
+
+       return 0;
+}

...

Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+       switch (f->type) {
+       case pinmux_type_fpmx:  /* fully-pinmux */

Why do you need these comments?
Shouldn't you rather to kernel doc your enum entries?

I'll remove the comments.
Could you please tell me where I should write and put my kernel doc? Is there any examples I can refer to?

Quoted 45 lines
Quoted 35 lines
drivers/pinctrl/sunplus/sppctl.c new file +33 -0
+               *num_groups = sppctl_pmux_list_sz;
+               *groups = sppctl_pmux_list_s;
+               break;
+
+       case pinmux_type_grp:   /* group-pinmux */
+               if (!f->grps)
+                       break;
+
+               *num_groups = f->gnum;
+               for (i = 0; i < pctl->unq_grps_sz; i++)
+                       if (pctl->g2fp_maps[i].f_idx == selector)
+                               break;
+               *groups = &pctl->unq_grps[i];
+               break;
 
+       }
 
+/** sppctl_fully_pinmux_conv - Convert GPIO# to fully-pinmux
+control-field setting
+ *
+ * Each fully-pinmux function can be mapped to any of GPIO 8 ~ 71
+by
+ * settings its control-field. Refer to following table:
+ *
+ * control-field |  GPIO
+ * --------------+--------
+ *        0      |  No map
+ *        1      |    8
+ *        2      |    9
+ *        3      |   10
+ *        :      |    :
+ *       65      |   71
+ */
+static inline int sppctl_fully_pinmux_conv(unsigned int offset) {
+       return (offset < 8) ? 0 : offset - 7; }

...

Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +6 -0
+static const struct pinmux_ops sppctl_pinmux_ops = {
+       .get_functions_count = sppctl_get_functions_count,
+       .get_function_name   = sppctl_get_function_name,
+       .get_function_groups = sppctl_get_function_groups,
+       .set_mux             = sppctl_set_mux,
+       .gpio_request_enable = sppctl_gpio_request_enable,
Quoted 3 lines
Quoted 1 line

+ .strict = true

+ Comma.

I'll add a comma right after 'true'.

Quoted 87 lines
Quoted 1 line

+};

...

Review

Quoted 2 lines
(quoted diff) +2 -0
+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev,
+struct device_node

*np_config,

Quoted 35 lines
drivers/pinctrl/sunplus/sppctl.c new file +35 -0
+                                struct pinctrl_map **map, unsigned
+int *num_maps) {
+       struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev);
+       int nmG = of_property_count_strings(np_config, "groups");
+       const struct sppctl_func *f = NULL;
+       u8 pin_num, pin_type, pin_func;
+       struct device_node *parent;
+       unsigned long *configs;
+       struct property *prop;
+       const char *s_f, *s_g;
+
+       const __be32 *list;
+       u32 dt_pin, dt_fun;
+       int i, size = 0;
+
+       list = of_get_property(np_config, "sunplus,pins", &size);
+
+       if (nmG <= 0)
+               nmG = 0;
+
+       parent = of_get_parent(np_config);
+       *num_maps = size / sizeof(*list);
+
+       /*
+        * Process property:
+        *     sunplus,pins = < u32 u32 u32 ... >;
+        *
+        * Each 32-bit integer defines a individual pin in which:
+        *
+        *   Bit 32~24: defines GPIO pin number. Its range is 0 ~ 98.
+        *   Bit 23~16: defines types: (1) fully-pinmux pins
+        *                             (2) IO processor pins
+        *                             (3) digital GPIO pins
+        *   Bit 15~8:  defines pins of peripherals (which are defined in
+        *              'include/dt-binging/pinctrl/sppctl.h').

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+        *   Bit 7~0:   defines types or initial-state of digital GPIO pins.
+        */
+       for (i = 0; i < (*num_maps); i++) {
+               dt_pin = be32_to_cpu(list[i]);
+               pin_num = FIELD_GET(GENMASK(31, 24), dt_pin);
+
+               /* Check if out of range? */
+               if (pin_num >= sppctl_pins_all_sz) {
+                       dev_err(pctldev->dev, "Invalid pin property
+ at index %d

(0x%08x)\n",

Quoted 9 lines
drivers/pinctrl/sunplus/sppctl.c new file +9 -0
+                               i, dt_pin);
+                       return -EINVAL;
+               }
+       }
+
+       *map = kcalloc(*num_maps + nmG, sizeof(**map), GFP_KERNEL);
+       for (i = 0; i < (*num_maps); i++) {
+               dt_pin = be32_to_cpu(list[i]);
+               pin_num = FIELD_GET(GENMASK(31, 24), dt_pin);

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+               pin_type = FIELD_GET(GENMASK(23, 16), dt_pin);
+               pin_func = FIELD_GET(GENMASK(15, 8), dt_pin);
+               (*map)[i].name = parent->name;
+
+               if (pin_type == SPPCTL_PCTL_G_GPIO) {
+                       /* A digital GPIO pin */
+                       (*map)[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
+                       (*map)[i].data.configs.num_configs = 1;
+                       (*map)[i].data.configs.group_or_pin =
+ pin_get_name(pctldev,

pin_num);

Quoted 4 lines
drivers/pinctrl/sunplus/sppctl.c new file +4 -0
+                       configs = kmalloc(sizeof(*configs), GFP_KERNEL);
+                       *configs = FIELD_GET(GENMASK(7, 0), dt_pin);
+                       (*map)[i].data.configs.configs = configs;
+

drivers/pinctrl/sunplus/sppctl.c

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+                       dev_dbg(pctldev->dev, "%s: GPIO (%s)\n",
+                               (*map)[i].data.configs.group_or_pin,
+                               (*configs & (SPPCTL_PCTL_L_OUT | SPPCTL_PCTL_L_OU1)) ?
+                               "OUT" : "IN");
+               } else if (pin_type == SPPCTL_PCTL_G_IOPP) {
+                       /* A IO Processor (IOP) pin */
+                       (*map)[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
+                       (*map)[i].data.configs.num_configs = 1;
+                       (*map)[i].data.configs.group_or_pin =
+ pin_get_name(pctldev,
Quoted 11 lines

pin_num);

Quoted 10 lines
drivers/pinctrl/sunplus/sppctl.c new file +10 -0
+                       configs = kmalloc(sizeof(*configs), GFP_KERNEL);
+                       *configs = SPPCTL_IOP_CONFIGS;
+                       (*map)[i].data.configs.configs = configs;
+
+                       dev_dbg(pctldev->dev, "%s: IOP\n",
+                               (*map)[i].data.configs.group_or_pin);
+               } else {
+                       /* A fully-pinmux pin */
+                       (*map)[i].type = PIN_MAP_TYPE_MUX_GROUP;
+                       (*map)[i].data.mux.function =

sppctl_list_funcs[pin_func].name;

Quoted 6 lines
Quoted 6 lines
drivers/pinctrl/sunplus/sppctl.c new file +6 -0
+                       (*map)[i].data.mux.group =
+ pin_get_name(pctldev, pin_num);
+
+                       dev_dbg(pctldev->dev, "%s: %s\n", (*map)[i].data.mux.group,
+                               (*map)[i].data.mux.function);
+               }
Quoted 8 lines

drivers/pinctrl/sunplus/sppctl.c

Quoted 8 lines
drivers/pinctrl/sunplus/sppctl.c new file +8 -0
+       }
+
+       /*
+        * Process properties:
+        *     function = "xxx";
+        *     groups = "yyy";
+        */
+       if (nmG > 0 && of_property_read_string(np_config, "function", &s_f) == 0)

{

Quoted 64 lines
Quoted 48 lines
drivers/pinctrl/sunplus/sppctl.c new file +48 -0
+               of_property_for_each_string(np_config, "groups", prop, s_g) {
+                       (*map)[*num_maps].type = PIN_MAP_TYPE_MUX_GROUP;
+                       (*map)[*num_maps].data.mux.function = s_f;
+                       (*map)[*num_maps].data.mux.group = s_g;
+                       (*num_maps)++;
+
+                       dev_dbg(pctldev->dev, "%s: %s\n", s_f, s_g);
+               }
+       }
+
+       /*
+        * Process property:
+        *     sunplus,zero_func = < u32 u32 u32 ...>
+        */
+       list = of_get_property(np_config, "sunplus,zero_func", &size);
+       if (list) {
+               for (i = 0; i < (size / sizeof(*list)); i++) {
+                       dt_fun = be32_to_cpu(list[i]);
+                       if (dt_fun >= sppctl_list_funcs_sz) {
+                               dev_err(pctldev->dev, "Zero-func %d out of range!\n",
+                                       dt_fun);
+                               continue;
+                       }
+
+                       f = &sppctl_list_funcs[dt_fun];
+                       switch (f->type) {
+                       case pinmux_type_fpmx:
+                               sppctl_func_set(pctl, dt_fun, 0);
+                               dev_dbg(pctldev->dev, "%s: No map\n", f->name);
+                               break;
+
+                       case pinmux_type_grp:
+                               sppctl_gmx_set(pctl, f->roff, f->boff, f->blen, 0);
+                               dev_dbg(pctldev->dev, "%s: No map\n", f->name);
+                               break;
+
+                       default:
+                               dev_err(pctldev->dev, "Wrong zero-group: %d (%s)\n",
+                                       dt_fun, f->name);
+                               break;
+                       }
+               }
+       }
+
+       of_node_put(parent);
+       dev_dbg(pctldev->dev, "%d pins mapped\n", *num_maps);
+       return 0;
+}

...

drivers/pinctrl/sunplus/sppctl.c line 1050

Quoted 12 lines
drivers/pinctrl/sunplus/sppctl.c new file +11 -0
+       sppctl->g2fp_maps = devm_kcalloc(&pdev->dev, sppctl->unq_grps_sz + 1,
+                                        sizeof(*sppctl->g2fp_maps), GFP_KERNEL);
+       if (!sppctl->g2fp_maps)
+               return -ENOMEM;
 
+       /*
+        * Check only product of n and size of the second devm_kcalloc()
+        * because its size is the largest of the two.
+        */
+       if (unlikely(check_mul_overflow(sppctl->unq_grps_sz + 1,
+                                       sizeof(*sppctl->g2fp_maps), &prod)))
+               return -EINVAL;
Quoted 2 lines

What the point to check it after? What the point to use it with kcalloc()? Please, do your homework, i.e. read the code which implements that.

I'll remove the "if (unlikely(check_mul_overflow()...) return -EINVAL" statement next patch.

I think I mis-understood your previous comment.
I thought I was asked to add check_mul_overflow() function for devm_kcalloc(...). Sorry for strange codes.

I should study devm_kcalloc() furthermore. Now I know devm_kcalloc(...) does multiplication overflow check for us. That's why we need to devm_kzalloc() with devm_kcalloc().

One question left in my mind is, in this case, even we have 10,000 pins, we will never get overflow. It looks not so necessary.

Quoted 5 lines

...

Quoted 1 line

+ struct device_node *np = of_node_get(pdev->dev.of_node);

What's the role of of_node_get()?

I'll remove the unused codes.
I think it was used to check if OF node exists.

Quoted 5 lines

...

Quoted 1 line

+ /* Initialize pctl_desc */

Useless. Drop all useless comments like this from the code.

I'll remove all this kind of comments.

Quoted 5 lines

...

Quoted 1 line

+ dev_info(&pdev->dev, "SP7021 PinCtrl by Sunplus/Tibbo Tech.");

Is it useful?

I think yes. It tells users that Pinctrl driver has probed successfully. If no this message, users don't know if Pinctrl driver has probed successfully or not. For example, because that dts node of pinctrl is "disabled" or Pinctrl driver is even not enabled.

Can I keep this?

Quoted 8 lines

...

Quoted 5 lines
drivers/pinctrl/sunplus/sppctl.h new file +5 -0
+#ifndef __SPPCTL_H__
+#define __SPPCTL_H__
+
+#include <linux/bits.h>
+#include <linux/gpio/driver.h>
Quoted 5 lines

drivers/pinctrl/sunplus/sppctl.h line 14

Quoted 3 lines
drivers/pinctrl/sunplus/sppctl.h new file +3 -0
+#include <linux/kernel.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/spinlock.h>

types.h is missed.

I'll add the header file next patch.

Quoted 5 lines

...

Quoted 1 line

+/** enum mux_first_reg - define modes of FIRST register accesses

Fix the multi-line comment style. You mentioned you fixed, but seems not (not in

all places).

I'll fix it.

Sorry for my mistake.
I modified multi-line comments for all.
Later, I added more comments. But I
forgot to switch back from network mode.

Quoted 11 lines
Quoted 9 lines
+ *    - mux_f_mux:  Select the pin to a fully-pinmux pin
+ *    - mux_f_gpio: Select the pin to a GPIO or IOP pin
+ *    - mux_f_keep: Don't change (keep intact)

+ */

drivers/pinctrl/sunplus/sppctl.h new file +5 -0
+enum mux_first_reg {
+       mux_f_mux = 0,          /* select fully-pinmux       */
+       mux_f_gpio = 1,         /* select GPIO or IOP pinmux */
+       mux_f_keep = 2,         /* keep no change            */
+};
Quoted 9 lines

drivers/pinctrl/sunplus/sppctl.h line 106

Quoted 7 lines
drivers/pinctrl/sunplus/sppctl.h new file +7 -0
+struct sppctl_gpio_chip {
+       void __iomem *gpioxt_base;      /* MASTER, OE, OUT, IN, I_INV, O_INV, OD */
+       void __iomem *first_base;       /* GPIO_FIRST                            */
+
+       struct gpio_chip chip;
+       spinlock_t lock;                /* lock for accessing OE register        */
+};

Why is this in the header?

Do you mean I need to move this "struct sppctl_gpio_chip { ... }" declaration to c file because it is only used by the c file?

Quoted 7 lines

...

Quoted 3 lines

+/* SP7021 Pin Controller Driver.
+ * Copyright (C) Sunplus Tech / Tibbo Tech.
+ */

Multi-line comments.

I'll fix it.
Sorry for mistake. I overlooked the file header.

Quoted 1 line

I stopped here, please read my comments for previous versions and here and try your

best.

I read all your comments many times.
I'll do my best to address all comments.
Sorry for mis-understand some comments.

Your previous comments:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

+static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct

device_node *np_config,

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+                                struct pinctrl_map **map, unsigned
+int *num_maps) {

Looking into this rather quite big function why you can't use what pin control

core provides?

Quoted 6 lines
Quoted 4 lines

No, we cannot use functions pin-control core provides.
Please refer to dt-bindings document, "pinctrl/sunplus,sp7021-pinctrl.yaml". We have more explanation there.

Fine, can you reuse some library functions, etc? Please, consider refactoring to

make it more readable.

Could you please share me your idea about "refactoring"? Or could you give me some hints?
I think many times, but have no idea about refactoring.

Quoted 3 lines

--
With Best Regards,
Andy Shevchenko

#19 lore raw

Re: [PATCH v5 2/2] pinctrl: Add driver for Sunplus SP7021

Quoted 7 lines · Wells Lu 呂芳騰

Hi Andy,

Could you please answer my questions in previous mail? I need your answers to proceed submission.

Sorry, I am not sure if my previous mail is lost or you are busy.

Please, do not top-post! Also remove unrelated context, make your message small enough and neat.

I have answered your questions.

Signature · 2 lines
With Best Regards,
Andy Shevchenko