All of lore.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2021-10-08  1:24 Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML Dmitry Baryshkov
                   ` (27 more replies)
  0 siblings, 28 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:24 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

In 2019 (in kernel 5.4) spmi-gpio and ssbi-gpio drivers were converted
to hierarchical IRQ helpers, however MPP drivers were not converted at
that moment. Complete this by converting MPP drivers.

Changes since v2:
 - Add patches fixing/updating mpps nodes in the existing device trees

Changes since v1:
 - Drop the interrupt-controller from initial schema conversion
 - Add gpio-line-names to the qcom,pmic-mpp schema and to the example

The following changes since commit 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f:

  Linux 5.15-rc1 (2021-09-12 16:28:37 -0700)

are available in the Git repository at:

  https://git.linaro.org/people/dmitry.baryshkov/kernel.git spmi-mpp

for you to fetch changes up to 9bccc31fc5cec98f26ca639a2ee21a9831efe1de:

  arm64: dts: qcom: pm8994: add interrupt controller properties (2021-10-08 04:19:33 +0300)

----------------------------------------------------------------
Dmitry Baryshkov (25):
      dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML
      dt-bindings: mfd: qcom-pm8xxx: add missing child nodes
      ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes
      ARM: dts: qcom-msm8660: add gpio-ranges to mpps nodes
      ARM: dts: qcom-pm8841: add gpio-ranges to mpps nodes
      ARM: dts: qcom-pm8941: add gpio-ranges to mpps nodes
      ARM: dts: qcom-pma8084: add gpio-ranges to mpps nodes
      ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name
      ARM: dts: qcom-apq8060-dragonboard: fix mpps state names
      arm64: dts: qcom: pm8916: fix mpps device tree node
      arm64: dts: qcom: pm8994: fix mpps device tree node
      arm64: dts: qcom: apq8016-sbc: fix mpps state names
      pinctrl: qcom: ssbi-mpp: hardcode IRQ counts
      pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip
      pinctrl: qcom: spmi-mpp: hardcode IRQ counts
      pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip
      dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells
      ARM: dts: qcom-apq8064: add interrupt controller properties
      ARM: dts: qcom-mdm9615: add interrupt controller properties
      ARM: dts: qcom-msm8660: add interrupt controller properties
      ARM: dts: qcom-pm8841: add interrupt controller properties
      ARM: dts: qcom-pm8941: add interrupt controller properties
      ARM: dts: qcom-pma8084: add interrupt controller properties
      arm64: dts: qcom: pm8916: add interrupt controller properties
      arm64: dts: qcom: pm8994: add interrupt controller properties

 .../devicetree/bindings/mfd/qcom-pm8xxx.yaml       |  12 ++
 .../devicetree/bindings/pinctrl/qcom,pmic-mpp.txt  | 187 --------------------
 .../devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 188 +++++++++++++++++++++
 arch/arm/boot/dts/qcom-apq8060-dragonboard.dts     |   4 +-
 arch/arm/boot/dts/qcom-apq8064.dtsi                |  23 +--
 arch/arm/boot/dts/qcom-mdm9615.dtsi                |  12 +-
 arch/arm/boot/dts/qcom-msm8660.dtsi                |  17 +-
 arch/arm/boot/dts/qcom-pm8841.dtsi                 |   7 +-
 arch/arm/boot/dts/qcom-pm8941.dtsi                 |  11 +-
 arch/arm/boot/dts/qcom-pma8084.dtsi                |  11 +-
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi          |   4 +-
 arch/arm64/boot/dts/qcom/pm8916.dtsi               |   9 +-
 arch/arm64/boot/dts/qcom/pm8994.dtsi               |  13 +-
 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c            | 111 ++++++++----
 drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c            | 133 +++++++++++----
 15 files changed, 414 insertions(+), 328 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml



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

* [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML
  2021-10-08  1:24 Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  2:46   ` Rob Herring
  2021-10-08  1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
                   ` (26 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Convert Qualcomm PMIC MPP bindings from .txt to .yaml format.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../bindings/pinctrl/qcom,pmic-mpp.txt        | 187 -----------------
 .../bindings/pinctrl/qcom,pmic-mpp.yaml       | 188 ++++++++++++++++++
 2 files changed, 188 insertions(+), 187 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
deleted file mode 100644
index 5363d44cbb74..000000000000
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
+++ /dev/null
@@ -1,187 +0,0 @@
-Qualcomm PMIC Multi-Purpose Pin (MPP) block
-
-This binding describes the MPP block(s) found in the 8xxx series
-of PMIC's from Qualcomm.
-
-- compatible:
-	Usage: required
-	Value type: <string>
-	Definition: Should contain one of:
-		    "qcom,pm8018-mpp",
-		    "qcom,pm8019-mpp",
-		    "qcom,pm8038-mpp",
-		    "qcom,pm8058-mpp",
-		    "qcom,pm8821-mpp",
-		    "qcom,pm8841-mpp",
-		    "qcom,pm8916-mpp",
-		    "qcom,pm8917-mpp",
-		    "qcom,pm8921-mpp",
-		    "qcom,pm8941-mpp",
-		    "qcom,pm8950-mpp",
-		    "qcom,pmi8950-mpp",
-		    "qcom,pm8994-mpp",
-		    "qcom,pma8084-mpp",
-		    "qcom,pmi8994-mpp",
-
-		    And must contain either "qcom,spmi-mpp" or "qcom,ssbi-mpp"
-		    if the device is on an spmi bus or an ssbi bus respectively.
-
-- reg:
-	Usage: required
-	Value type: <prop-encoded-array>
-	Definition: Register base of the MPP block and length.
-
-- interrupts:
-	Usage: required
-	Value type: <prop-encoded-array>
-	Definition: Must contain an array of encoded interrupt specifiers for
-		    each available MPP
-
-- gpio-controller:
-	Usage: required
-	Value type: <none>
-	Definition: Mark the device node as a GPIO controller
-
-- #gpio-cells:
-	Usage: required
-	Value type: <u32>
-	Definition: Must be 2;
-		    the first cell will be used to define MPP number and the
-		    second denotes the flags for this MPP
-
-Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
-a general description of GPIO and interrupt bindings.
-
-Please refer to pinctrl-bindings.txt in this directory for details of the
-common pinctrl bindings used by client devices, including the meaning of the
-phrase "pin configuration node".
-
-The pin configuration nodes act as a container for an arbitrary number of
-subnodes. Each of these subnodes represents some desired configuration for a
-pin or a list of pins. This configuration can include the
-mux function to select on those pin(s), and various pin configuration
-parameters, as listed below.
-
-SUBNODES:
-
-The name of each subnode is not important; all subnodes should be enumerated
-and processed purely based on their content.
-
-Each subnode only affects those parameters that are explicitly listed. In
-other words, a subnode that lists a mux function but no pin configuration
-parameters implies no information about any pin configuration parameters.
-Similarly, a pin subnode that describes a pullup parameter implies no
-information about e.g. the mux function.
-
-The following generic properties as defined in pinctrl-bindings.txt are valid
-to specify in a pin configuration subnode:
-
-- pins:
-	Usage: required
-	Value type: <string-array>
-	Definition: List of MPP pins affected by the properties specified in
-		    this subnode.  Valid pins are:
-		    mpp1-mpp4 for pm8841
-		    mpp1-mpp4 for pm8916
-		    mpp1-mpp8 for pm8941
-		    mpp1-mpp4 for pm8950
-		    mpp1-mpp4 for pmi8950
-		    mpp1-mpp4 for pma8084
-
-- function:
-	Usage: required
-	Value type: <string>
-	Definition: Specify the alternative function to be configured for the
-		    specified pins.  Valid values are:
-		    "digital",
-		    "analog",
-		    "sink"
-
-- bias-disable:
-	Usage: optional
-	Value type: <none>
-	Definition: The specified pins should be configured as no pull.
-
-- bias-pull-up:
-	Usage: optional
-	Value type: <u32>
-	Definition: The specified pins should be configured as pull up.
-		    Valid values are 600, 10000 and 30000 in bidirectional mode
-		    only, i.e. when operating in qcom,analog-mode and input and
-		    outputs are enabled. The hardware ignores the configuration
-		    when operating in other modes.
-
-- bias-high-impedance:
-	Usage: optional
-	Value type: <none>
-	Definition: The specified pins will put in high-Z mode and disabled.
-
-- input-enable:
-	Usage: optional
-	Value type: <none>
-	Definition: The specified pins are put in input mode, i.e. their input
-		    buffer is enabled
-
-- output-high:
-	Usage: optional
-	Value type: <none>
-	Definition: The specified pins are configured in output mode, driven
-		    high.
-
-- output-low:
-	Usage: optional
-	Value type: <none>
-	Definition: The specified pins are configured in output mode, driven
-		    low.
-
-- power-source:
-	Usage: optional
-	Value type: <u32>
-	Definition: Selects the power source for the specified pins. Valid power
-		    sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
-
-- qcom,analog-level:
-	Usage: optional
-	Value type: <u32>
-	Definition: Selects the source for analog output. Valued values are
-		    defined in <dt-binding/pinctrl/qcom,pmic-mpp.h>
-		    PMIC_MPP_AOUT_LVL_*
-
-- qcom,dtest:
-	Usage: optional
-	Value type: <u32>
-	Definition: Selects which dtest rail to be routed in the various functions.
-		    Valid values are 1-4
-
-- qcom,amux-route:
-	Usage: optional
-	Value type: <u32>
-	Definition: Selects the source for analog input. Valid values are
-		    defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
-		    PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6...
-- qcom,paired:
-	Usage: optional
-	Value type: <none>
-	Definition: Indicates that the pin should be operating in paired mode.
-
-Example:
-
-	mpps@a000 {
-		compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
-		reg = <0xa000>;
-		gpio-controller;
-		#gpio-cells = <2>;
-		interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
-
-		pinctrl-names = "default";
-		pinctrl-0 = <&pm8841_default>;
-
-		pm8841_default: default {
-			gpio {
-				pins = "mpp1", "mpp2", "mpp3", "mpp4";
-				function = "digital";
-				input-enable;
-				power-source = <PM8841_MPP_S3>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
new file mode 100644
index 000000000000..475733cabb02
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
@@ -0,0 +1,188 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,pmic-mpp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm PMIC Multi-Purpose Pin (MPP) block
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+description:
+  This binding describes the MPP block(s) found in the 8xxx series of
+  PMIC's from Qualcomm.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - qcom,pm8018-mpp
+          - qcom,pm8019-mpp
+          - qcom,pm8038-mpp
+          - qcom,pm8058-mpp
+          - qcom,pm8821-mpp
+          - qcom,pm8841-mpp
+          - qcom,pm8916-mpp
+          - qcom,pm8917-mpp
+          - qcom,pm8921-mpp
+          - qcom,pm8941-mpp
+          - qcom,pm8950-mpp
+          - qcom,pmi8950-mpp
+          - qcom,pm8994-mpp
+          - qcom,pma8084-mpp
+          - qcom,pmi8994-mpp
+
+      - enum:
+          - qcom,spmi-mpp
+          - qcom,ssbi-mpp
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 1
+    maxItems: 12
+    description:
+      Must contain an array of encoded interrupt specifiers for
+      each available MPP
+
+  gpio-controller: true
+  gpio-line-names: true
+
+  gpio-ranges:
+    maxItems: 1
+
+  '#gpio-cells':
+    const: 2
+    description:
+      The first cell will be used to define gpio number and the
+      second denotes the flags for this gpio
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - gpio-controller
+  - '#gpio-cells'
+  - gpio-ranges
+
+patternProperties:
+  '-state$':
+    oneOf:
+      - $ref: "#/$defs/qcom-pmic-mpp-state"
+      - patternProperties:
+          "mpp":
+            $ref: "#/$defs/qcom-pmic-mpp-state"
+        additionalProperties: false
+
+$defs:
+  qcom-pmic-mpp-state:
+    type: object
+    allOf:
+      - $ref: "pinmux-node.yaml"
+      - $ref: "pincfg-node.yaml"
+    properties:
+      pins:
+        description:
+          List of gpio pins affected by the properties specified in
+          this subnode.  Valid pins are
+                 - mpp1-mpp4 for pm8841
+                 - mpp1-mpp4 for pm8916
+                 - mpp1-mpp8 for pm8941
+                 - mpp1-mpp4 for pm8950
+                 - mpp1-mpp4 for pmi8950
+                 - mpp1-mpp4 for pma8084
+
+        items:
+          pattern: "^mpp([0-9]+)$"
+
+      function:
+        items:
+          - enum:
+              - digital
+              - analog
+              - sink
+
+      bias-disable: true
+      bias-pull-up: true
+      bias-high-impedance: true
+      input-enable: true
+      output-high: true
+      output-low: true
+      power-source: true
+
+      qcom,analog-level:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Selects the source for analog output. Valued values are defined in
+          <dt-binding/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AOUT_LVL_*
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      qcom,atest:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Selects ATEST rail to route to GPIO when it's
+          configured in analog-pass-through mode.
+        enum: [1, 2, 3, 4]
+
+      qcom,dtest:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Selects DTEST rail to route to GPIO when it's
+          configured as digital input.
+        enum: [1, 2, 3, 4]
+
+      qcom,amux-route:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Selects the source for analog input. Valid values are defined in
+          <dt-bindings/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AMUX_ROUTE_CH5,
+          PMIC_MPP_AMUX_ROUTE_CH6...
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      qcom,paired:
+        - description:
+            Indicates that the pin should be operating in paired mode.
+
+    required:
+      - pins
+      - function
+
+    additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
+
+    pm8841_mpp: mpps@a000 {
+      compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
+      reg = <0xa000 0>;
+      gpio-controller;
+      #gpio-cells = <2>;
+      gpio-ranges = <&pm8841_mpp 0 0 4>;
+      gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
+              "BT_LED_CTRL", "GPIO-F";
+      interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
+
+      pinctrl-names = "default";
+      pinctrl-0 = <&pm8841_default>;
+
+      mpp1-state {
+        pins = "mpp1";
+        function = "digital";
+        input-enable;
+        power-source = <PM8841_MPP_S3>;
+      };
+
+      default-state {
+        gpio-mpp {
+          pins = "mpp1", "mpp2", "mpp3", "mpp4";
+          function = "digital";
+          input-enable;
+          power-source = <PM8841_MPP_S3>;
+        };
+      };
+    };
+...
-- 
2.30.2


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

* [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes
  2021-10-08  1:24 Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  2:46   ` Rob Herring
                     ` (2 more replies)
  2021-10-08  1:25 ` [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes Dmitry Baryshkov
                   ` (25 subsequent siblings)
  27 siblings, 3 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add gpio@[0-9a-f]+, mpps@[0-9a-f]+ and xoadc@[0-9a-f]+ as possible child
nodes of qcom,pm8xxx, referencing existint schema files. Schema for
other possible nodes does not exist yet.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/mfd/qcom-pm8xxx.yaml         | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
index 9065ec53e643..10021eb7103e 100644
--- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
@@ -38,10 +38,22 @@ properties:
   interrupt-controller: true
 
 patternProperties:
+  "gpio@[0-9a-f]+$":
+    type: object
+    $ref: "../pinctrl/qcom,pmic-gpio.yaml"
+
+  "mpps@[0-9a-f]+$":
+    type: object
+    $ref: "../pinctrl/qcom,pmic-mpp.yaml"
+
   "rtc@[0-9a-f]+$":
     type: object
     $ref: "../rtc/qcom-pm8xxx-rtc.yaml"
 
+  "xoadc@[0-9a-f]+$":
+    type: object
+    $ref: "../iio/adc/qcom,pm8018-adc.yaml"
+
 required:
   - compatible
   - '#address-cells'
-- 
2.30.2


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

* [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes
  2021-10-08  1:24 Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-12 23:54   ` Linus Walleij
  2021-10-08  1:25 ` [PATCH v3 04/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
                   ` (24 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add gpio-ranges property to mpps device tree nodes, adding the mapping between
pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 0b2bed6e7adf..cbc9be8a69cd 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -689,6 +689,7 @@ pm8821_mpps: mpps@50 {
 						     <27 IRQ_TYPE_NONE>;
 					gpio-controller;
 					#gpio-cells = <2>;
+					gpio-ranges = <&pm8821_mpps 0 0 4>;
 				};
 			};
 		};
@@ -726,6 +727,7 @@ pm8921_mpps: mpps@50 {
 					reg = <0x50>;
 					gpio-controller;
 					#gpio-cells = <2>;
+					gpio-ranges = <&pm8921_mpps 0 0 12>;
 					interrupts =
 					<128 IRQ_TYPE_NONE>,
 					<129 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 04/25] ARM: dts: qcom-msm8660: add gpio-ranges to mpps nodes
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 05/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
                   ` (23 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add gpio-ranges property to mpps device tree nodes, adding the mapping between
pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8660.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index 480fc08cbe8e..d404d386d392 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -307,6 +307,7 @@ pm8058_mpps: mpps@50 {
 					reg = <0x50>;
 					gpio-controller;
 					#gpio-cells = <2>;
+					gpio-ranges = <&pm8058_mpps 0 0 12>;
 					interrupt-parent = <&pm8058>;
 					interrupts =
 					<128 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 05/25] ARM: dts: qcom-pm8841: add gpio-ranges to mpps nodes
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (3 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 04/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 06/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
                   ` (22 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add gpio-ranges property to mpps device tree nodes, adding the mapping between
pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8841.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-pm8841.dtsi b/arch/arm/boot/dts/qcom-pm8841.dtsi
index 2fd59c440903..b6066c27732c 100644
--- a/arch/arm/boot/dts/qcom-pm8841.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8841.dtsi
@@ -15,6 +15,7 @@ pm8841_mpps: mpps@a000 {
 			reg = <0xa000>;
 			gpio-controller;
 			#gpio-cells = <2>;
+			gpio-ranges = <&pm8841_mpps 0 0 4>;
 			interrupts = <4 0xa0 0 IRQ_TYPE_NONE>,
 				     <4 0xa1 0 IRQ_TYPE_NONE>,
 				     <4 0xa2 0 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 06/25] ARM: dts: qcom-pm8941: add gpio-ranges to mpps nodes
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (4 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 05/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 07/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
                   ` (21 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add gpio-ranges property to mpps device tree nodes, adding the mapping between
pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8941.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index c1f2012d1c8b..cf8daa2fe144 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -79,6 +79,7 @@ pm8941_mpps: mpps@a000 {
 			reg = <0xa000>;
 			gpio-controller;
 			#gpio-cells = <2>;
+			gpio-ranges = <&pm8941_mpps 0 0 8>;
 			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
 				     <0 0xa1 0 IRQ_TYPE_NONE>,
 				     <0 0xa2 0 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 07/25] ARM: dts: qcom-pma8084: add gpio-ranges to mpps nodes
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (5 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 06/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 08/25] ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name Dmitry Baryshkov
                   ` (20 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add gpio-ranges property to mpps device tree nodes, adding the mapping between
pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
index e921c5e93a5d..fcee2afe6740 100644
--- a/arch/arm/boot/dts/qcom-pma8084.dtsi
+++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
@@ -42,6 +42,7 @@ pma8084_mpps: mpps@a000 {
 			reg = <0xa000>;
 			gpio-controller;
 			#gpio-cells = <2>;
+			gpio-ranges = <&pma8084_mpps 0 0 8>;
 			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
 				     <0 0xa1 0 IRQ_TYPE_NONE>,
 				     <0 0xa2 0 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 08/25] ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (6 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 07/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 09/25] ARM: dts: qcom-apq8060-dragonboard: fix mpps state names Dmitry Baryshkov
                   ` (19 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Rename mpp node to mpps@50 (instead of mpp@50). Also add gpio-ranges
property to mpps device tree nodes, adding the mapping between pinctrl
and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-mdm9615.dtsi b/arch/arm/boot/dts/qcom-mdm9615.dtsi
index dda2ceec6591..cfff1a5706ed 100644
--- a/arch/arm/boot/dts/qcom-mdm9615.dtsi
+++ b/arch/arm/boot/dts/qcom-mdm9615.dtsi
@@ -300,7 +300,7 @@ pwrkey@1c {
 					pull-up;
 				};
 
-				pmicmpp: mpp@50 {
+				pmicmpp: mpps@50 {
 					compatible = "qcom,pm8018-mpp", "qcom,ssbi-mpp";
 					interrupt-parent = <&pmicintc>;
 					interrupts = <24 IRQ_TYPE_NONE>,
@@ -312,6 +312,7 @@ pmicmpp: mpp@50 {
 					reg = <0x50>;
 					gpio-controller;
 					#gpio-cells = <2>;
+					gpio-ranges = <&pmicmpp 0 0 6>;
 				};
 
 				rtc@11d {
-- 
2.30.2


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

* [PATCH v3 09/25] ARM: dts: qcom-apq8060-dragonboard: fix mpps state names
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (7 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 08/25] ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 10/25] arm64: dts: qcom: pm8916: fix mpps device tree node Dmitry Baryshkov
                   ` (18 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

The majority of device tree nodes for mpps use xxxx-state as pinctrl
nodes. Change names of mpps pinctrl nodes for qcom-apq8060-dragonboard
board to follow that pattern.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
index e1189e929ee6..5bedbb902ad5 100644
--- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
@@ -357,8 +357,8 @@ pinconf {
 				};
 
 				mpps@50 {
-					dragon_cm3605_mpps: cm3605-mpps {
-						pinconf {
+					dragon_cm3605_mpps: cm3605-mpps-state {
+						mpp5 {
 							pins = "mpp5";
 							function = "analog";
 							input-enable;
-- 
2.30.2


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

* [PATCH v3 10/25] arm64: dts: qcom: pm8916: fix mpps device tree node
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (8 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 09/25] ARM: dts: qcom-apq8060-dragonboard: fix mpps state names Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 11/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
                   ` (17 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add missing "qcom,spmi-mpp" to the compatible list as required by the
node description. Also add gpio-ranges property to mpps device tree
node, adding the mapping between pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8916.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index f931cb0de231..7d9e25dd9e3a 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -91,10 +91,11 @@ rtc@6000 {
 		};
 
 		pm8916_mpps: mpps@a000 {
-			compatible = "qcom,pm8916-mpp";
+			compatible = "qcom,pm8916-mpp", "qcom,spmi-mpp";
 			reg = <0xa000>;
 			gpio-controller;
 			#gpio-cells = <2>;
+			gpio-ranges = <&pm8916_mpps 0 0 4>;
 			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
 				     <0 0xa1 0 IRQ_TYPE_NONE>,
 				     <0 0xa2 0 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 11/25] arm64: dts: qcom: pm8994: fix mpps device tree node
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (9 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 10/25] arm64: dts: qcom: pm8916: fix mpps device tree node Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 12/25] arm64: dts: qcom: apq8016-sbc: fix mpps state names Dmitry Baryshkov
                   ` (16 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Add missing "qcom,spmi-mpp" to the compatible list as required by the
node description. Also add gpio-ranges property to mpps device tree
node, adding the mapping between pinctrl and GPIO pins.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8994.dtsi b/arch/arm64/boot/dts/qcom/pm8994.dtsi
index ad19016df047..88a9d19b60ac 100644
--- a/arch/arm64/boot/dts/qcom/pm8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8994.dtsi
@@ -119,10 +119,11 @@ pm8994_gpios: gpios@c000 {
 		};
 
 		pm8994_mpps: mpps@a000 {
-			compatible = "qcom,pm8994-mpp";
+			compatible = "qcom,pm8994-mpp", "qcom,spmi-mpp";
 			reg = <0xa000>;
 			gpio-controller;
 			#gpio-cells = <2>;
+			gpio-ranges = <&pm8994_mpps 0 0 8>;
 			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
 				     <0 0xa1 0 IRQ_TYPE_NONE>,
 				     <0 0xa2 0 IRQ_TYPE_NONE>,
-- 
2.30.2


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

* [PATCH v3 12/25] arm64: dts: qcom: apq8016-sbc: fix mpps state names
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (10 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 11/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts Dmitry Baryshkov
                   ` (15 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

The majority of device tree nodes for mpps use xxxx-state as pinctrl
nodes. Change names of mpps pinctrl nodes for the apq8016-sbc board to
follow that pattern.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index f8d8f3e3664e..a250145849cd 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -809,7 +809,7 @@ &pm8916_mpps {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ls_exp_gpio_f>;
 
-	ls_exp_gpio_f: pm8916-mpp4 {
+	ls_exp_gpio_f: pm8916-mpp4-state {
 		pins = "mpp4";
 		function = "digital";
 
@@ -817,7 +817,7 @@ ls_exp_gpio_f: pm8916-mpp4 {
 		power-source = <PM8916_MPP_L5>;	// 1.8V
 	};
 
-	pm8916_mpps_leds: pm8916-mpps-leds {
+	pm8916_mpps_leds: pm8916-mpps-state {
 		pins = "mpp2", "mpp3";
 		function = "digital";
 
-- 
2.30.2


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

* [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (11 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 12/25] arm64: dts: qcom: apq8016-sbc: fix mpps state names Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-17 16:52   ` Bjorn Andersson
  2021-10-08  1:25 ` [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
                   ` (14 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

The probing of this driver calls platform_irq_count, which will
setup all of the IRQs that are configured in device tree. In
preparation for converting this driver to be a hierarchical IRQ
chip, hardcode the IRQ count based on the hardware type so that all
the IRQs are not configured immediately and are configured on an
as-needed basis later in the boot process.

This change will also allow for the removal of the interrupts property
later in this patch series once the hierarchical IRQ chip support is in.

This patch also removes the generic qcom,ssbi-mpp OF match since we
don't know the number of pins. All of the existing upstream bindings
already include the more-specific binding.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
index 92e7f2602847..a90cada1d657 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
@@ -733,13 +733,12 @@ static int pm8xxx_pin_populate(struct pm8xxx_mpp *pctrl,
 }
 
 static const struct of_device_id pm8xxx_mpp_of_match[] = {
-	{ .compatible = "qcom,pm8018-mpp" },
-	{ .compatible = "qcom,pm8038-mpp" },
-	{ .compatible = "qcom,pm8058-mpp" },
-	{ .compatible = "qcom,pm8917-mpp" },
-	{ .compatible = "qcom,pm8821-mpp" },
-	{ .compatible = "qcom,pm8921-mpp" },
-	{ .compatible = "qcom,ssbi-mpp" },
+	{ .compatible = "qcom,pm8018-mpp", .data = (void *) 6 },
+	{ .compatible = "qcom,pm8038-mpp", .data = (void *) 6 },
+	{ .compatible = "qcom,pm8058-mpp", .data = (void *) 12 },
+	{ .compatible = "qcom,pm8821-mpp", .data = (void *) 4 },
+	{ .compatible = "qcom,pm8917-mpp", .data = (void *) 10 },
+	{ .compatible = "qcom,pm8921-mpp", .data = (void *) 12 },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, pm8xxx_mpp_of_match);
@@ -750,19 +749,14 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
 	struct pinctrl_pin_desc *pins;
 	struct pm8xxx_mpp *pctrl;
 	int ret;
-	int i, npins;
+	int i;
 
 	pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
 	if (!pctrl)
 		return -ENOMEM;
 
 	pctrl->dev = &pdev->dev;
-	npins = platform_irq_count(pdev);
-	if (!npins)
-		return -EINVAL;
-	if (npins < 0)
-		return npins;
-	pctrl->npins = npins;
+	pctrl->npins = (uintptr_t) device_get_match_data(&pdev->dev);
 
 	pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
 	if (!pctrl->regmap) {
-- 
2.30.2


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

* [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (12 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-17 16:53   ` Bjorn Andersson
  2021-10-08  1:25 ` [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts Dmitry Baryshkov
                   ` (13 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

ssbi-mpp did not have any irqchip support so consumers of this in
device tree would need to call gpio[d]_to_irq() in order to get the
proper IRQ on the underlying PMIC. IRQ chips in device tree should be
usable from the start without the consumer having to make an additional
call to get the proper IRQ on the parent. This patch adds hierarchical
IRQ chip support to the ssbi-mpp code to correct this issue.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 111 ++++++++++++++++++++----
 1 file changed, 93 insertions(+), 18 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
index a90cada1d657..842940594c4a 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
@@ -87,7 +87,6 @@
 /**
  * struct pm8xxx_pin_data - dynamic configuration for a pin
  * @reg:		address of the control register
- * @irq:		IRQ from the PMIC interrupt controller
  * @mode:		operating mode for the pin (digital, analog or current sink)
  * @input:		pin is input
  * @output:		pin is output
@@ -103,7 +102,6 @@
  */
 struct pm8xxx_pin_data {
 	unsigned reg;
-	int irq;
 
 	u8 mode;
 
@@ -126,6 +124,7 @@ struct pm8xxx_mpp {
 	struct regmap *regmap;
 	struct pinctrl_dev *pctrl;
 	struct gpio_chip chip;
+	struct irq_chip irq;
 
 	struct pinctrl_desc desc;
 	unsigned npins;
@@ -148,6 +147,8 @@ static const struct pin_config_item pm8xxx_conf_items[] = {
 #endif
 
 #define PM8XXX_MAX_MPPS	12
+#define PM8XXX_MPP_PHYSICAL_OFFSET    1
+
 static const char * const pm8xxx_groups[PM8XXX_MAX_MPPS] = {
 	"mpp1", "mpp2", "mpp3", "mpp4", "mpp5", "mpp6", "mpp7", "mpp8",
 	"mpp9", "mpp10", "mpp11", "mpp12",
@@ -492,12 +493,16 @@ static int pm8xxx_mpp_get(struct gpio_chip *chip, unsigned offset)
 	struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip);
 	struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data;
 	bool state;
-	int ret;
+	int ret, irq;
 
 	if (!pin->input)
 		return !!pin->output_value;
 
-	ret = irq_get_irqchip_state(pin->irq, IRQCHIP_STATE_LINE_LEVEL, &state);
+	irq = chip->to_irq(chip, offset);
+	if (irq < 0)
+		return irq;
+
+	ret = irq_get_irqchip_state(irq, IRQCHIP_STATE_LINE_LEVEL, &state);
 	if (!ret)
 		ret = !!state;
 
@@ -524,18 +529,10 @@ static int pm8xxx_mpp_of_xlate(struct gpio_chip *chip,
 	if (flags)
 		*flags = gpio_desc->args[1];
 
-	return gpio_desc->args[0] - 1;
+	return gpio_desc->args[0] - PM8XXX_MPP_PHYSICAL_OFFSET;
 }
 
 
-static int pm8xxx_mpp_to_irq(struct gpio_chip *chip, unsigned offset)
-{
-	struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip);
-	struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data;
-
-	return pin->irq;
-}
-
 #ifdef CONFIG_DEBUG_FS
 #include <linux/seq_file.h>
 
@@ -558,7 +555,7 @@ static void pm8xxx_mpp_dbg_show_one(struct seq_file *s,
 		"abus3",
 	};
 
-	seq_printf(s, " mpp%-2d:", offset + 1);
+	seq_printf(s, " mpp%-2d:", offset + PM8XXX_MPP_PHYSICAL_OFFSET);
 
 	switch (pin->mode) {
 	case PM8XXX_MPP_DIGITAL:
@@ -640,7 +637,6 @@ static const struct gpio_chip pm8xxx_mpp_template = {
 	.get = pm8xxx_mpp_get,
 	.set = pm8xxx_mpp_set,
 	.of_xlate = pm8xxx_mpp_of_xlate,
-	.to_irq = pm8xxx_mpp_to_irq,
 	.dbg_show = pm8xxx_mpp_dbg_show,
 	.owner = THIS_MODULE,
 };
@@ -732,6 +728,55 @@ static int pm8xxx_pin_populate(struct pm8xxx_mpp *pctrl,
 	return 0;
 }
 
+static int pm8xxx_mpp_domain_translate(struct irq_domain *domain,
+				   struct irq_fwspec *fwspec,
+				   unsigned long *hwirq,
+				   unsigned int *type)
+{
+	struct pm8xxx_mpp *pctrl = container_of(domain->host_data,
+						 struct pm8xxx_mpp, chip);
+
+	if (fwspec->param_count != 2 ||
+	    fwspec->param[0] < PM8XXX_MPP_PHYSICAL_OFFSET ||
+	    fwspec->param[0] > pctrl->chip.ngpio)
+		return -EINVAL;
+
+	*hwirq = fwspec->param[0] - PM8XXX_MPP_PHYSICAL_OFFSET;
+	*type = fwspec->param[1];
+
+	return 0;
+}
+
+static unsigned int pm8xxx_mpp_child_offset_to_irq(struct gpio_chip *chip,
+						   unsigned int offset)
+{
+	return offset + PM8XXX_MPP_PHYSICAL_OFFSET;
+}
+
+static int pm8821_mpp_child_to_parent_hwirq(struct gpio_chip *chip,
+					    unsigned int child_hwirq,
+					    unsigned int child_type,
+					    unsigned int *parent_hwirq,
+					    unsigned int *parent_type)
+{
+	*parent_hwirq = child_hwirq + 24;
+	*parent_type = child_type;
+
+	return 0;
+}
+
+static int pm8xxx_mpp_child_to_parent_hwirq(struct gpio_chip *chip,
+					    unsigned int child_hwirq,
+					    unsigned int child_type,
+					    unsigned int *parent_hwirq,
+					    unsigned int *parent_type)
+{
+	*parent_hwirq = child_hwirq + 0x80;
+	*parent_type = child_type;
+
+	return 0;
+}
+
 static const struct of_device_id pm8xxx_mpp_of_match[] = {
 	{ .compatible = "qcom,pm8018-mpp", .data = (void *) 6 },
 	{ .compatible = "qcom,pm8038-mpp", .data = (void *) 6 },
@@ -746,7 +791,10 @@ MODULE_DEVICE_TABLE(of, pm8xxx_mpp_of_match);
 static int pm8xxx_mpp_probe(struct platform_device *pdev)
 {
 	struct pm8xxx_pin_data *pin_data;
+	struct irq_domain *parent_domain;
+	struct device_node *parent_node;
 	struct pinctrl_pin_desc *pins;
+	struct gpio_irq_chip *girq;
 	struct pm8xxx_mpp *pctrl;
 	int ret;
 	int i;
@@ -783,9 +831,6 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
 
 	for (i = 0; i < pctrl->desc.npins; i++) {
 		pin_data[i].reg = SSBI_REG_ADDR_MPP(i);
-		pin_data[i].irq = platform_get_irq(pdev, i);
-		if (pin_data[i].irq < 0)
-			return pin_data[i].irq;
 
 		ret = pm8xxx_pin_populate(pctrl, &pin_data[i]);
 		if (ret)
@@ -816,6 +861,36 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
 	pctrl->chip.of_gpio_n_cells = 2;
 	pctrl->chip.label = dev_name(pctrl->dev);
 	pctrl->chip.ngpio = pctrl->npins;
+
+	parent_node = of_irq_find_parent(pctrl->dev->of_node);
+	if (!parent_node)
+		return -ENXIO;
+
+	parent_domain = irq_find_host(parent_node);
+	of_node_put(parent_node);
+	if (!parent_domain)
+		return -ENXIO;
+
+	pctrl->irq.name = "ssbi-mpp";
+	pctrl->irq.irq_mask_ack = irq_chip_mask_ack_parent;
+	pctrl->irq.irq_unmask = irq_chip_unmask_parent;
+	pctrl->irq.irq_set_type = irq_chip_set_type_parent;
+	pctrl->irq.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE;
+
+	girq = &pctrl->chip.irq;
+	girq->chip = &pctrl->irq;
+	girq->default_type = IRQ_TYPE_NONE;
+	girq->handler = handle_level_irq;
+	girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node);
+	girq->parent_domain = parent_domain;
+	if (of_device_is_compatible(pdev->dev.of_node, "qcom,pm8821-mpp"))
+		girq->child_to_parent_hwirq = pm8821_mpp_child_to_parent_hwirq;
+	else
+		girq->child_to_parent_hwirq = pm8xxx_mpp_child_to_parent_hwirq;
+	girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_twocell;
+	girq->child_offset_to_irq = pm8xxx_mpp_child_offset_to_irq;
+	girq->child_irq_domain_ops.translate = pm8xxx_mpp_domain_translate;
+
 	ret = gpiochip_add_data(&pctrl->chip, pctrl);
 	if (ret) {
 		dev_err(&pdev->dev, "failed register gpiochip\n");
-- 
2.30.2


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

* [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (13 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-17 16:53   ` Bjorn Andersson
  2021-10-08  1:25 ` [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
                   ` (12 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

The probing of this driver calls platform_irq_count, which will
setup all of the IRQs that are configured in device tree. In
preparation for converting this driver to be a hierarchical IRQ
chip, hardcode the IRQ count based on the hardware type so that all
the IRQs are not configured immediately and are configured on an
as-needed basis later in the boot process.

This change will also allow for the removal of the interrupts property
later in this patch series once the hierarchical IRQ chip support is in.

This patch also removes the generic qcom,spmi-mpp OF match since we
don't know the number of pins. All of the existing upstream bindings
already include the more-specific binding.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
index 2da9b5f68f3f..a9f994863126 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
@@ -812,11 +812,7 @@ static int pmic_mpp_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	npins = platform_irq_count(pdev);
-	if (!npins)
-		return -EINVAL;
-	if (npins < 0)
-		return npins;
+	npins = (uintptr_t) device_get_match_data(&pdev->dev);
 
 	BUG_ON(npins > ARRAY_SIZE(pmic_mpp_groups));
 
@@ -912,16 +908,15 @@ static int pmic_mpp_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id pmic_mpp_of_match[] = {
-	{ .compatible = "qcom,pm8019-mpp" },	/* 6 MPP's */
-	{ .compatible = "qcom,pm8841-mpp" },	/* 4 MPP's */
-	{ .compatible = "qcom,pm8916-mpp" },	/* 4 MPP's */
-	{ .compatible = "qcom,pm8941-mpp" },	/* 8 MPP's */
-	{ .compatible = "qcom,pm8950-mpp" },	/* 4 MPP's */
-	{ .compatible = "qcom,pmi8950-mpp" },	/* 4 MPP's */
-	{ .compatible = "qcom,pm8994-mpp" },	/* 8 MPP's */
-	{ .compatible = "qcom,pma8084-mpp" },	/* 8 MPP's */
-	{ .compatible = "qcom,pmi8994-mpp" },	/* 4 MPP's */
-	{ .compatible = "qcom,spmi-mpp" },	/* Generic */
+	{ .compatible = "qcom,pm8019-mpp", .data = (void *) 6 },
+	{ .compatible = "qcom,pm8841-mpp", .data = (void *) 4 },
+	{ .compatible = "qcom,pm8916-mpp", .data = (void *) 4 },
+	{ .compatible = "qcom,pm8941-mpp", .data = (void *) 8 },
+	{ .compatible = "qcom,pm8950-mpp", .data = (void *) 4 },
+	{ .compatible = "qcom,pmi8950-mpp", .data = (void *) 4 },
+	{ .compatible = "qcom,pm8994-mpp", .data = (void *) 8 },
+	{ .compatible = "qcom,pma8084-mpp", .data = (void *) 8 },
+	{ .compatible = "qcom,pmi8994-mpp", .data = (void *) 4 },
 	{ },
 };
 
-- 
2.30.2


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

* [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (14 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-17 16:53   ` Bjorn Andersson
  2021-10-08  1:25 ` [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells Dmitry Baryshkov
                   ` (11 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

spmi-mpp did not have any irqchip support so consumers of this in
device tree would need to call gpio[d]_to_irq() in order to get the
proper IRQ on the underlying PMIC. IRQ chips in device tree should be
usable from the start without the consumer having to make an additional
call to get the proper IRQ on the parent. This patch adds hierarchical
IRQ chip support to the spmi-mpp code to correct this issue.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 86 ++++++++++++++++++++-----
 1 file changed, 69 insertions(+), 17 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
index a9f994863126..b80723928b7e 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
@@ -103,7 +103,6 @@
 /**
  * struct pmic_mpp_pad - keep current MPP settings
  * @base: Address base in SPMI device.
- * @irq: IRQ number which this MPP generate.
  * @is_enabled: Set to false when MPP should be put in high Z state.
  * @out_value: Cached pin output value.
  * @output_enabled: Set to true if MPP output logic is enabled.
@@ -121,7 +120,6 @@
  */
 struct pmic_mpp_pad {
 	u16		base;
-	int		irq;
 	bool		is_enabled;
 	bool		out_value;
 	bool		output_enabled;
@@ -143,6 +141,7 @@ struct pmic_mpp_state {
 	struct regmap	*map;
 	struct pinctrl_dev *ctrl;
 	struct gpio_chip chip;
+	struct irq_chip irq;
 };
 
 static const struct pinconf_generic_params pmic_mpp_bindings[] = {
@@ -622,16 +621,6 @@ static int pmic_mpp_of_xlate(struct gpio_chip *chip,
 	return gpio_desc->args[0] - PMIC_MPP_PHYSICAL_OFFSET;
 }
 
-static int pmic_mpp_to_irq(struct gpio_chip *chip, unsigned pin)
-{
-	struct pmic_mpp_state *state = gpiochip_get_data(chip);
-	struct pmic_mpp_pad *pad;
-
-	pad = state->ctrl->desc->pins[pin].drv_data;
-
-	return pad->irq;
-}
-
 static void pmic_mpp_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 {
 	struct pmic_mpp_state *state = gpiochip_get_data(chip);
@@ -651,7 +640,6 @@ static const struct gpio_chip pmic_mpp_gpio_template = {
 	.request		= gpiochip_generic_request,
 	.free			= gpiochip_generic_free,
 	.of_xlate		= pmic_mpp_of_xlate,
-	.to_irq			= pmic_mpp_to_irq,
 	.dbg_show		= pmic_mpp_dbg_show,
 };
 
@@ -796,13 +784,53 @@ static int pmic_mpp_populate(struct pmic_mpp_state *state,
 	return 0;
 }
 
+static int pmic_mpp_domain_translate(struct irq_domain *domain,
+				      struct irq_fwspec *fwspec,
+				      unsigned long *hwirq,
+				      unsigned int *type)
+{
+	struct pmic_mpp_state *state = container_of(domain->host_data,
+						     struct pmic_mpp_state,
+						     chip);
+
+	if (fwspec->param_count != 2 ||
+	    fwspec->param[0] < 1 || fwspec->param[0] > state->chip.ngpio)
+		return -EINVAL;
+
+	*hwirq = fwspec->param[0] - PMIC_MPP_PHYSICAL_OFFSET;
+	*type = fwspec->param[1];
+
+	return 0;
+}
+
+static unsigned int pmic_mpp_child_offset_to_irq(struct gpio_chip *chip,
+						  unsigned int offset)
+{
+	return offset + PMIC_MPP_PHYSICAL_OFFSET;
+}
+
+static int pmic_mpp_child_to_parent_hwirq(struct gpio_chip *chip,
+					   unsigned int child_hwirq,
+					   unsigned int child_type,
+					   unsigned int *parent_hwirq,
+					   unsigned int *parent_type)
+{
+	*parent_hwirq = child_hwirq + 0xc0;
+	*parent_type = child_type;
+
+	return 0;
+}
+
 static int pmic_mpp_probe(struct platform_device *pdev)
 {
+	struct irq_domain *parent_domain;
+	struct device_node *parent_node;
 	struct device *dev = &pdev->dev;
 	struct pinctrl_pin_desc *pindesc;
 	struct pinctrl_desc *pctrldesc;
 	struct pmic_mpp_pad *pad, *pads;
 	struct pmic_mpp_state *state;
+	struct gpio_irq_chip *girq;
 	int ret, npins, i;
 	u32 reg;
 
@@ -857,10 +885,6 @@ static int pmic_mpp_probe(struct platform_device *pdev)
 		pindesc->number = i;
 		pindesc->name = pmic_mpp_groups[i];
 
-		pad->irq = platform_get_irq(pdev, i);
-		if (pad->irq < 0)
-			return pad->irq;
-
 		pad->base = reg + i * PMIC_MPP_ADDRESS_RANGE;
 
 		ret = pmic_mpp_populate(state, pad);
@@ -880,6 +904,34 @@ static int pmic_mpp_probe(struct platform_device *pdev)
 	if (IS_ERR(state->ctrl))
 		return PTR_ERR(state->ctrl);
 
+	parent_node = of_irq_find_parent(state->dev->of_node);
+	if (!parent_node)
+		return -ENXIO;
+
+	parent_domain = irq_find_host(parent_node);
+	of_node_put(parent_node);
+	if (!parent_domain)
+		return -ENXIO;
+
+	state->irq.name = "spmi-mpp",
+	state->irq.irq_ack = irq_chip_ack_parent,
+	state->irq.irq_mask = irq_chip_mask_parent,
+	state->irq.irq_unmask = irq_chip_unmask_parent,
+	state->irq.irq_set_type = irq_chip_set_type_parent,
+	state->irq.irq_set_wake = irq_chip_set_wake_parent,
+	state->irq.flags = IRQCHIP_MASK_ON_SUSPEND,
+
+	girq = &state->chip.irq;
+	girq->chip = &state->irq;
+	girq->default_type = IRQ_TYPE_NONE;
+	girq->handler = handle_level_irq;
+	girq->fwnode = of_node_to_fwnode(state->dev->of_node);
+	girq->parent_domain = parent_domain;
+	girq->child_to_parent_hwirq = pmic_mpp_child_to_parent_hwirq;
+	girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_fourcell;
+	girq->child_offset_to_irq = pmic_mpp_child_offset_to_irq;
+	girq->child_irq_domain_ops.translate = pmic_mpp_domain_translate;
+
 	ret = gpiochip_add_data(&state->chip, state);
 	if (ret) {
 		dev_err(state->dev, "can't add gpio chip\n");
-- 
2.30.2


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

* [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (15 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  2:46   ` Rob Herring
  2021-10-08  1:25 ` [PATCH v3 18/25] ARM: dts: qcom-apq8064: add interrupt controller properties Dmitry Baryshkov
                   ` (10 subsequent siblings)
  27 siblings, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Stop specifying individual interrupts properties. Use #interrupt-cells
instead as we are switching qcom,spmi-mpp and qcom,ssbi-mpp to
hierarchical IRQ setup.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
index 475733cabb02..35c846f59979 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
@@ -40,12 +40,10 @@ properties:
   reg:
     maxItems: 1
 
-  interrupts:
-    minItems: 1
-    maxItems: 12
-    description:
-      Must contain an array of encoded interrupt specifiers for
-      each available MPP
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
 
   gpio-controller: true
   gpio-line-names: true
@@ -67,6 +65,7 @@ required:
   - gpio-controller
   - '#gpio-cells'
   - gpio-ranges
+  - interrupt-controller
 
 patternProperties:
   '-state$':
@@ -164,7 +163,8 @@ examples:
       gpio-ranges = <&pm8841_mpp 0 0 4>;
       gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
               "BT_LED_CTRL", "GPIO-F";
-      interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
 
       pinctrl-names = "default";
       pinctrl-0 = <&pm8841_default>;
-- 
2.30.2


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

* [PATCH v3 18/25] ARM: dts: qcom-apq8064: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (16 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 19/25] ARM: dts: qcom-mdm9615: " Dmitry Baryshkov
                   ` (9 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index cbc9be8a69cd..5aebbeb5eb07 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -683,10 +683,8 @@ pm8821: pmic@1 {
 				pm8821_mpps: mpps@50 {
 					compatible = "qcom,pm8821-mpp", "qcom,ssbi-mpp";
 					reg = <0x50>;
-					interrupts = <24 IRQ_TYPE_NONE>,
-						     <25 IRQ_TYPE_NONE>,
-						     <26 IRQ_TYPE_NONE>,
-						     <27 IRQ_TYPE_NONE>;
+					interrupt-controller;
+					#interrupt-cells = <2>;
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&pm8821_mpps 0 0 4>;
@@ -728,19 +726,8 @@ pm8921_mpps: mpps@50 {
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&pm8921_mpps 0 0 12>;
-					interrupts =
-					<128 IRQ_TYPE_NONE>,
-					<129 IRQ_TYPE_NONE>,
-					<130 IRQ_TYPE_NONE>,
-					<131 IRQ_TYPE_NONE>,
-					<132 IRQ_TYPE_NONE>,
-					<133 IRQ_TYPE_NONE>,
-					<134 IRQ_TYPE_NONE>,
-					<135 IRQ_TYPE_NONE>,
-					<136 IRQ_TYPE_NONE>,
-					<137 IRQ_TYPE_NONE>,
-					<138 IRQ_TYPE_NONE>,
-					<139 IRQ_TYPE_NONE>;
+					interrupt-controller;
+					#interrupt-cells = <2>;
 				};
 
 				rtc@11d {
-- 
2.30.2


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

* [PATCH v3 19/25] ARM: dts: qcom-mdm9615: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (17 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 18/25] ARM: dts: qcom-apq8064: add interrupt controller properties Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 20/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
                   ` (8 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-mdm9615.dtsi b/arch/arm/boot/dts/qcom-mdm9615.dtsi
index cfff1a5706ed..6e90c5d5a050 100644
--- a/arch/arm/boot/dts/qcom-mdm9615.dtsi
+++ b/arch/arm/boot/dts/qcom-mdm9615.dtsi
@@ -302,13 +302,8 @@ pwrkey@1c {
 
 				pmicmpp: mpps@50 {
 					compatible = "qcom,pm8018-mpp", "qcom,ssbi-mpp";
-					interrupt-parent = <&pmicintc>;
-					interrupts = <24 IRQ_TYPE_NONE>,
-						     <25 IRQ_TYPE_NONE>,
-						     <26 IRQ_TYPE_NONE>,
-						     <27 IRQ_TYPE_NONE>,
-						     <28 IRQ_TYPE_NONE>,
-						     <29 IRQ_TYPE_NONE>;
+					interrupt-controller;
+					#interrupt-cells = <2>;
 					reg = <0x50>;
 					gpio-controller;
 					#gpio-cells = <2>;
-- 
2.30.2


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

* [PATCH v3 20/25] ARM: dts: qcom-msm8660: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (18 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 19/25] ARM: dts: qcom-mdm9615: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 21/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
                   ` (7 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8660.dtsi | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index d404d386d392..21cb58ab68ac 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -308,20 +308,8 @@ pm8058_mpps: mpps@50 {
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&pm8058_mpps 0 0 12>;
-					interrupt-parent = <&pm8058>;
-					interrupts =
-					<128 IRQ_TYPE_NONE>,
-					<129 IRQ_TYPE_NONE>,
-					<130 IRQ_TYPE_NONE>,
-					<131 IRQ_TYPE_NONE>,
-					<132 IRQ_TYPE_NONE>,
-					<133 IRQ_TYPE_NONE>,
-					<134 IRQ_TYPE_NONE>,
-					<135 IRQ_TYPE_NONE>,
-					<136 IRQ_TYPE_NONE>,
-					<137 IRQ_TYPE_NONE>,
-					<138 IRQ_TYPE_NONE>,
-					<139 IRQ_TYPE_NONE>;
+					interrupt-controller;
+					#interrupt-cells = <2>;
 				};
 
 				pwrkey@1c {
-- 
2.30.2


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

* [PATCH v3 21/25] ARM: dts: qcom-pm8841: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (19 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 20/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 22/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
                   ` (6 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8841.dtsi | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-pm8841.dtsi b/arch/arm/boot/dts/qcom-pm8841.dtsi
index b6066c27732c..2caf71eacb52 100644
--- a/arch/arm/boot/dts/qcom-pm8841.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8841.dtsi
@@ -16,10 +16,8 @@ pm8841_mpps: mpps@a000 {
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-ranges = <&pm8841_mpps 0 0 4>;
-			interrupts = <4 0xa0 0 IRQ_TYPE_NONE>,
-				     <4 0xa1 0 IRQ_TYPE_NONE>,
-				     <4 0xa2 0 IRQ_TYPE_NONE>,
-				     <4 0xa3 0 IRQ_TYPE_NONE>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 		};
 
 		temp-alarm@2400 {
-- 
2.30.2


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

* [PATCH v3 22/25] ARM: dts: qcom-pm8941: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (20 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 21/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 23/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
                   ` (5 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8941.dtsi | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index cf8daa2fe144..da00b8f5eecd 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -80,14 +80,8 @@ pm8941_mpps: mpps@a000 {
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-ranges = <&pm8941_mpps 0 0 8>;
-			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
-				     <0 0xa1 0 IRQ_TYPE_NONE>,
-				     <0 0xa2 0 IRQ_TYPE_NONE>,
-				     <0 0xa3 0 IRQ_TYPE_NONE>,
-				     <0 0xa4 0 IRQ_TYPE_NONE>,
-				     <0 0xa5 0 IRQ_TYPE_NONE>,
-				     <0 0xa6 0 IRQ_TYPE_NONE>,
-				     <0 0xa7 0 IRQ_TYPE_NONE>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 		};
 
 		pm8941_temp: temp-alarm@2400 {
-- 
2.30.2


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

* [PATCH v3 23/25] ARM: dts: qcom-pma8084: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (21 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 22/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 24/25] arm64: dts: qcom: pm8916: " Dmitry Baryshkov
                   ` (4 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
index fcee2afe6740..7b8a8d9695da 100644
--- a/arch/arm/boot/dts/qcom-pma8084.dtsi
+++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
@@ -43,14 +43,8 @@ pma8084_mpps: mpps@a000 {
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-ranges = <&pma8084_mpps 0 0 8>;
-			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
-				     <0 0xa1 0 IRQ_TYPE_NONE>,
-				     <0 0xa2 0 IRQ_TYPE_NONE>,
-				     <0 0xa3 0 IRQ_TYPE_NONE>,
-				     <0 0xa4 0 IRQ_TYPE_NONE>,
-				     <0 0xa5 0 IRQ_TYPE_NONE>,
-				     <0 0xa6 0 IRQ_TYPE_NONE>,
-				     <0 0xa7 0 IRQ_TYPE_NONE>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 		};
 
 		pma8084_temp: temp-alarm@2400 {
-- 
2.30.2


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

* [PATCH v3 24/25] arm64: dts: qcom: pm8916: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (22 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 23/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-08  1:25 ` [PATCH v3 25/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
                   ` (3 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8916.dtsi | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index 7d9e25dd9e3a..55a386d05809 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -96,10 +96,8 @@ pm8916_mpps: mpps@a000 {
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-ranges = <&pm8916_mpps 0 0 4>;
-			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
-				     <0 0xa1 0 IRQ_TYPE_NONE>,
-				     <0 0xa2 0 IRQ_TYPE_NONE>,
-				     <0 0xa3 0 IRQ_TYPE_NONE>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 		};
 
 		pm8916_gpios: gpios@c000 {
-- 
2.30.2


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

* [PATCH v3 25/25] arm64: dts: qcom: pm8994: add interrupt controller properties
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (23 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 24/25] arm64: dts: qcom: pm8916: " Dmitry Baryshkov
@ 2021-10-08  1:25 ` Dmitry Baryshkov
  2021-10-12 23:59 ` Linus Walleij
                   ` (2 subsequent siblings)
  27 siblings, 0 replies; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-08  1:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij, Rob Herring
  Cc: linux-gpio, devicetree, linux-arm-msm

Now that the pmic-mpp is a proper hierarchical IRQ chip, add interrupt
controller properties ('interrupt-controller' and '#interrupt-cells').
The interrupts property is no longer needed so remove it.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8994.dtsi b/arch/arm64/boot/dts/qcom/pm8994.dtsi
index 88a9d19b60ac..5ab46117d737 100644
--- a/arch/arm64/boot/dts/qcom/pm8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8994.dtsi
@@ -124,14 +124,8 @@ pm8994_mpps: mpps@a000 {
 			gpio-controller;
 			#gpio-cells = <2>;
 			gpio-ranges = <&pm8994_mpps 0 0 8>;
-			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
-				     <0 0xa1 0 IRQ_TYPE_NONE>,
-				     <0 0xa2 0 IRQ_TYPE_NONE>,
-				     <0 0xa3 0 IRQ_TYPE_NONE>,
-				     <0 0xa4 0 IRQ_TYPE_NONE>,
-				     <0 0xa5 0 IRQ_TYPE_NONE>,
-				     <0 0xa6 0 IRQ_TYPE_NONE>,
-				     <0 0xa7 0 IRQ_TYPE_NONE>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 		};
 	};
 
-- 
2.30.2


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

* Re: [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells
  2021-10-08  1:25 ` [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells Dmitry Baryshkov
@ 2021-10-08  2:46   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-10-08  2:46 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Herring, linux-arm-msm, Bjorn Andersson, Linus Walleij,
	linux-gpio, Andy Gross, devicetree

On Fri, 08 Oct 2021 04:25:16 +0300, Dmitry Baryshkov wrote:
> Stop specifying individual interrupts properties. Use #interrupt-cells
> instead as we are switching qcom,spmi-mpp and qcom,ssbi-mpp to
> hierarchical IRQ setup.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1538175


mpp@50: 'gpio-ranges' is a required property
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

mpp@50: 'interrupt-controller' is a required property
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

mpp@50: 'interrupts' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

mpps@50: 'cm3605-mpps', 'interrupts' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml

mpps@50: 'gpio-ranges' is a required property
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-msm8660-surf.dt.yaml

mpps@50: 'interrupt-controller' is a required property
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-msm8660-surf.dt.yaml

mpps@50: 'interrupts' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-msm8660-surf.dt.yaml

mpps@a000: compatible: ['qcom,pm8916-mpp'] is too short
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml

mpps@a000: compatible: ['qcom,pm8994-mpp'] is too short
	arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-db820c.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-ifc6640.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-msft-lumia-octagon-talkman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon-cityman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-ivy.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-karin.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-satsuki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-suzuran.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dt.yaml

mpps@a000: 'gpio-ranges' is a required property
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml
	arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-db820c.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-ifc6640.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-msft-lumia-octagon-talkman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon-cityman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-ivy.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-karin.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-satsuki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-suzuran.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

mpps@a000: 'interrupt-controller' is a required property
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml
	arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-db820c.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-ifc6640.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-msft-lumia-octagon-talkman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon-cityman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-ivy.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-karin.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-satsuki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-suzuran.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

mpps@a000: 'interrupts' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-db820c.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-ifc6640.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-msft-lumia-octagon-talkman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon-cityman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-ivy.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-karin.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-satsuki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-suzuran.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

mpps@a000: 'interrupts', 'pm8916-mpp4', 'pm8916-mpps-leds' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml


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

* Re: [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes
  2021-10-08  1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
@ 2021-10-08  2:46   ` Rob Herring
  2021-10-17 21:28   ` Linus Walleij
  2021-10-18 18:40   ` Rob Herring
  2 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-10-08  2:46 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Herring, Andy Gross, linux-gpio, Linus Walleij,
	linux-arm-msm, Bjorn Andersson, devicetree

On Fri, 08 Oct 2021 04:25:01 +0300, Dmitry Baryshkov wrote:
> Add gpio@[0-9a-f]+, mpps@[0-9a-f]+ and xoadc@[0-9a-f]+ as possible child
> nodes of qcom,pm8xxx, referencing existint schema files. Schema for
> other possible nodes does not exist yet.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/mfd/qcom-pm8xxx.yaml         | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1538158


pmic@0: compatible:0: 'qcom,pm8018' is not one of ['qcom,pm8058', 'qcom,pm8821', 'qcom,pm8921']
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: compatible: Additional items are not allowed ('qcom,pm8921' was unexpected)
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: compatible: ['qcom,pm8018', 'qcom,pm8921'] is too long
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: gpio@150: 'ak8975-gpios', 'bmp085-gpios', 'cm3605-gpios', 'ethernet-gpios', 'mpu3050-gpios', 'sdcc3-gpios', 'sdcc5-gpios', 'veth-gpios' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml

pmic@0: gpio@150: 'gpio-keys-pin-active' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml

pmic@0: gpio@150: 'nled', 'wlan-gpios' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml

pmic@0: gpio@150: 'reg' is a required property
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: gpio@150: 'usb_vbus_5v_pins' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: gpio@150: 'wlan-gpios' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml

pmic@0: 'keypad@148', 'led@131', 'led@132', 'led@133', 'led@48', 'pwrkey@1c', 'vibrator@4a' do not match any of the regexes: 'gpio@[0-9a-f]+$', 'mpps@[0-9a-f]+$', 'pinctrl-[0-9]+', 'rtc@[0-9a-f]+$', 'xoadc@[0-9a-f]+$'
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml

pmic@0: 'keypad@148', 'pwrkey@1c' do not match any of the regexes: 'gpio@[0-9a-f]+$', 'mpps@[0-9a-f]+$', 'pinctrl-[0-9]+', 'rtc@[0-9a-f]+$', 'xoadc@[0-9a-f]+$'
	arch/arm/boot/dts/qcom-msm8960-cdp.dt.yaml

pmic@0: 'keypad@148', 'pwrkey@1c', 'vibrator@4a' do not match any of the regexes: 'gpio@[0-9a-f]+$', 'mpps@[0-9a-f]+$', 'pinctrl-[0-9]+', 'rtc@[0-9a-f]+$', 'xoadc@[0-9a-f]+$'
	arch/arm/boot/dts/qcom-msm8660-surf.dt.yaml

pmic@0: 'mpp@50', 'pwrkey@1c' do not match any of the regexes: 'gpio@[0-9a-f]+$', 'mpps@[0-9a-f]+$', 'pinctrl-[0-9]+', 'rtc@[0-9a-f]+$', 'xoadc@[0-9a-f]+$'
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: mpps@50: 'cm3605-mpps' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml

pmic@0: mpps@50: 'gpio-ranges' is a required property
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-msm8660-surf.dt.yaml

pmic@0: 'pwrkey@1c' does not match any of the regexes: 'gpio@[0-9a-f]+$', 'mpps@[0-9a-f]+$', 'pinctrl-[0-9]+', 'rtc@[0-9a-f]+$', 'xoadc@[0-9a-f]+$'
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml

pmic@0: rtc@11d:compatible: Additional items are not allowed ('qcom,pm8921-rtc' was unexpected)
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: rtc@11d:compatible: ['qcom,pm8018-rtc', 'qcom,pm8921-rtc'] is too long
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

pmic@0: xoadc@197: 'mpp5@5', 'mpp6@6', 'mpp7@7', 'mpp8@8', 'mpp9@9' do not match any of the regexes: '^(adc-channel@)[0-9a-f]$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml

pmic@1: mpps@50: 'gpio-ranges' is a required property
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml


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

* Re: [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML
  2021-10-08  1:25 ` [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML Dmitry Baryshkov
@ 2021-10-08  2:46   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-10-08  2:46 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Herring, Andy Gross, Linus Walleij, linux-arm-msm,
	devicetree, linux-gpio, Bjorn Andersson

On Fri, 08 Oct 2021 04:25:00 +0300, Dmitry Baryshkov wrote:
> Convert Qualcomm PMIC MPP bindings from .txt to .yaml format.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,pmic-mpp.txt        | 187 -----------------
>  .../bindings/pinctrl/qcom,pmic-mpp.yaml       | 188 ++++++++++++++++++
>  2 files changed, 188 insertions(+), 187 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1538157


mpp@50: 'gpio-ranges' is a required property
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dt.yaml

mpps@50: 'cm3605-mpps' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml

mpps@50: 'gpio-ranges' is a required property
	arch/arm/boot/dts/qcom-apq8060-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-msm8660-surf.dt.yaml

mpps@a000: compatible: ['qcom,pm8916-mpp'] is too short
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml

mpps@a000: compatible: ['qcom,pm8994-mpp'] is too short
	arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-db820c.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-ifc6640.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-msft-lumia-octagon-talkman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon-cityman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-ivy.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-karin.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-satsuki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-suzuran.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dt.yaml

mpps@a000: 'gpio-ranges' is a required property
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml
	arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-db820c.dt.yaml
	arch/arm64/boot/dts/qcom/apq8096-ifc6640.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-mtp.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dt.yaml
	arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-msft-lumia-octagon-talkman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon-cityman.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-ivy.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-karin.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-satsuki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dt.yaml
	arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-suzuran.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-pmi8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dt.yaml
	arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

mpps@a000: 'pm8916-mpp4', 'pm8916-mpps-leds' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
	arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml


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

* Re: [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes
  2021-10-08  1:25 ` [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes Dmitry Baryshkov
@ 2021-10-12 23:54   ` Linus Walleij
  0 siblings, 0 replies; 43+ messages in thread
From: Linus Walleij @ 2021-10-12 23:54 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Fri, Oct 8, 2021 at 3:25 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:

> Add gpio-ranges property to mpps device tree nodes, adding the mapping between
> pinctrl and GPIO pins.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re:
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (24 preceding siblings ...)
  2021-10-08  1:25 ` [PATCH v3 25/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
@ 2021-10-12 23:59 ` Linus Walleij
  2021-10-13  3:46   ` Re: Dmitry Baryshkov
  2021-10-17 16:54   ` Re: Bjorn Andersson
  2021-10-17 21:35 ` Re: Linus Walleij
  2021-10-18  0:13 ` (subset) Bjorn Andersson
  27 siblings, 2 replies; 43+ messages in thread
From: Linus Walleij @ 2021-10-12 23:59 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Fri, Oct 8, 2021 at 3:25 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:

> In 2019 (in kernel 5.4) spmi-gpio and ssbi-gpio drivers were converted
> to hierarchical IRQ helpers, however MPP drivers were not converted at
> that moment. Complete this by converting MPP drivers.
>
> Changes since v2:
>  - Add patches fixing/updating mpps nodes in the existing device trees

Thanks a *lot* for being thorough and fixing all this properly!

I am happy to apply the pinctrl portions to the pinctrl tree, I'm
uncertain about Rob's syntax checker robot here, are there real
problems? Sometimes it complains about things being changed
in the DTS files at the same time.

I could apply all of this (including DTS changes) to an immutable
branch and offer to Bjorn if he is fine with the patches and
the general approach.

Yours,
Linus Walleij

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

* Re:
  2021-10-12 23:59 ` Linus Walleij
@ 2021-10-13  3:46   ` Dmitry Baryshkov
  2021-10-13 23:39     ` Re: Linus Walleij
  2021-10-17 16:54   ` Re: Bjorn Andersson
  1 sibling, 1 reply; 43+ messages in thread
From: Dmitry Baryshkov @ 2021-10-13  3:46 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Andy Gross, Bjorn Andersson, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Wed, 13 Oct 2021 at 02:59, Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Fri, Oct 8, 2021 at 3:25 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
>
> > In 2019 (in kernel 5.4) spmi-gpio and ssbi-gpio drivers were converted
> > to hierarchical IRQ helpers, however MPP drivers were not converted at
> > that moment. Complete this by converting MPP drivers.
> >
> > Changes since v2:
> >  - Add patches fixing/updating mpps nodes in the existing device trees
>
> Thanks a *lot* for being thorough and fixing all this properly!
>
> I am happy to apply the pinctrl portions to the pinctrl tree, I'm
> uncertain about Rob's syntax checker robot here, are there real
> problems? Sometimes it complains about things being changed
> in the DTS files at the same time.

Rob's checker reports issue that are being fixed by respective
patches. I think I've updated all dts entries for the mpp devices tree
nodes.

> I could apply all of this (including DTS changes) to an immutable
> branch and offer to Bjorn if he is fine with the patches and
> the general approach.

I'm fine with either approach.

-- 
With best wishes
Dmitry

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

* Re:
  2021-10-13  3:46   ` Re: Dmitry Baryshkov
@ 2021-10-13 23:39     ` Linus Walleij
  0 siblings, 0 replies; 43+ messages in thread
From: Linus Walleij @ 2021-10-13 23:39 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Wed, Oct 13, 2021 at 5:46 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
> On Wed, 13 Oct 2021 at 02:59, Linus Walleij <linus.walleij@linaro.org> wrote:

> > I am happy to apply the pinctrl portions to the pinctrl tree, I'm
> > uncertain about Rob's syntax checker robot here, are there real
> > problems? Sometimes it complains about things being changed
> > in the DTS files at the same time.
>
> Rob's checker reports issue that are being fixed by respective
> patches. I think I've updated all dts entries for the mpp devices tree
> nodes.
>
> > I could apply all of this (including DTS changes) to an immutable
> > branch and offer to Bjorn if he is fine with the patches and
> > the general approach.
>
> I'm fine with either approach.

Let's see what Bjorn says, if nothing happens poke me again and I'll
create an immutable branch and merge it.

Yours,
Linus Walleij

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

* Re: [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts
  2021-10-08  1:25 ` [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts Dmitry Baryshkov
@ 2021-10-17 16:52   ` Bjorn Andersson
  0 siblings, 0 replies; 43+ messages in thread
From: Bjorn Andersson @ 2021-10-17 16:52 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Linus Walleij, Rob Herring, linux-gpio, devicetree,
	linux-arm-msm

On Thu 07 Oct 20:25 CDT 2021, Dmitry Baryshkov wrote:

> The probing of this driver calls platform_irq_count, which will
> setup all of the IRQs that are configured in device tree. In
> preparation for converting this driver to be a hierarchical IRQ
> chip, hardcode the IRQ count based on the hardware type so that all
> the IRQs are not configured immediately and are configured on an
> as-needed basis later in the boot process.
> 
> This change will also allow for the removal of the interrupts property
> later in this patch series once the hierarchical IRQ chip support is in.
> 
> This patch also removes the generic qcom,ssbi-mpp OF match since we
> don't know the number of pins. All of the existing upstream bindings
> already include the more-specific binding.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 22 ++++++++--------------
>  1 file changed, 8 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> index 92e7f2602847..a90cada1d657 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> @@ -733,13 +733,12 @@ static int pm8xxx_pin_populate(struct pm8xxx_mpp *pctrl,
>  }
>  
>  static const struct of_device_id pm8xxx_mpp_of_match[] = {
> -	{ .compatible = "qcom,pm8018-mpp" },
> -	{ .compatible = "qcom,pm8038-mpp" },
> -	{ .compatible = "qcom,pm8058-mpp" },
> -	{ .compatible = "qcom,pm8917-mpp" },
> -	{ .compatible = "qcom,pm8821-mpp" },
> -	{ .compatible = "qcom,pm8921-mpp" },
> -	{ .compatible = "qcom,ssbi-mpp" },
> +	{ .compatible = "qcom,pm8018-mpp", .data = (void *) 6 },
> +	{ .compatible = "qcom,pm8038-mpp", .data = (void *) 6 },
> +	{ .compatible = "qcom,pm8058-mpp", .data = (void *) 12 },
> +	{ .compatible = "qcom,pm8821-mpp", .data = (void *) 4 },
> +	{ .compatible = "qcom,pm8917-mpp", .data = (void *) 10 },
> +	{ .compatible = "qcom,pm8921-mpp", .data = (void *) 12 },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(of, pm8xxx_mpp_of_match);
> @@ -750,19 +749,14 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  	struct pinctrl_pin_desc *pins;
>  	struct pm8xxx_mpp *pctrl;
>  	int ret;
> -	int i, npins;
> +	int i;
>  
>  	pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
>  	if (!pctrl)
>  		return -ENOMEM;
>  
>  	pctrl->dev = &pdev->dev;
> -	npins = platform_irq_count(pdev);
> -	if (!npins)
> -		return -EINVAL;
> -	if (npins < 0)
> -		return npins;
> -	pctrl->npins = npins;
> +	pctrl->npins = (uintptr_t) device_get_match_data(&pdev->dev);
>  
>  	pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
>  	if (!pctrl->regmap) {
> -- 
> 2.30.2
> 

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

* Re: [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip
  2021-10-08  1:25 ` [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
@ 2021-10-17 16:53   ` Bjorn Andersson
  0 siblings, 0 replies; 43+ messages in thread
From: Bjorn Andersson @ 2021-10-17 16:53 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Linus Walleij, Rob Herring, linux-gpio, devicetree,
	linux-arm-msm

On Thu 07 Oct 20:25 CDT 2021, Dmitry Baryshkov wrote:

> ssbi-mpp did not have any irqchip support so consumers of this in
> device tree would need to call gpio[d]_to_irq() in order to get the
> proper IRQ on the underlying PMIC. IRQ chips in device tree should be
> usable from the start without the consumer having to make an additional
> call to get the proper IRQ on the parent. This patch adds hierarchical
> IRQ chip support to the ssbi-mpp code to correct this issue.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 111 ++++++++++++++++++++----
>  1 file changed, 93 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> index a90cada1d657..842940594c4a 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> @@ -87,7 +87,6 @@
>  /**
>   * struct pm8xxx_pin_data - dynamic configuration for a pin
>   * @reg:		address of the control register
> - * @irq:		IRQ from the PMIC interrupt controller
>   * @mode:		operating mode for the pin (digital, analog or current sink)
>   * @input:		pin is input
>   * @output:		pin is output
> @@ -103,7 +102,6 @@
>   */
>  struct pm8xxx_pin_data {
>  	unsigned reg;
> -	int irq;
>  
>  	u8 mode;
>  
> @@ -126,6 +124,7 @@ struct pm8xxx_mpp {
>  	struct regmap *regmap;
>  	struct pinctrl_dev *pctrl;
>  	struct gpio_chip chip;
> +	struct irq_chip irq;
>  
>  	struct pinctrl_desc desc;
>  	unsigned npins;
> @@ -148,6 +147,8 @@ static const struct pin_config_item pm8xxx_conf_items[] = {
>  #endif
>  
>  #define PM8XXX_MAX_MPPS	12
> +#define PM8XXX_MPP_PHYSICAL_OFFSET    1
> +
>  static const char * const pm8xxx_groups[PM8XXX_MAX_MPPS] = {
>  	"mpp1", "mpp2", "mpp3", "mpp4", "mpp5", "mpp6", "mpp7", "mpp8",
>  	"mpp9", "mpp10", "mpp11", "mpp12",
> @@ -492,12 +493,16 @@ static int pm8xxx_mpp_get(struct gpio_chip *chip, unsigned offset)
>  	struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip);
>  	struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data;
>  	bool state;
> -	int ret;
> +	int ret, irq;
>  
>  	if (!pin->input)
>  		return !!pin->output_value;
>  
> -	ret = irq_get_irqchip_state(pin->irq, IRQCHIP_STATE_LINE_LEVEL, &state);
> +	irq = chip->to_irq(chip, offset);
> +	if (irq < 0)
> +		return irq;
> +
> +	ret = irq_get_irqchip_state(irq, IRQCHIP_STATE_LINE_LEVEL, &state);
>  	if (!ret)
>  		ret = !!state;
>  
> @@ -524,18 +529,10 @@ static int pm8xxx_mpp_of_xlate(struct gpio_chip *chip,
>  	if (flags)
>  		*flags = gpio_desc->args[1];
>  
> -	return gpio_desc->args[0] - 1;
> +	return gpio_desc->args[0] - PM8XXX_MPP_PHYSICAL_OFFSET;
>  }
>  
>  
> -static int pm8xxx_mpp_to_irq(struct gpio_chip *chip, unsigned offset)
> -{
> -	struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip);
> -	struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data;
> -
> -	return pin->irq;
> -}
> -
>  #ifdef CONFIG_DEBUG_FS
>  #include <linux/seq_file.h>
>  
> @@ -558,7 +555,7 @@ static void pm8xxx_mpp_dbg_show_one(struct seq_file *s,
>  		"abus3",
>  	};
>  
> -	seq_printf(s, " mpp%-2d:", offset + 1);
> +	seq_printf(s, " mpp%-2d:", offset + PM8XXX_MPP_PHYSICAL_OFFSET);
>  
>  	switch (pin->mode) {
>  	case PM8XXX_MPP_DIGITAL:
> @@ -640,7 +637,6 @@ static const struct gpio_chip pm8xxx_mpp_template = {
>  	.get = pm8xxx_mpp_get,
>  	.set = pm8xxx_mpp_set,
>  	.of_xlate = pm8xxx_mpp_of_xlate,
> -	.to_irq = pm8xxx_mpp_to_irq,
>  	.dbg_show = pm8xxx_mpp_dbg_show,
>  	.owner = THIS_MODULE,
>  };
> @@ -732,6 +728,55 @@ static int pm8xxx_pin_populate(struct pm8xxx_mpp *pctrl,
>  	return 0;
>  }
>  
> +static int pm8xxx_mpp_domain_translate(struct irq_domain *domain,
> +				   struct irq_fwspec *fwspec,
> +				   unsigned long *hwirq,
> +				   unsigned int *type)
> +{
> +	struct pm8xxx_mpp *pctrl = container_of(domain->host_data,
> +						 struct pm8xxx_mpp, chip);
> +
> +	if (fwspec->param_count != 2 ||
> +	    fwspec->param[0] < PM8XXX_MPP_PHYSICAL_OFFSET ||
> +	    fwspec->param[0] > pctrl->chip.ngpio)
> +		return -EINVAL;
> +
> +	*hwirq = fwspec->param[0] - PM8XXX_MPP_PHYSICAL_OFFSET;
> +	*type = fwspec->param[1];
> +
> +	return 0;
> +}
> +
> +static unsigned int pm8xxx_mpp_child_offset_to_irq(struct gpio_chip *chip,
> +						   unsigned int offset)
> +{
> +	return offset + PM8XXX_MPP_PHYSICAL_OFFSET;
> +}
> +
> +static int pm8821_mpp_child_to_parent_hwirq(struct gpio_chip *chip,
> +					    unsigned int child_hwirq,
> +					    unsigned int child_type,
> +					    unsigned int *parent_hwirq,
> +					    unsigned int *parent_type)
> +{
> +	*parent_hwirq = child_hwirq + 24;
> +	*parent_type = child_type;
> +
> +	return 0;
> +}
> +
> +static int pm8xxx_mpp_child_to_parent_hwirq(struct gpio_chip *chip,
> +					    unsigned int child_hwirq,
> +					    unsigned int child_type,
> +					    unsigned int *parent_hwirq,
> +					    unsigned int *parent_type)
> +{
> +	*parent_hwirq = child_hwirq + 0x80;
> +	*parent_type = child_type;
> +
> +	return 0;
> +}
> +
>  static const struct of_device_id pm8xxx_mpp_of_match[] = {
>  	{ .compatible = "qcom,pm8018-mpp", .data = (void *) 6 },
>  	{ .compatible = "qcom,pm8038-mpp", .data = (void *) 6 },
> @@ -746,7 +791,10 @@ MODULE_DEVICE_TABLE(of, pm8xxx_mpp_of_match);
>  static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  {
>  	struct pm8xxx_pin_data *pin_data;
> +	struct irq_domain *parent_domain;
> +	struct device_node *parent_node;
>  	struct pinctrl_pin_desc *pins;
> +	struct gpio_irq_chip *girq;
>  	struct pm8xxx_mpp *pctrl;
>  	int ret;
>  	int i;
> @@ -783,9 +831,6 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  
>  	for (i = 0; i < pctrl->desc.npins; i++) {
>  		pin_data[i].reg = SSBI_REG_ADDR_MPP(i);
> -		pin_data[i].irq = platform_get_irq(pdev, i);
> -		if (pin_data[i].irq < 0)
> -			return pin_data[i].irq;
>  
>  		ret = pm8xxx_pin_populate(pctrl, &pin_data[i]);
>  		if (ret)
> @@ -816,6 +861,36 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  	pctrl->chip.of_gpio_n_cells = 2;
>  	pctrl->chip.label = dev_name(pctrl->dev);
>  	pctrl->chip.ngpio = pctrl->npins;
> +
> +	parent_node = of_irq_find_parent(pctrl->dev->of_node);
> +	if (!parent_node)
> +		return -ENXIO;
> +
> +	parent_domain = irq_find_host(parent_node);
> +	of_node_put(parent_node);
> +	if (!parent_domain)
> +		return -ENXIO;
> +
> +	pctrl->irq.name = "ssbi-mpp";
> +	pctrl->irq.irq_mask_ack = irq_chip_mask_ack_parent;
> +	pctrl->irq.irq_unmask = irq_chip_unmask_parent;
> +	pctrl->irq.irq_set_type = irq_chip_set_type_parent;
> +	pctrl->irq.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE;
> +
> +	girq = &pctrl->chip.irq;
> +	girq->chip = &pctrl->irq;
> +	girq->default_type = IRQ_TYPE_NONE;
> +	girq->handler = handle_level_irq;
> +	girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node);
> +	girq->parent_domain = parent_domain;
> +	if (of_device_is_compatible(pdev->dev.of_node, "qcom,pm8821-mpp"))
> +		girq->child_to_parent_hwirq = pm8821_mpp_child_to_parent_hwirq;
> +	else
> +		girq->child_to_parent_hwirq = pm8xxx_mpp_child_to_parent_hwirq;
> +	girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_twocell;
> +	girq->child_offset_to_irq = pm8xxx_mpp_child_offset_to_irq;
> +	girq->child_irq_domain_ops.translate = pm8xxx_mpp_domain_translate;
> +
>  	ret = gpiochip_add_data(&pctrl->chip, pctrl);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed register gpiochip\n");
> -- 
> 2.30.2
> 

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

* Re: [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts
  2021-10-08  1:25 ` [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts Dmitry Baryshkov
@ 2021-10-17 16:53   ` Bjorn Andersson
  0 siblings, 0 replies; 43+ messages in thread
From: Bjorn Andersson @ 2021-10-17 16:53 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Linus Walleij, Rob Herring, linux-gpio, devicetree,
	linux-arm-msm

On Thu 07 Oct 20:25 CDT 2021, Dmitry Baryshkov wrote:

> The probing of this driver calls platform_irq_count, which will
> setup all of the IRQs that are configured in device tree. In
> preparation for converting this driver to be a hierarchical IRQ
> chip, hardcode the IRQ count based on the hardware type so that all
> the IRQs are not configured immediately and are configured on an
> as-needed basis later in the boot process.
> 
> This change will also allow for the removal of the interrupts property
> later in this patch series once the hierarchical IRQ chip support is in.
> 
> This patch also removes the generic qcom,spmi-mpp OF match since we
> don't know the number of pins. All of the existing upstream bindings
> already include the more-specific binding.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 25 ++++++++++---------------
>  1 file changed, 10 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> index 2da9b5f68f3f..a9f994863126 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> @@ -812,11 +812,7 @@ static int pmic_mpp_probe(struct platform_device *pdev)
>  		return ret;
>  	}
>  
> -	npins = platform_irq_count(pdev);
> -	if (!npins)
> -		return -EINVAL;
> -	if (npins < 0)
> -		return npins;
> +	npins = (uintptr_t) device_get_match_data(&pdev->dev);
>  
>  	BUG_ON(npins > ARRAY_SIZE(pmic_mpp_groups));
>  
> @@ -912,16 +908,15 @@ static int pmic_mpp_remove(struct platform_device *pdev)
>  }
>  
>  static const struct of_device_id pmic_mpp_of_match[] = {
> -	{ .compatible = "qcom,pm8019-mpp" },	/* 6 MPP's */
> -	{ .compatible = "qcom,pm8841-mpp" },	/* 4 MPP's */
> -	{ .compatible = "qcom,pm8916-mpp" },	/* 4 MPP's */
> -	{ .compatible = "qcom,pm8941-mpp" },	/* 8 MPP's */
> -	{ .compatible = "qcom,pm8950-mpp" },	/* 4 MPP's */
> -	{ .compatible = "qcom,pmi8950-mpp" },	/* 4 MPP's */
> -	{ .compatible = "qcom,pm8994-mpp" },	/* 8 MPP's */
> -	{ .compatible = "qcom,pma8084-mpp" },	/* 8 MPP's */
> -	{ .compatible = "qcom,pmi8994-mpp" },	/* 4 MPP's */
> -	{ .compatible = "qcom,spmi-mpp" },	/* Generic */
> +	{ .compatible = "qcom,pm8019-mpp", .data = (void *) 6 },
> +	{ .compatible = "qcom,pm8841-mpp", .data = (void *) 4 },
> +	{ .compatible = "qcom,pm8916-mpp", .data = (void *) 4 },
> +	{ .compatible = "qcom,pm8941-mpp", .data = (void *) 8 },
> +	{ .compatible = "qcom,pm8950-mpp", .data = (void *) 4 },
> +	{ .compatible = "qcom,pmi8950-mpp", .data = (void *) 4 },
> +	{ .compatible = "qcom,pm8994-mpp", .data = (void *) 8 },
> +	{ .compatible = "qcom,pma8084-mpp", .data = (void *) 8 },
> +	{ .compatible = "qcom,pmi8994-mpp", .data = (void *) 4 },
>  	{ },
>  };
>  
> -- 
> 2.30.2
> 

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

* Re: [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip
  2021-10-08  1:25 ` [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
@ 2021-10-17 16:53   ` Bjorn Andersson
  0 siblings, 0 replies; 43+ messages in thread
From: Bjorn Andersson @ 2021-10-17 16:53 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Linus Walleij, Rob Herring, linux-gpio, devicetree,
	linux-arm-msm

On Thu 07 Oct 20:25 CDT 2021, Dmitry Baryshkov wrote:

> spmi-mpp did not have any irqchip support so consumers of this in
> device tree would need to call gpio[d]_to_irq() in order to get the
> proper IRQ on the underlying PMIC. IRQ chips in device tree should be
> usable from the start without the consumer having to make an additional
> call to get the proper IRQ on the parent. This patch adds hierarchical
> IRQ chip support to the spmi-mpp code to correct this issue.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 86 ++++++++++++++++++++-----
>  1 file changed, 69 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> index a9f994863126..b80723928b7e 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> @@ -103,7 +103,6 @@
>  /**
>   * struct pmic_mpp_pad - keep current MPP settings
>   * @base: Address base in SPMI device.
> - * @irq: IRQ number which this MPP generate.
>   * @is_enabled: Set to false when MPP should be put in high Z state.
>   * @out_value: Cached pin output value.
>   * @output_enabled: Set to true if MPP output logic is enabled.
> @@ -121,7 +120,6 @@
>   */
>  struct pmic_mpp_pad {
>  	u16		base;
> -	int		irq;
>  	bool		is_enabled;
>  	bool		out_value;
>  	bool		output_enabled;
> @@ -143,6 +141,7 @@ struct pmic_mpp_state {
>  	struct regmap	*map;
>  	struct pinctrl_dev *ctrl;
>  	struct gpio_chip chip;
> +	struct irq_chip irq;
>  };
>  
>  static const struct pinconf_generic_params pmic_mpp_bindings[] = {
> @@ -622,16 +621,6 @@ static int pmic_mpp_of_xlate(struct gpio_chip *chip,
>  	return gpio_desc->args[0] - PMIC_MPP_PHYSICAL_OFFSET;
>  }
>  
> -static int pmic_mpp_to_irq(struct gpio_chip *chip, unsigned pin)
> -{
> -	struct pmic_mpp_state *state = gpiochip_get_data(chip);
> -	struct pmic_mpp_pad *pad;
> -
> -	pad = state->ctrl->desc->pins[pin].drv_data;
> -
> -	return pad->irq;
> -}
> -
>  static void pmic_mpp_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>  {
>  	struct pmic_mpp_state *state = gpiochip_get_data(chip);
> @@ -651,7 +640,6 @@ static const struct gpio_chip pmic_mpp_gpio_template = {
>  	.request		= gpiochip_generic_request,
>  	.free			= gpiochip_generic_free,
>  	.of_xlate		= pmic_mpp_of_xlate,
> -	.to_irq			= pmic_mpp_to_irq,
>  	.dbg_show		= pmic_mpp_dbg_show,
>  };
>  
> @@ -796,13 +784,53 @@ static int pmic_mpp_populate(struct pmic_mpp_state *state,
>  	return 0;
>  }
>  
> +static int pmic_mpp_domain_translate(struct irq_domain *domain,
> +				      struct irq_fwspec *fwspec,
> +				      unsigned long *hwirq,
> +				      unsigned int *type)
> +{
> +	struct pmic_mpp_state *state = container_of(domain->host_data,
> +						     struct pmic_mpp_state,
> +						     chip);
> +
> +	if (fwspec->param_count != 2 ||
> +	    fwspec->param[0] < 1 || fwspec->param[0] > state->chip.ngpio)
> +		return -EINVAL;
> +
> +	*hwirq = fwspec->param[0] - PMIC_MPP_PHYSICAL_OFFSET;
> +	*type = fwspec->param[1];
> +
> +	return 0;
> +}
> +
> +static unsigned int pmic_mpp_child_offset_to_irq(struct gpio_chip *chip,
> +						  unsigned int offset)
> +{
> +	return offset + PMIC_MPP_PHYSICAL_OFFSET;
> +}
> +
> +static int pmic_mpp_child_to_parent_hwirq(struct gpio_chip *chip,
> +					   unsigned int child_hwirq,
> +					   unsigned int child_type,
> +					   unsigned int *parent_hwirq,
> +					   unsigned int *parent_type)
> +{
> +	*parent_hwirq = child_hwirq + 0xc0;
> +	*parent_type = child_type;
> +
> +	return 0;
> +}
> +
>  static int pmic_mpp_probe(struct platform_device *pdev)
>  {
> +	struct irq_domain *parent_domain;
> +	struct device_node *parent_node;
>  	struct device *dev = &pdev->dev;
>  	struct pinctrl_pin_desc *pindesc;
>  	struct pinctrl_desc *pctrldesc;
>  	struct pmic_mpp_pad *pad, *pads;
>  	struct pmic_mpp_state *state;
> +	struct gpio_irq_chip *girq;
>  	int ret, npins, i;
>  	u32 reg;
>  
> @@ -857,10 +885,6 @@ static int pmic_mpp_probe(struct platform_device *pdev)
>  		pindesc->number = i;
>  		pindesc->name = pmic_mpp_groups[i];
>  
> -		pad->irq = platform_get_irq(pdev, i);
> -		if (pad->irq < 0)
> -			return pad->irq;
> -
>  		pad->base = reg + i * PMIC_MPP_ADDRESS_RANGE;
>  
>  		ret = pmic_mpp_populate(state, pad);
> @@ -880,6 +904,34 @@ static int pmic_mpp_probe(struct platform_device *pdev)
>  	if (IS_ERR(state->ctrl))
>  		return PTR_ERR(state->ctrl);
>  
> +	parent_node = of_irq_find_parent(state->dev->of_node);
> +	if (!parent_node)
> +		return -ENXIO;
> +
> +	parent_domain = irq_find_host(parent_node);
> +	of_node_put(parent_node);
> +	if (!parent_domain)
> +		return -ENXIO;
> +
> +	state->irq.name = "spmi-mpp",
> +	state->irq.irq_ack = irq_chip_ack_parent,
> +	state->irq.irq_mask = irq_chip_mask_parent,
> +	state->irq.irq_unmask = irq_chip_unmask_parent,
> +	state->irq.irq_set_type = irq_chip_set_type_parent,
> +	state->irq.irq_set_wake = irq_chip_set_wake_parent,
> +	state->irq.flags = IRQCHIP_MASK_ON_SUSPEND,
> +
> +	girq = &state->chip.irq;
> +	girq->chip = &state->irq;
> +	girq->default_type = IRQ_TYPE_NONE;
> +	girq->handler = handle_level_irq;
> +	girq->fwnode = of_node_to_fwnode(state->dev->of_node);
> +	girq->parent_domain = parent_domain;
> +	girq->child_to_parent_hwirq = pmic_mpp_child_to_parent_hwirq;
> +	girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_fourcell;
> +	girq->child_offset_to_irq = pmic_mpp_child_offset_to_irq;
> +	girq->child_irq_domain_ops.translate = pmic_mpp_domain_translate;
> +
>  	ret = gpiochip_add_data(&state->chip, state);
>  	if (ret) {
>  		dev_err(state->dev, "can't add gpio chip\n");
> -- 
> 2.30.2
> 

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

* Re:
  2021-10-12 23:59 ` Linus Walleij
  2021-10-13  3:46   ` Re: Dmitry Baryshkov
@ 2021-10-17 16:54   ` Bjorn Andersson
  2021-10-17 21:31     ` Re: Linus Walleij
  1 sibling, 1 reply; 43+ messages in thread
From: Bjorn Andersson @ 2021-10-17 16:54 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Dmitry Baryshkov, Andy Gross, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Tue 12 Oct 18:59 CDT 2021, Linus Walleij wrote:

> On Fri, Oct 8, 2021 at 3:25 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> 
> > In 2019 (in kernel 5.4) spmi-gpio and ssbi-gpio drivers were converted
> > to hierarchical IRQ helpers, however MPP drivers were not converted at
> > that moment. Complete this by converting MPP drivers.
> >
> > Changes since v2:
> >  - Add patches fixing/updating mpps nodes in the existing device trees
> 
> Thanks a *lot* for being thorough and fixing all this properly!
> 
> I am happy to apply the pinctrl portions to the pinctrl tree, I'm
> uncertain about Rob's syntax checker robot here, are there real
> problems? Sometimes it complains about things being changed
> in the DTS files at the same time.
> 
> I could apply all of this (including DTS changes) to an immutable
> branch and offer to Bjorn if he is fine with the patches and
> the general approach.
> 

I like the driver changes and I'm wrapping up a second pull for the dts
pieces in the coming few days. So if you're happy to take the driver
patches I'll include the DT changes for 5.16 as well.

Thanks,
Bjorn

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

* Re: [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes
  2021-10-08  1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
  2021-10-08  2:46   ` Rob Herring
@ 2021-10-17 21:28   ` Linus Walleij
  2021-10-18 18:40   ` Rob Herring
  2 siblings, 0 replies; 43+ messages in thread
From: Linus Walleij @ 2021-10-17 21:28 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Fri, Oct 8, 2021 at 3:25 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:

> Add gpio@[0-9a-f]+, mpps@[0-9a-f]+ and xoadc@[0-9a-f]+ as possible child
> nodes of qcom,pm8xxx, referencing existint schema files. Schema for
> other possible nodes does not exist yet.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re:
  2021-10-17 16:54   ` Re: Bjorn Andersson
@ 2021-10-17 21:31     ` Linus Walleij
  0 siblings, 0 replies; 43+ messages in thread
From: Linus Walleij @ 2021-10-17 21:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Dmitry Baryshkov, Andy Gross, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

On Sun, Oct 17, 2021 at 6:54 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:

> I like the driver changes and I'm wrapping up a second pull for the dts
> pieces in the coming few days. So if you're happy to take the driver
> patches I'll include the DT changes for 5.16 as well.

OK let's do like that. I'll queue the binding changes and driver
changes so we finally get this fixed up.

Yours,
Linus Walleij

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

* Re:
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (25 preceding siblings ...)
  2021-10-12 23:59 ` Linus Walleij
@ 2021-10-17 21:35 ` Linus Walleij
  2021-10-18  0:13 ` (subset) Bjorn Andersson
  27 siblings, 0 replies; 43+ messages in thread
From: Linus Walleij @ 2021-10-17 21:35 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Rob Herring,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, MSM

I queued thes patches in the pinctrl tree for v5.16:

On Fri, Oct 8, 2021 at 3:25 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:

>       dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML
>       pinctrl: qcom: ssbi-mpp: hardcode IRQ counts
>       pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip
>       pinctrl: qcom: spmi-mpp: hardcode IRQ counts
>       pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip
>       dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells

Any breakages will be fixed when Bjorn applies the DTS changes to his
tree.

I wonder about the MFD patch, maybe Lee can expedite merging that too
or ACK it for Bjorn to merge with the remainders.

Yours,
Linus Walleij

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

* Re: (subset)
  2021-10-08  1:24 Dmitry Baryshkov
                   ` (26 preceding siblings ...)
  2021-10-17 21:35 ` Re: Linus Walleij
@ 2021-10-18  0:13 ` Bjorn Andersson
  27 siblings, 0 replies; 43+ messages in thread
From: Bjorn Andersson @ 2021-10-18  0:13 UTC (permalink / raw)
  To: Andy Gross, Linus Walleij, Dmitry Baryshkov, Rob Herring
  Cc: devicetree, linux-arm-msm, linux-gpio

On Fri, 8 Oct 2021 04:24:59 +0300, Dmitry Baryshkov wrote:
> In 2019 (in kernel 5.4) spmi-gpio and ssbi-gpio drivers were converted
> to hierarchical IRQ helpers, however MPP drivers were not converted at
> that moment. Complete this by converting MPP drivers.
> 
> Changes since v2:
>  - Add patches fixing/updating mpps nodes in the existing device trees
> 
> [...]

Applied, thanks!

[03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes
        commit: 9be51f0b16ef83208fbfdc42fe59a622b6beee4c
[04/25] ARM: dts: qcom-msm8660: add gpio-ranges to mpps nodes
        commit: cd1049b631d05ad25b7976cf67144277598e72f2
[05/25] ARM: dts: qcom-pm8841: add gpio-ranges to mpps nodes
        commit: 6a91e584a3a0a247f836f063cbd3d99b1babaf4c
[06/25] ARM: dts: qcom-pm8941: add gpio-ranges to mpps nodes
        commit: 72af8d006b68cb88ae618d812b1053e59b06fe56
[07/25] ARM: dts: qcom-pma8084: add gpio-ranges to mpps nodes
        commit: 50ec4abed12cd0d5d34656330bb82192d607b3b7
[08/25] ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name
        commit: 7cf05e3b457b4d0eea385ad0acec327ee0adc5a1
[09/25] ARM: dts: qcom-apq8060-dragonboard: fix mpps state names
        commit: 636396efe303345cba6b0084b3228cf861d22e36
[18/25] ARM: dts: qcom-apq8064: add interrupt controller properties
        commit: 216f41938d669e7949964c181350cb61b4fdda03
[19/25] ARM: dts: qcom-mdm9615: add interrupt controller properties
        commit: f574aa0b12403dd0f4bef366199bfba860188086
[20/25] ARM: dts: qcom-msm8660: add interrupt controller properties
        commit: 789a247a3f10985ddae58a975e2550a35388ca52
[21/25] ARM: dts: qcom-pm8841: add interrupt controller properties
        commit: 3dca61a70c0453ea02089059d9d435a7b9b104ce
[22/25] ARM: dts: qcom-pm8941: add interrupt controller properties
        commit: 9fb04774f3436f93075b80870fd94e2e68f8bf04
[23/25] ARM: dts: qcom-pma8084: add interrupt controller properties
        commit: a7fe01561e6cda173b1fffb1c8552040933e7588

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

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

* Re: [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes
  2021-10-08  1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
  2021-10-08  2:46   ` Rob Herring
  2021-10-17 21:28   ` Linus Walleij
@ 2021-10-18 18:40   ` Rob Herring
  2 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-10-18 18:40 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Andy Gross, linux-gpio, Linus Walleij,
	Rob Herring, devicetree, linux-arm-msm

On Fri, 08 Oct 2021 04:25:01 +0300, Dmitry Baryshkov wrote:
> Add gpio@[0-9a-f]+, mpps@[0-9a-f]+ and xoadc@[0-9a-f]+ as possible child
> nodes of qcom,pm8xxx, referencing existint schema files. Schema for
> other possible nodes does not exist yet.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/mfd/qcom-pm8xxx.yaml         | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-10-18 18:40 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  1:24 Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML Dmitry Baryshkov
2021-10-08  2:46   ` Rob Herring
2021-10-08  1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
2021-10-08  2:46   ` Rob Herring
2021-10-17 21:28   ` Linus Walleij
2021-10-18 18:40   ` Rob Herring
2021-10-08  1:25 ` [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes Dmitry Baryshkov
2021-10-12 23:54   ` Linus Walleij
2021-10-08  1:25 ` [PATCH v3 04/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 05/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 06/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 07/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 08/25] ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 09/25] ARM: dts: qcom-apq8060-dragonboard: fix mpps state names Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 10/25] arm64: dts: qcom: pm8916: fix mpps device tree node Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 11/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 12/25] arm64: dts: qcom: apq8016-sbc: fix mpps state names Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts Dmitry Baryshkov
2021-10-17 16:52   ` Bjorn Andersson
2021-10-08  1:25 ` [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
2021-10-17 16:53   ` Bjorn Andersson
2021-10-08  1:25 ` [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts Dmitry Baryshkov
2021-10-17 16:53   ` Bjorn Andersson
2021-10-08  1:25 ` [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
2021-10-17 16:53   ` Bjorn Andersson
2021-10-08  1:25 ` [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells Dmitry Baryshkov
2021-10-08  2:46   ` Rob Herring
2021-10-08  1:25 ` [PATCH v3 18/25] ARM: dts: qcom-apq8064: add interrupt controller properties Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 19/25] ARM: dts: qcom-mdm9615: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 20/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 21/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 22/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 23/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 24/25] arm64: dts: qcom: pm8916: " Dmitry Baryshkov
2021-10-08  1:25 ` [PATCH v3 25/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
2021-10-12 23:59 ` Linus Walleij
2021-10-13  3:46   ` Re: Dmitry Baryshkov
2021-10-13 23:39     ` Re: Linus Walleij
2021-10-17 16:54   ` Re: Bjorn Andersson
2021-10-17 21:31     ` Re: Linus Walleij
2021-10-17 21:35 ` Re: Linus Walleij
2021-10-18  0:13 ` (subset) Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.