Krzysztof Kozlowski
fde270ebb7
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 >
2022-09-14 12:18:15 +02:00
Krzysztof Kozlowski
d4ac2a2b7c
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 >
2022-09-14 12:18:08 +02:00
Krzysztof Kozlowski
34b88934e6
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 >
2022-09-14 12:18:02 +02:00
Krzysztof Kozlowski
2d4e77a71f
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 >
2022-09-14 12:17:56 +02:00
Krzysztof Kozlowski
e9668427de
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 >
2022-09-14 12:17:49 +02:00
Krzysztof Kozlowski
d70f858f82
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 >
2022-09-14 12:17:43 +02:00
Krzysztof Kozlowski
2723c2530c
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 >
2022-09-14 12:17:38 +02:00
Krzysztof Kozlowski
6e6e1ef6b5
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 >
2022-09-14 12:17:32 +02:00
Krzysztof Kozlowski
e3c2e38407
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 >
2022-09-14 12:17:23 +02:00
Krzysztof Kozlowski
c8441085e2
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 >
2022-09-14 12:17:18 +02:00
Krzysztof Kozlowski
51af3784f1
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 >
2022-09-14 12:17:10 +02:00
Krzysztof Kozlowski
dc246ef73f
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 >
2022-09-14 12:16:56 +02:00
Krzysztof Kozlowski
5f3332e945
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 >
2022-09-14 12:16:50 +02:00
Krzysztof Kozlowski
7c29116787
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 >
2022-09-14 12:16:44 +02:00
Krzysztof Kozlowski
1523993012
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 >
2022-09-14 12:16:36 +02:00
Krzysztof Kozlowski
d1fc02d47b
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 >
2022-09-14 12:16:28 +02:00
Krzysztof Kozlowski
5d66124f61
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 >
2022-09-14 12:16:22 +02:00
Krzysztof Kozlowski
495ffc067c
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 >
2022-09-14 12:16:16 +02:00
Krzysztof Kozlowski
b17cf20dfc
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 >
2022-09-14 12:16:03 +02:00
Krzysztof Kozlowski
a21599cf12
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 >
2022-09-14 12:15:53 +02:00
Andy Shevchenko
e662d349ab
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 >
2022-09-09 10:01:52 +02:00
Andy Shevchenko
88d60d7d94
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: 1074e1d23a ("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 >
2022-09-08 15:18:58 +02:00
Manivannan Sadhasivam
1a41d1e5c8
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 >
2022-09-08 14:24:28 +02:00
Andy Shevchenko
827eb27ec2
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 >
2022-09-08 10:35:30 +02:00
Andy Shevchenko
6323f91668
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: be2dc859ab ("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 >
2022-09-08 10:34:27 +02:00
Andy Shevchenko
8c943137c0
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 >
2022-09-08 10:10:59 +02:00
Iskren Chernev
f1509dad5d
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 >
2022-09-08 10:09:00 +02:00
Francesco Dolcini
71e268e342
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: 87c2a29a6b ("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 >
2022-09-08 10:06:57 +02:00
Andy Shevchenko
63e2330448
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 >
2022-09-08 10:06:18 +02:00
Andy Shevchenko
9540a83606
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 >
2022-09-08 10:06:15 +02:00
Andy Shevchenko
785b1bd854
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 >
2022-09-08 10:06:11 +02:00
Andy Shevchenko
618a43ff1f
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 >
2022-09-08 10:06:08 +02:00
Andy Shevchenko
8586466e4f
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 >
2022-09-08 10:06:05 +02:00
Andy Shevchenko
f12352f334
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 >
2022-09-08 10:06:01 +02:00
Andy Shevchenko
c3e4095287
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 >
2022-09-08 10:05:58 +02:00
Andy Shevchenko
1fa3df901f
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 >
2022-09-08 10:05:54 +02:00
Andy Shevchenko
a416bfb7d5
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 >
2022-09-08 10:05:51 +02:00
Andy Shevchenko
44c2533366
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 >
2022-09-08 10:05:47 +02:00
Andy Shevchenko
d86e034485
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 >
2022-09-08 10:05:43 +02:00
Andy Shevchenko
28ce127238
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 >
2022-09-08 10:05:39 +02:00
Andy Shevchenko
641d6cc65d
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 >
2022-09-08 10:05:34 +02:00
Andy Shevchenko
43dcf873d4
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 >
2022-09-08 10:05:30 +02:00
Andy Shevchenko
ad3d55aab4
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 >
2022-09-08 10:05:26 +02:00
Andy Shevchenko
f5d620254c
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 >
2022-09-08 10:05:19 +02:00
Jiangshan Yi
4a13796aeb
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 >
2022-09-05 14:10:14 +02:00
Andy Shevchenko
1074e1d23a
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 >
2022-09-03 00:20:41 +02:00
Claudiu Beznea
42eae17d56
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 >
2022-09-03 00:19:23 +02:00
Claudiu Beznea
a575207583
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 >
2022-09-03 00:19:23 +02:00
Claudiu Beznea
7fec8c9cee
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 >
2022-09-03 00:19:23 +02:00
Andy Shevchenko
f23b373f30
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 >
2022-09-03 00:17:35 +02:00