platform/kernel/linux-starfive.git
2 years agopinctrl: nomadik: Dereference gpio_chip properly
Linus Walleij [Sat, 17 Sep 2022 20:30:35 +0000 (22:30 +0200)]
pinctrl: nomadik: Dereference gpio_chip properly

The irq data passed to irc_chip handlers i the struct gpio_chip
and nothing else. We are just lucky that the nomadik chip
pointer is first in the struct. Use the proper dereferencing
and helpers.

Reported-by: Marc Zyngier <maz@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220917203036.167607-1-linus.walleij@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: update bindings for MT7986 SoC
Peter Chiu [Mon, 12 Sep 2022 09:24:40 +0000 (17:24 +0800)]
dt-bindings: pinctrl: update bindings for MT7986 SoC

Add wifi pins in the description and set 'maxItems' for groups and pins.

Reviewed-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220912092440.21011-1-chui-hao.chiu@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agoMerge tag 'samsung-pinctrl-6.1' of https://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Wed, 14 Sep 2022 12:28:47 +0000 (14:28 +0200)]
Merge tag 'samsung-pinctrl-6.1' of https://git./linux/kernel/git/pinctrl/samsung into devel

Samsung pinctrl drivers changes for v6.1

1. Minor fix in order of initializing pinctrl driver - GPIOs should be
   configured before registering gpiolib.
2. Final steps to deprecated bindings headers with register constants.
   The constants were moved to include files in DTS directories, because
   these are not suitable for bindings.  Remove final references and
   mark binding header as deprecated to warn any users.

2 years agopinctrl: ocelot: add help and description information to ocelot pinctrl kconfig
Colin Foster [Fri, 9 Sep 2022 15:38:02 +0000 (08:38 -0700)]
pinctrl: ocelot: add help and description information to ocelot pinctrl kconfig

Add missed help information and module export name to the Microsemi Ocelot
and Jaguar2 SoC.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/20220909153802.3370088-1-colin.foster@in-advantage.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc8280xp-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:39 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc8280xp-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-34-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc8280xp-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:38 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc8280xp-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-33-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc8280xp-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:37 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc8280xp-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-32-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc8180x-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:36 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc8180x-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-31-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc8180x-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:35 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc8180x-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-30-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc8180x-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:34 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc8180x-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-29-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc7280-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:33 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc7280-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-28-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc7280-pinctrl: reference tlmm schema
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:32 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc7280-pinctrl: reference tlmm schema

Qualcomm TLMM pin controller bindings should reference generic TLMM
schema (which also pulls generic pinctrl schema).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-27-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc7280-pinctrl: add gpio-line-names
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:31 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc7280-pinctrl: add gpio-line-names

Add common gpio-line-names property (used on SC7280 Herobrine boards).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-26-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc7280-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:30 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc7280-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-25-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sc7280-pinctrl: correct number of GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:29 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sc7280-pinctrl: correct number of GPIOs

There are 182 GPIOs on SC7280.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-24-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8450-pinctrl: add gpio-line-names
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:28 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8450-pinctrl: add gpio-line-names

Add common gpio-line-names property and restrict gpio-reserved-ranges to
fixed size.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-23-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8450-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:27 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8450-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-22-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8450-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:26 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8450-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-21-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8450-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:25 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8450-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

  qcom/sm4250-oneplus-billie2.dtb: pinctrl@500000: sdc1-on-state: 'oneOf' conditional failed, one must be fixed:
    'pins' is a required property
    'clk', 'cmd', 'data', 'rclk' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[26]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-20-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8350-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:24 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8350-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-19-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8350-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:23 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8350-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-18-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8350-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:22 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8350-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

  sm8350-hdk.dtb: pinctrl@f100000: qup-uart3-default-state: 'oneOf' conditional failed, one must be fixed:
    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-17-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8250-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:21 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8250-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-16-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8250-pinctrl: reference tlmm common pins
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:20 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8250-pinctrl: reference tlmm common pins

Each subnode configuring pins (so the final -pins or pinconf) should
reference common TLMM pin definition.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-15-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm8250-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:19 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm8250-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-14-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6375-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:18 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6375-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6375-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:17 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6375-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6375-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:16 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6375-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6350-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:15 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6350-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6350-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:14 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6350-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6350-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:13 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6350-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6125-pinctrl: extend example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:12 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6125-pinctrl: extend example

Extend example with children for pin configuration and indent it with
4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6125-pinctrl: do not require function on non-GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:11 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6125-pinctrl: do not require function on non-GPIOs

Certain pins, like SDcard related, do not have functions and such should
not be required:

  sdc1-clk-pins: 'function' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6125-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:10 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6125-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6115-pinctrl: fix indentation in example
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:09 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6115-pinctrl: fix indentation in example

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Iskren Chernev <iskren.chernev@gmail.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6115-pinctrl: require function on GPIOs
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:08 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6115-pinctrl: require function on GPIOs

Require function on GPIOs (so not on SD card pins).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Iskren Chernev <iskren.chernev@gmail.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom,sm6115-pinctrl: fix matching pin config
Krzysztof Kozlowski [Mon, 12 Sep 2022 06:17:07 +0000 (08:17 +0200)]
dt-bindings: pinctrl: qcom,sm6115-pinctrl: fix matching pin config

Matching PMIC GPIOs config nodes within a '-state' node by '.*' pattern
does not work as expected because of linux,phandle in the DTB:

    'pins' is a required property
    'function' is a required property
    'rx', 'tx' do not match any of the regexes: 'pinctrl-[0-9]+'
    [[59]] is not of type 'object'

Make the schema stricter and expect such nodes to be followed with a
'-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Iskren Chernev <iskren.chernev@gmail.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220912061746.6311-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Use 'default' in all switch-cases (part 2)
Andy Shevchenko [Thu, 8 Sep 2022 14:21:34 +0000 (17:21 +0300)]
pinctrl: cy8c95x0: Use 'default' in all switch-cases (part 2)

Move the default values to the 'default' case in the switches.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220908142134.59068-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: pistachio: Correct the fwnode_irq_get() return value check
Andy Shevchenko [Thu, 8 Sep 2022 09:43:23 +0000 (12:43 +0300)]
pinctrl: pistachio: Correct the fwnode_irq_get() return value check

fwnode_irq_get() may return all possible signed values, such as Linux
error code or 0. Fix the code to handle this properly.

Fixes: 1074e1d23a5c ("pinctrl: pistachio: Switch to use fwnode instead of")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220908094323.31965-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: qcom: spmi-gpio: Make irqchip immutable
Manivannan Sadhasivam [Tue, 30 Aug 2022 09:22:32 +0000 (14:52 +0530)]
pinctrl: qcom: spmi-gpio: Make irqchip immutable

The irqchip implementation used inside the gpiochips are not supposed to
be changed during runtime. So let's make the one inside the spmi-gpio
gpiochip immutable.

This fixes the below warning during boot:
gpio gpiochip0: (c440000.spmi:pmic@0:gpio@c000): not an immutable chip, please consider fixing it!

Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220830092232.168561-1-manivannan.sadhasivam@linaro.org
[switched two lines as indicated by Johan]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: meson: Switch to use fwnode instead of of_node
Andy Shevchenko [Mon, 5 Sep 2022 18:00:34 +0000 (21:00 +0300)]
pinctrl: meson: Switch to use fwnode instead of of_node

GPIO library now accepts fwnode as a firmware node, so
switch the driver to use it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220905180034.73132-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: microchip-sgpio: Correct the fwnode_irq_get() return value check
Andy Shevchenko [Tue, 6 Sep 2022 11:50:21 +0000 (14:50 +0300)]
pinctrl: microchip-sgpio: Correct the fwnode_irq_get() return value check

fwnode_irq_get() may return all possible signed values, such as Linux
error code. Fix the code to handle this properly.

Fixes: be2dc859abd4 ("pinctrl: pinctrl-microchip-sgpio: Add irq support (for sparx5)")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20220906115021.8661-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: ingenic: Switch to use fwnode instead of of_node
Andy Shevchenko [Mon, 5 Sep 2022 18:51:02 +0000 (21:51 +0300)]
pinctrl: ingenic: Switch to use fwnode instead of of_node

GPIO library now accepts fwnode as a firmware node, so
switch the driver to use it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220905185102.74056-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom: sm6115: Add reserved ranges
Iskren Chernev [Sat, 3 Sep 2022 17:41:45 +0000 (20:41 +0300)]
dt-bindings: pinctrl: qcom: sm6115: Add reserved ranges

Ideally this and similar common properties will be inherited so you
won't need to paste them in every pinctrl binding.

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Link: https://lore.kernel.org/r/20220903174150.3566935-5-iskren.chernev@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: imx8m: kconfig: Fix build error on test compile
Francesco Dolcini [Mon, 5 Sep 2022 22:44:08 +0000 (00:44 +0200)]
pinctrl: imx8m: kconfig: Fix build error on test compile

PINCTRL_IMX depends on OF, however the dependency is missed when selected
by PINCTRL_IMX8M* (it does not follow the indirect 'select' statements),
select it explicitly.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/all/202209050605.fezJUgFH-lkp@intel.com/
Fixes: 87c2a29a6bf1 ("pinctrl: imx8m: kconfig: Depends on SOC_IMX8M")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Link: https://lore.kernel.org/r/20220905224408.346425-1-francesco.dolcini@toradex.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Correct comment style
Andy Shevchenko [Fri, 2 Sep 2022 18:26:50 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Correct comment style

In a few comments the style is not aligned with the rest.
Correct them.

While at it, drop unneeded blank lines and deduplicate 'Author'.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-17-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: use bits.h macros for all masks
Andy Shevchenko [Fri, 2 Sep 2022 18:26:49 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: use bits.h macros for all masks

Make use of the GENMASK() (far less error-prone, far more concise).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-16-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Override IRQ for one of the expanders on Galileo Gen 1
Andy Shevchenko [Fri, 2 Sep 2022 18:26:48 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Override IRQ for one of the expanders on Galileo Gen 1

ACPI table on Intel Galileo Gen 1 has wrong pin number for IRQ resource
of the I²C GPIO expander. Since we know what that number is and luckily
have GPIO bases fixed for SoC's controllers, we may use a simple DMI quirk
to match the platform and retrieve GpioInt() pin on it for the expander in
question.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-15-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: support ACPI device found on Galileo Gen1
Andy Shevchenko [Fri, 2 Sep 2022 18:26:47 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: support ACPI device found on Galileo Gen1

Add support of the expander found on Intel Galileo Gen1 board.
The platform information comes from ACPI.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-14-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Make use of device properties
Andy Shevchenko [Fri, 2 Sep 2022 18:26:46 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Make use of device properties

Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Add mod_devicetable.h include.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-13-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Implement ->pin_dbg_show()
Andy Shevchenko [Fri, 2 Sep 2022 18:26:45 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Implement ->pin_dbg_show()

The introduced callback ->pin_dbg_show() is useful for debugging.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-12-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Use 'default' in all switch-cases
Andy Shevchenko [Fri, 2 Sep 2022 18:26:44 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Use 'default' in all switch-cases

Move the default values to the 'default' case in the switches.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-11-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Remove custom ->set_config()
Andy Shevchenko [Fri, 2 Sep 2022 18:26:43 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Remove custom ->set_config()

Since we have pin configuration getter and setter provided,
there is no need to duplicate that in the custom ->set_config().
Instead, switch to gpiochip_generic_config().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-10-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Remove useless conditionals
Andy Shevchenko [Fri, 2 Sep 2022 18:26:42 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Remove useless conditionals

The pin control framework checks pin boundaries before calling
the respective driver's callbacks. Hence no need to check for
pin boundaries, the respective conditionals won't be ever true.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Remove device initialization
Andy Shevchenko [Fri, 2 Sep 2022 18:26:41 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Remove device initialization

The Cypress CY8C95x0 chips have an internal EEPROM that defines
initial configuration. It might be that bootloader or other
entity wrote the platform related setup into it. Don't override
it in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Enable GPIO range
Andy Shevchenko [Fri, 2 Sep 2022 18:26:40 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Enable GPIO range

Since it's a pin control, GPIO counterpart needs to know the mapping
between pin numbering and GPIO numbering. Enable this by calling
gpiochip_add_pin_range() at the chip addition time.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Drop unneeded npins assignment
Andy Shevchenko [Fri, 2 Sep 2022 18:26:39 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Drop unneeded npins assignment

The npins field is assigned twice. Remove the first occurrence.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Fix pin control name to enable more than one
Andy Shevchenko [Fri, 2 Sep 2022 18:26:38 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Fix pin control name to enable more than one

The Cypress GPIO expander is an I²C discrete component. Hence
the platform may contain more than one of a such. Currently
this has limitations in the driver due to same name used for
all chips of a type. Replace this with device instance specific
name.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Fix return value in cy8c95x0_detect()
Andy Shevchenko [Fri, 2 Sep 2022 18:26:37 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Fix return value in cy8c95x0_detect()

It's an obvious typo in never tested piece of code that
successful detection shouldn't fail. Fix that.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: Allow IRQ chip core to handle numbering
Andy Shevchenko [Fri, 2 Sep 2022 18:26:35 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: Allow IRQ chip core to handle numbering

No need to assign first line number for IRQ chip.
Let IRQ core to decide.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: cy8c95x0: make irq_chip immutable
Andy Shevchenko [Fri, 2 Sep 2022 18:26:34 +0000 (21:26 +0300)]
pinctrl: cy8c95x0: make irq_chip immutable

Since recently, the kernel is nagging about mutable irq_chips:

   "not an immutable chip, please consider fixing it!"

Drop the unneeded copy, flag it as IRQCHIP_IMMUTABLE, add the new
helper functions and call the appropriate gpiolib functions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: berlin: fix spelling typo in comment
Jiangshan Yi [Mon, 5 Sep 2022 07:13:00 +0000 (15:13 +0800)]
pinctrl: berlin: fix spelling typo in comment

Fix spelling typo in comment.

Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Link: https://lore.kernel.org/r/20220905071300.1832105-1-13667453960@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: pistachio: Switch to use fwnode instead of
Andy Shevchenko [Wed, 31 Aug 2022 13:55:12 +0000 (16:55 +0300)]
pinctrl: pistachio: Switch to use fwnode instead of

GPIO library now accepts fwnode as a firmware node, so
switch the driver to use it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220831135512.78407-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: at91: use dev_dbg() instead of printk()
Claudiu Beznea [Wed, 31 Aug 2022 13:56:36 +0000 (16:56 +0300)]
pinctrl: at91: use dev_dbg() instead of printk()

Use dev_dbg() instead of printk(KERN_DEBUG) to avoid the following
checkpatch.pl warning:
"Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...".

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220831135636.3176406-4-claudiu.beznea@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: at91: move gpio suspend/resume calls to driver's context
Claudiu Beznea [Wed, 31 Aug 2022 13:56:35 +0000 (16:56 +0300)]
pinctrl: at91: move gpio suspend/resume calls to driver's context

Move gpio suspend/resume execution local to driver and let it execute as
close as possible to the moment the machine specific PM code is executed
(by setting it to .noirq member of dev_pm_ops). With this the
at91_pinctrl_gpio_suspend()/at91_pinctrl_gpio_resume() calls were removed
from arch/arm/mach-at91/pm.c and also a header has been removed.
The patch has been checked on sama5d3_xplained, sam9x60ek,
sama5d2_xplained, sama7g5ek boards.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220831135636.3176406-3-claudiu.beznea@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: at91: use kernel-doc style for documentation of at91_gpio_chip
Claudiu Beznea [Wed, 31 Aug 2022 13:56:34 +0000 (16:56 +0300)]
pinctrl: at91: use kernel-doc style for documentation of at91_gpio_chip

Use kernel-doc style for documentation of struct at91_gpio_chip.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220831135636.3176406-2-claudiu.beznea@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: mcp23s08: Drop assignment of default number of OF cells
Andy Shevchenko [Tue, 30 Aug 2022 17:58:50 +0000 (20:58 +0300)]
pinctrl: mcp23s08: Drop assignment of default number of OF cells

The GPIO library code will assign default value for number of OF
cells, no need to repeat this in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220830175850.44770-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agoMerge tag 'renesas-pinctrl-for-v6.1-tag1' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Walleij [Fri, 2 Sep 2022 22:09:42 +0000 (00:09 +0200)]
Merge tag 'renesas-pinctrl-for-v6.1-tag1' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: renesas: Updates for v6.1

  - Document pin control support for the RZ/Five SoC.

2 years agopinctrl: imx8m: kconfig: Depends on SOC_IMX8M
Francesco Dolcini [Tue, 30 Aug 2022 14:27:27 +0000 (16:27 +0200)]
pinctrl: imx8m: kconfig: Depends on SOC_IMX8M

Change PINCTRL_IMX8M* dependency from just ARCH_MXC to SOC_IMX8M,
likewise is done for other PINCTRL_IMX* kconfig. This avoid polluting
the config when SOC_IMX8M is not enabled.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20220830142727.313080-1-francesco.dolcini@toradex.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: amd: change dev_warn to dev_dbg for additional feature support
Basavaraj Natikar [Tue, 30 Aug 2022 11:05:25 +0000 (16:35 +0530)]
pinctrl: amd: change dev_warn to dev_dbg for additional feature support

Use dev_dbg instead of dev_warn for additional support of pinmux
feature.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Link: https://lore.kernel.org/r/20220830110525.1933198-1-Basavaraj.Natikar@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: aspeed: Force to disable the function's signal
Billy Tsai [Thu, 18 Aug 2022 10:18:39 +0000 (18:18 +0800)]
pinctrl: aspeed: Force to disable the function's signal

When the driver want to disable the signal of the function, it doesn't
need to query the state of the mux function's signal on a pin. The
condition below will miss the disable of the signal:
Ball | Default | P0 Signal | P0 Expression               | Other
-----+---------+-----------+-----------------------------+----------
 E21   GPIOG0    SD2CLK      SCU4B4[16]=1 & SCU450[1]=1    GPIOG0
-----+---------+-----------+-----------------------------+----------
 B22   GPIOG1    SD2CMD      SCU4B4[17]=1 & SCU450[1]=1    GPIOG1
-----+---------+-----------+-----------------------------+----------
Assume the register status like below:
SCU4B4[16] == 1 & SCU4B4[17] == 1 & SCU450[1]==1
After the driver set the Ball E21 to the GPIOG0:
SCU4B4[16] == 0 & SCU4B4[17] == 1 & SCU450[1]==0
When the driver want to set the Ball B22 to the GPIOG1, the condition of
the SD2CMD will be false causing SCU4B4[17] not to be cleared.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Acked-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20220818101839.28860-1-billy_tsai@aspeedtech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: nuvoton: Use 'unsigned int' instead of just 'unsigned'.
Jilin Yuan [Thu, 25 Aug 2022 12:41:34 +0000 (20:41 +0800)]
pinctrl: nuvoton: Use 'unsigned int' instead of just 'unsigned'.

'unsigned int' should be clearer than 'unsigned'.

Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
Link: https://lore.kernel.org/r/20220825124134.30242-1-yuanjilin@cdjrlc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: Add missing (unevaluated|additional)Properties on child nodes
Rob Herring [Tue, 23 Aug 2022 14:56:37 +0000 (09:56 -0500)]
dt-bindings: pinctrl: Add missing (unevaluated|additional)Properties on child nodes

In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220823145649.3118479-6-robh@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: amd: Pick some different unicode symbols
Mario Limonciello [Tue, 23 Aug 2022 23:07:52 +0000 (18:07 -0500)]
pinctrl: amd: Pick some different unicode symbols

Feedback from Kent had showed some better selections for symbols to
use for pinctrl-amd debugfs output.  Adopt some of those instead.

Fixes: e8129a076a50 ("pinctrl: amd: Use unicode for debugfs output")
Suggested-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220823230753.14799-1-mario.limonciello@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: fixup for "i2c: Make remove callback return void"
Stephen Rothwell [Fri, 26 Aug 2022 05:26:50 +0000 (15:26 +1000)]
pinctrl: fixup for "i2c: Make remove callback return void"

Fix up the build.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20220826152650.2c55e482@canb.auug.org.au
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agoMerge branch 'i2c/make_remove_callback_void-immutable' of git://git.kernel.org/pub...
Linus Walleij [Fri, 26 Aug 2022 13:14:33 +0000 (15:14 +0200)]
Merge branch 'i2c/make_remove_callback_void-immutable' of git://git./linux/kernel/git/wsa/linux into devel

This branch is needed to make the i2c driver remove() callback in new
driver compile properly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: mt8186: Fix 'reg-names' for pinctrl nodes
Allen-KH Cheng [Fri, 19 Aug 2022 12:06:49 +0000 (20:06 +0800)]
dt-bindings: pinctrl: mt8186: Fix 'reg-names' for pinctrl nodes

The mt8186 contains 8 GPIO physical address bases that correspond to
the 'reg-names' of the pinctrl driver. The 'reg-names' entries in
bindings are ordered incorrectly, though. The system crashes due of an
erroneous address when the regulator initializes.

We fix the 'reg-names' for the pinctrl nodes and the pinctrl-mt8186
example in bindings.

Fixes: 338e953f1bd1 ("dt-bindings: pinctrl: mt8186: add pinctrl file and binding document")
Co-developed-by: Guodong Liu <guodong.liu@mediatek.com>
Signed-off-by: Guodong Liu <guodong.liu@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220819120649.21523-1-allen-kh.cheng@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: mediatek: add mt8188 driver
Hui.Liu [Thu, 18 Aug 2022 07:50:12 +0000 (15:50 +0800)]
pinctrl: mediatek: add mt8188 driver

Add pinctrl driver support for MediaTek SoC mt8188.

Signed-off-by: Hui.Liu <hui.liu@mediatek.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220818075012.20880-3-hui.liu@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: mediatek: add support for mt8188
Hui.Liu [Thu, 18 Aug 2022 07:50:11 +0000 (15:50 +0800)]
dt-bindings: pinctrl: mediatek: add support for mt8188

Add the pinctrl header file on MediaTek mt8188.
Add the new binding document for pinctrl on MediaTek mt8188.

Signed-off-by: Hui.Liu <hui.liu@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220818075012.20880-2-hui.liu@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: qcom: Add sc8280xp lpass lpi pinctrl driver
Srinivas Kandagatla [Wed, 17 Aug 2022 11:37:47 +0000 (12:37 +0100)]
pinctrl: qcom: Add sc8280xp lpass lpi pinctrl driver

Add pinctrl driver to support pin configuration for LPASS
(Low Power Audio SubSystem) LPI (Low Power Island) pinctrl
on SC8280XP.

This IP is an additional pin control block for Audio Pins on top the
existing SoC Top level pin-controller.

Hardware setup looks like:

    TLMM GPIO[189 - 207] --> LPASS LPI GPIO [0 - 18]

This pin controller has some similarities compared to Top level
msm SoC Pin controller like 'each pin belongs to a single group'
and so on. However this one is intended to control only audio
pins in particular, which can not be configured/touched by the
Top level SoC pin controller except setting them as gpios.
Apart from this, slew rate is also available in this block for
certain pins which are connected to SLIMbus or SoundWire Bus.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220817113747.9111-3-srinivas.kandagatla@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom: Add sc8280xp lpass lpi pinctrl bindings
Srinivas Kandagatla [Wed, 17 Aug 2022 11:37:46 +0000 (12:37 +0100)]
dt-bindings: pinctrl: qcom: Add sc8280xp lpass lpi pinctrl bindings

Add device tree binding Documentation details for Qualcomm SC8280XP
LPASS(Low Power Audio Sub System) LPI(Low Power Island) pinctrl driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220817113747.9111-2-srinivas.kandagatla@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: qcom: Add sm8450 lpass lpi pinctrl driver
Srinivas Kandagatla [Wed, 17 Aug 2022 11:38:33 +0000 (12:38 +0100)]
pinctrl: qcom: Add sm8450 lpass lpi pinctrl driver

Add pinctrl driver to support pin configuration for LPASS
(Low Power Audio SubSystem) LPI (Low Power Island) pinctrl
on SM8450.

This IP is an additional pin control block for Audio Pins on top the
existing SoC Top level pin-controller.

Hardware setup looks like:

    TLMM GPIO[165 - 187] --> LPASS LPI GPIO [0 - 22]

This pin controller has some similarities compared to Top level
msm SoC Pin controller like 'each pin belongs to a single group'
and so on. However this one is intended to control only audio
pins in particular, which can not be configured/touched by the
Top level SoC pin controller except setting them as gpios.
Apart from this, slew rate is also available in this block for
certain pins which are connected to SLIMbus or SoundWire Bus.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220817113833.9625-3-srinivas.kandagatla@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: qcom: Add sm8450 lpass lpi pinctrl bindings
Srinivas Kandagatla [Wed, 17 Aug 2022 11:38:32 +0000 (12:38 +0100)]
dt-bindings: pinctrl: qcom: Add sm8450 lpass lpi pinctrl bindings

Add device tree binding Documentation details for Qualcomm SM8450
LPASS(Low Power Audio Sub System) LPI(Low Power Island) pinctrl driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220817113833.9625-2-srinivas.kandagatla@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: nomadik: Convert drivers to use struct pingroup and PINCTRL_PINGROUP()
Andy Shevchenko [Tue, 21 Jun 2022 11:29:04 +0000 (14:29 +0300)]
pinctrl: nomadik: Convert drivers to use struct pingroup and PINCTRL_PINGROUP()

The pin control header provides struct pingroup and PINCTRL_PINGROUP() macro.
Utilize them instead of open coded variants in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220621112904.65674-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP()
Andy Shevchenko [Mon, 20 Jun 2022 16:50:53 +0000 (19:50 +0300)]
pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP()

The pin control header provides struct pingroup and PINCTRL_PINGROUP() macro.
Utilize them instead of open coded variants in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220620165053.74170-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: Add Cypress cy8c95x0 support
Patrick Rudolph [Tue, 16 Aug 2022 05:49:15 +0000 (07:49 +0200)]
pinctrl: Add Cypress cy8c95x0 support

Add support for cypress I2C GPIO expanders cy8c9520, cy8c9540 and
cy8c9560. The GPIO expanders feature a PWM mode, thus add it as
pinctrl driver.

The chip features multiple drive modes for each pin when configured
as output and multiple bias settings when configured as input.

Tested all three components and verified that all functionality
is fully working.

Datasheet: https://www.cypress.com/file/37971/download
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20220816054917.7893-3-patrick.rudolph@9elements.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-binding: pinctrl: Add cypress,cy8c95x0
Patrick Rudolph [Tue, 16 Aug 2022 05:49:14 +0000 (07:49 +0200)]
dt-binding: pinctrl: Add cypress,cy8c95x0

Added device tree binding documentation for
Cypress CY8C95x0 I2C pin-controller.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220816054917.7893-2-patrick.rudolph@9elements.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: aspeed: Add missing properties to examples
Rob Herring [Wed, 10 Aug 2022 16:16:34 +0000 (10:16 -0600)]
dt-bindings: pinctrl: aspeed: Add missing properties to examples

The aspeed pinctrl parent node (SCU) in the examples is missing various
properties. Add the properties in preparation for the SCU schema.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220810161635.73936-2-robh@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: armada-37xx: Remove unused macro PIN_GRP()
Pali Rohár [Fri, 5 Aug 2022 12:22:02 +0000 (14:22 +0200)]
pinctrl: armada-37xx: Remove unused macro PIN_GRP()

Macro PIN_GRP() is not used, remove it.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220805122202.23174-4-pali@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: armada-37xx: Checks for errors in gpio_request_enable callback
Pali Rohár [Fri, 5 Aug 2022 12:22:01 +0000 (14:22 +0200)]
pinctrl: armada-37xx: Checks for errors in gpio_request_enable callback

Now when all MPP pins are properly defined and every MPP pin has GPIO
function, always checks for errors in armada_37xx_gpio_request_enable()
function when calling armada_37xx_pmx_set_by_name(). Function
armada_37xx_pmx_set_by_name() should not return "not supported" error
anymore for any GPIO pin when requesting GPIO mode.

Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
Signed-off-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20220805122202.23174-3-pali@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: armada-37xx: Fix definitions for MPP pins 20-22
Pali Rohár [Fri, 5 Aug 2022 12:22:00 +0000 (14:22 +0200)]
pinctrl: armada-37xx: Fix definitions for MPP pins 20-22

All 3 MPP pins (20, 21 and 22) can be configured individually and also can
be configured to GPIO functions. Fix definitions for these MPP pins in
existing pin groups. After this change GPIO function can be enabled just
for one of these 3 pins.

Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220805122202.23174-2-pali@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: armada-37xx: Add missing GPIO-only pins
Pali Rohár [Fri, 5 Aug 2022 12:21:59 +0000 (14:21 +0200)]
pinctrl: armada-37xx: Add missing GPIO-only pins

gpio1_5 and gpio2_2 are GPIO-only pins. Add them into MPP groups table
so they are properly exported as valid pin numbers.

Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220805122202.23174-1-pali@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agopinctrl: rockchip: Add RV1126 pinctrl support
Jagan Teki [Thu, 18 Aug 2022 12:41:20 +0000 (18:11 +0530)]
pinctrl: rockchip: Add RV1126 pinctrl support

RV1126 has five GPIOs groups - GPIO0 in PD_MMU and GPIO1-4
in PD_BUS.

In GPIO0, up to Lower C group GPIO0_C[3:0] is part of PMU
but rest of the groups from there are part of GRF.

Added pinctrl support for RV1126 and the pull, drv and schmitt
calculations are inferred from [1] authored by Jianqun Xu.

[1] https://github.com/rockchip-linux/kernel/blob/develop-4.19/drivers/pinctrl/pinctrl-rockchip.c

Cc: linux-gpio@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20220818124132.125304-8-jagan@edgeble.ai
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: rockchip: Document RV1126 pinctrl
Jagan Teki [Thu, 18 Aug 2022 12:41:19 +0000 (18:11 +0530)]
dt-bindings: pinctrl: rockchip: Document RV1126 pinctrl

Document dt-bindings for RV1126 SoC pinctrl support.

Cc: linux-gpio@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20220818124132.125304-7-jagan@edgeble.ai
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agodt-bindings: pinctrl: samsung: deprecate header with register constants
Krzysztof Kozlowski [Tue, 16 Aug 2022 13:30:16 +0000 (16:30 +0300)]
dt-bindings: pinctrl: samsung: deprecate header with register constants

For convenience (less code duplication, some meaning added to raw
number), the pin controller pin configuration register values
were defined in the bindings header.  These are not some IDs or other
abstraction layer but raw numbers used in the registers

These constants do not fit the purpose of bindings.  They do not provide
any abstraction, any hardware and driver independent ID.  With minor
exceptions, the Linux drivers actually do not use the bindings header at
all.

All of the constants were moved already to headers local to DTS
(residing in DTS directory) and to Samsung pinctrl driver (where
applicable), so remove any references to the bindings header and add a
warning tha tit is deprecated.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220816133016.77553-3-krzysztof.kozlowski@linaro.org
2 years agodt-bindings: pinctrl: samsung: stop using bindings header with constants
Krzysztof Kozlowski [Tue, 16 Aug 2022 13:30:15 +0000 (16:30 +0300)]
dt-bindings: pinctrl: samsung: stop using bindings header with constants

The bindings header with pin controller register values is being
deprecated and DTS already switched to a DTS-local header.

Do not reference the bindings header in schema and replace the defines
with raw values.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220816133016.77553-2-krzysztof.kozlowski@linaro.org
2 years agoi2c: Make remove callback return void
Uwe Kleine-König [Mon, 15 Aug 2022 08:02:30 +0000 (10:02 +0200)]
i2c: Make remove callback return void

The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2 years agogpio: pca953x: Make platform teardown callback return void
Uwe Kleine-König [Mon, 15 Aug 2022 08:02:29 +0000 (10:02 +0200)]
gpio: pca953x: Make platform teardown callback return void

All platforms that provide a teardown callback return 0. New users are
supposed to not make use of platform support, so there is no
functionality lost.

This patch is a preparation for making i2c remove callbacks return void.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2 years agoleds: lm3601x: Improve error reporting for problems during .remove()
Uwe Kleine-König [Mon, 15 Aug 2022 08:02:28 +0000 (10:02 +0200)]
leds: lm3601x: Improve error reporting for problems during .remove()

Returning an error value in an i2c remove callback results in a generic
error message being emitted by the i2c core, but otherwise it doesn't
make a difference. The device goes away anyhow and the devm cleanups are
called.

So instead of triggering the generic i2c error message, emit a more
helpful message if a problem occurs and return 0 to suppress the generic
message.

This patch is a preparation for making i2c remove callbacks return void.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2 years agoleds: lm3601x: Don't use mutex after it was destroyed
Uwe Kleine-König [Mon, 15 Aug 2022 08:02:27 +0000 (10:02 +0200)]
leds: lm3601x: Don't use mutex after it was destroyed

The mutex might still be in use until the devm cleanup callback
devm_led_classdev_flash_release() is called. This only happens some time
after lm3601x_remove() completed.

Fixes: e63a744871a3 ("leds: lm3601x: Convert class registration to device managed")
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>