Rob Herring
91da7032d8
pinctrl: at91: fix deferred probing support
...
AT91 pinctrl deferred probing support is broken if the GPIO devices
haven't probed first and set gpio_banks to non-zero. The later condition
that only some GPIO devices haven't probed can't actually happen as
either all the GPIO devices have probed first or none of them have. Plus
the pinctrl driver has already returned -EINVAL, so it's not on the
deferred list to retry probing.
Fix this by consolidating the checking that all GPIO devices are probed.
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com >
Cc: Linus Walleij <linus.walleij@linaro.org >
Cc: Nicolas Ferre <nicolas.ferre@microchip.com >
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org >
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com >
Tested-by: Nicolas Ferre <nicolas.ferre@microchip.com > # on sama5d3 xplained
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com >
Link: https://lore.kernel.org/r/20180712192222.32481-1-robh@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-27 13:48:07 +01:00
Rob Herring
6c488fbb1d
dt-bindings: pinctrl: mediatek: Fix child node name patterns
...
The child node name patterns in Mediatek pinctrl bindings don't match
reality. I don't know where '-[0-9]+$' came from, but I don't see any nodes
with a matching pattern. Also, patterns such as 'pins' or 'mux' are
ambiguous because any prefix or suffix is allowed. If that's desired, it
should be explicit.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230120020536.3229300-1-robh@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-27 13:31:34 +01:00
Linus Walleij
a08cbeb1d1
pinctrl: at91: Tag suspend/resume __maybe_unused
...
Tag the suspend/resume callbacks as __maybe_unused to silence
complaints from the build robots.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-27 13:28:26 +01:00
Bernhard Rosenkränzer
b2ea28b885
dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC
...
Add devicetree bindings for Mediatek MT8365 pinctrl driver.
Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230125143503.1015424-5-bero@baylibre.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 14:52:48 +01:00
Guodong Liu
2e34f82ba2
pinctrl: mediatek: Initialize variable *buf to zero
...
Coverity spotted that *buf is not initialized to zero in
mtk_pctrl_dbg_show. Using uninitialized variable *buf as argument to %s
when calling seq_printf. Fix this coverity by initializing *buf as zero.
Fixes: 184d8e13f9 ("pinctrl: mediatek: Add support for pin configuration dump via debugfs.")
Signed-off-by: Guodong Liu <Guodong.Liu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230118062036.26258-3-Guodong.Liu@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 14:39:35 +01:00
Guodong Liu
a298c70a10
pinctrl: mediatek: Initialize variable pullen and pullup to zero
...
Coverity spotted that pullen and pullup is not initialized to zero in
mtk_pctrl_show_one_pin. The uninitialized variable pullen is used in
assignment statement "rsel = pullen;" in mtk_pctrl_show_one_pin, and
Uninitialized variable pullup is used when calling scnprintf. Fix this
coverity by initializing pullen and pullup as zero.
Fixes: 184d8e13f9 ("pinctrl: mediatek: Add support for pin configuration dump via debugfs.")
Signed-off-by: Guodong Liu <Guodong.Liu@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20230118062036.26258-2-Guodong.Liu@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 14:39:35 +01:00
Andy Shevchenko
9bd73ce087
pinctrl: qcom: Unify accessing to device fwnode
...
The device fwnode can be get via dev_fwnode() getter.
Use it where it makes sense.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230113220703.45686-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 13:40:55 +01:00
Andy Shevchenko
b8f9301c91
Revert "gpiolib: of: Introduce hook for missing gpio-ranges"
...
This reverts commit 3550bba25d .
No users for this one, revert it for good.
The ->add_pin_ranges() can be used instead.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Tested-by: Stefan Wahren <stefan.wahren@i2se.com >
Tested-by: Florian Fainelli <f.fainelli@gmail.com >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Link: https://lore.kernel.org/r/20230113215352.44272-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 13:38:55 +01:00
Andy Shevchenko
bc96299707
pinctrl: bcm2835: Switch to use ->add_pin_ranges()
...
Yeah, while the ->add_pin_ranges() shouldn't be used by DT drivers,
this one requires it to support quite old firmware descriptions that
do not have gpio-ranges property.
The change allows to clean up GPIO library from OF specifics.
There is no functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Tested-by: Stefan Wahren <stefan.wahren@i2se.com >
Tested-by: Florian Fainelli <f.fainelli@gmail.com >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Link: https://lore.kernel.org/r/20230113215352.44272-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 13:38:55 +01:00
Andy Shevchenko
2d578dd278
pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
...
Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(),
there is no counterpart of_node_get() for it.
Fixes: d2b67744fd ("pinctrl: bcm2835: implement hook for missing gpio-ranges")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com >
Tested-by: Stefan Wahren <stefan.wahren@i2se.com >
Tested-by: Florian Fainelli <f.fainelli@gmail.com >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Link: https://lore.kernel.org/r/20230113215352.44272-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 13:38:55 +01:00
Andy Shevchenko
c40aa80dd4
gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges()
...
The ->add_pin_ranges() is supposed to be called for the backward
compatiblity on Device Tree platforms or non-DT ones. Ensure that
by checking presense of the "gpio-ranges" property.
This allows to clean up a few existing drivers to avoid duplication
of the check.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Tested-by: Stefan Wahren <stefan.wahren@i2se.com >
Tested-by: Florian Fainelli <f.fainelli@gmail.com >
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com >
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Link: https://lore.kernel.org/r/20230113215352.44272-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-26 13:38:55 +01:00
ye xingchen
6eea5a80d2
pinctrl: nomadik: remove duplicate included header files
...
linux/seq_file.h is included more than once.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn >
Link: https://lore.kernel.org/r/202301161545238948580@zte.com.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 15:22:32 +01:00
Andy Shevchenko
083b0230e0
pinctrl: digicolor: Use proper headers and drop OF dependency
...
The driver doesn't depend on the OF to be complied. Hence
the proper header to use is mod_devicetable.h. Replace of*.h with
the above mentioned and drop redundant dependency.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Baruch Siach <baruch@tkos.co.il >
Link: https://lore.kernel.org/r/20230113143640.24302-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 15:14:03 +01:00
Andy Shevchenko
aeb3c200db
pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells
...
The of_gpio_n_cells default is 2 when ->of_xlate() callback is
not defined. No need to assign it explicitly in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Baruch Siach <baruch@tkos.co.il >
Link: https://lore.kernel.org/r/20230113143640.24302-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 15:14:03 +01:00
Andy Shevchenko
ef4290e6bd
pinctrl: sunplus: sppctl: Remove duplicate assignment of of_gpio_n_cells
...
The of_gpio_n_cells default is 2 when ->of_xlate() callback is
not defined. No need to assign it explicitly in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230112185122.45216-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 15:03:08 +01:00
Andy Shevchenko
a3fc976a2d
pinctrl: qcom: lpass-lpi: Remove duplicate assignment of of_gpio_n_cells
...
The of_gpio_n_cells default is 2 when ->of_xlate() callback is
not defined. No need to assign it explicitly in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230112184923.80442-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 15:02:16 +01:00
Andy Shevchenko
0da58037ae
pinctrl: mediatek: Remove duplicate assignment of of_gpio_n_cells
...
The of_gpio_n_cells default is 2 when ->of_xlate() callback is
not defined. No need to assign it explicitly in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230112184340.79606-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 15:01:28 +01:00
Andy Shevchenko
03a13546c7
pinctrl: samsung: Do not mention legacy API in the code
...
Replace mentioning of legacy API by the latest one.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230112134849.59534-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:59:07 +01:00
Arınç ÜNAL
844bca6092
dt-bindings: pinctrl: rt3883: add proper function muxing binding
...
Not every function can be muxed to a group. Add proper binding which
documents which function can be muxed to a group or set of groups.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221231160849.40544-7-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:56:46 +01:00
Arınç ÜNAL
d648fd64e1
dt-bindings: pinctrl: rt305x: add proper function muxing binding
...
Not every function can be muxed to a group. Add proper binding which
documents which function can be muxed to a group or set of groups.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221231160849.40544-6-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:56:46 +01:00
Arınç ÜNAL
b4ac843958
dt-bindings: pinctrl: rt2880: add proper function muxing binding
...
Not every function can be muxed to a group. Add proper binding which
documents which function can be muxed to a group or set of groups.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221231160849.40544-5-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:56:46 +01:00
Arınç ÜNAL
0c9a567651
dt-bindings: pinctrl: mt7621: add proper function muxing binding
...
Not every function can be muxed to a group. Add proper binding which
documents which function can be muxed to a group or set of groups.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221231160849.40544-4-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:56:46 +01:00
Arınç ÜNAL
4e5410668a
dt-bindings: pinctrl: mt7620: add proper function muxing binding
...
Not every function can be muxed to a group. Add proper binding which
documents which function can be muxed to a group or set of groups.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221231160849.40544-3-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:56:46 +01:00
Arınç ÜNAL
525792d1d2
pinctrl: ralink: rename variables which point out the pin group
...
These variables define a list of functions which can be muxed to the pin
group which the name of the pin group was originally intended to be pointed
out on the name of the said variables.
Therefore, rename "func" to "grp" across all subdrivers where this applies.
Fixes: 18653d4bd8 ("pinctrl: ralink: rename variable names for functions on MT7620 and MT7621")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221231160849.40544-2-arinc.unal@arinc9.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 14:56:46 +01:00
Uwe Kleine-König
542c893caa
pinctrl: sx150x: Convert to i2c's .probe_new()
...
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20221118224540.619276-512-uwe@kleine-koenig.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-16 13:40:32 +01:00
Krzysztof Kozlowski
697550668b
dt-bindings: pinctrl: qcom,sm8450-lpass-lpi: add input-enable and bias-bus-hold
...
Allow bias-bus-hold and input-enable properties (already used in SM8450):
sm8450-qrd.dtb: pinctrl@3440000: dmic02-default-state: 'oneOf' conditional failed, one must be fixed:
'pins' is a required property
'function' is a required property
'clk-pins', 'data-pins' do not match any of the regexes: 'pinctrl-[0-9]+'
'input-enable' does not match any of the regexes: 'pinctrl-[0-9]+'
Compact the properties which are just set to true for readability.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20221222161420.172824-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 09:06:49 +01:00
Krzysztof Kozlowski
3ecc01c5e0
dt-bindings: pinctrl: qcom,sm8450-tlmm: correct gpio-line-names size
...
The SM8450 has GPIOs from 0 to 209, so 210 in total:
sm8450-sony-xperia-nagara-pdx223.dtb: pinctrl@f100000: gpio-line-names:
['NC', 'NC', 'NC', 'NC', 'WLC_I2C_SDA', 'WLC_I2C_SCL', ...
'APPS_I2C_0_SDA', 'APPS_I2C_0_SCL', 'CCI_I2C3_SDA', 'CCI_I2C3_SCL'] is too long
Fixes: 9779ed30f9 ("dt-bindings: pinctrl: qcom,sm8450-pinctrl: add gpio-line-names")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20221223132226.81340-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 09:05:51 +01:00
Andy Shevchenko
091e81b867
pinctrl: pinmux: Drop duplicate error message in pinmux_select()
...
pinctrl_get_group_selector() prints an error message when group
is not found in the list. No need to repeat this in the caller.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230109132719.86009-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 09:03:27 +01:00
Uwe Kleine-König
8bb5811129
pinctrl: mcp23s08: Convert to i2c's .probe_new()
...
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20221118224540.619276-511-uwe@kleine-koenig.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 09:00:19 +01:00
Luca Weiss
814ee08d9e
pinctrl: qcom: msm8226: Add General Purpose clocks
...
Add support for the general purpose clocks that are found on MSM8226.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz >
Co-developed-by: Matti Lehtimäki <matti.lehtimaki@gmail.com >
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com >
Link: https://lore.kernel.org/r/20230106114403.275865-3-matti.lehtimaki@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 08:56:41 +01:00
Matti Lehtimäki
ef6c2d8566
dt-bindings: pinctrl: msm8226: Add General Purpose clocks
...
Document the general purpose clock functions that are found on MSM8226.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230106114403.275865-2-matti.lehtimaki@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 08:56:33 +01:00
Peng Fan
f4720b845b
dt-bindings: pinctrl: imx8m: Integrate duplicated i.MX 8M schemas
...
The i.MX8MM/N/P/Q IOMUXC schemas are basically the same, it does not to
have four schemas for almost the same binding.
Signed-off-by: Peng Fan <peng.fan@nxp.com >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230104021430.3503497-1-peng.fan@oss.nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-10 08:53:46 +01:00
Neil Armstrong
e8c39b3eba
pinctrl: qcom: spmi-gpio: add support for pm8550 & pmr735d gpio control
...
Add support for the pm8550, pm8550b, pm8550ve, pm8550vs, pmk8550 & pmr735d
gpio controllers providing GPIO control over SPMI.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-spmi-v2-3-b839bf2d558a@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 15:17:51 +01:00
Neil Armstrong
b754f00dd9
dt-bindings: pinctrl: qcom,pmic-gpio: document pm8550, pm8550b, pm8550ve, pm8550vs, pmk8550 & pmr735d
...
Document compatible, pin count & pin names for pm8550, pm8550b, pm8550ve,
pm8550vs, pmk8550 & pmr735d SPMI GPIO controllers.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-spmi-v2-2-b839bf2d558a@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 15:17:24 +01:00
Miaoqian Lin
c818ae563b
pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups
...
of_find_node_by_phandle() returns a node pointer with refcount incremented,
We should use of_node_put() on it when not needed anymore.
Add missing of_node_put() to avoid refcount leak.
Fixes: d3e5116119 ("pinctrl: add pinctrl driver for Rockchip SoCs")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com >
Link: https://lore.kernel.org/r/20230102112845.3982407-1-linmq006@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 15:14:10 +01:00
Miaoqian Lin
dcef18c8ac
pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain
...
of_irq_find_parent() returns a node pointer with refcount incremented,
We should use of_node_put() on it when not needed anymore.
Add missing of_node_put() to avoid refcount leak.
Fixes: d86f4d71e4 ("pinctrl: stm32: check irq controller availability at probe")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com >
Link: https://lore.kernel.org/r/20230102082503.3944927-1-linmq006@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 15:13:15 +01:00
Adam Skladowski
a7cc0e2685
pinctrl: qcom: pinctrl-msm8976: Correct function names for wcss pins
...
Adjust names of function for wcss pins, also fix third gpio in bt group.
Fixes: bcd11493f0 ("pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956")
Signed-off-by: Adam Skladowski <a39.skl@gmail.com >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Link: https://lore.kernel.org/r/20221231164250.74550-1-a39.skl@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 14:40:22 +01:00
Abel Vesa
fcd26bf51c
pinctrl: qcom: Add SM8550 pinctrl driver
...
Add pinctrl driver for TLMM block found in SM8550 SoC.
Co-developed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Abel Vesa <abel.vesa@linaro.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20221230203637.2539900-3-abel.vesa@linaro.org
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 14:20:52 +01:00
Abel Vesa
15dfa161cc
dt-bindings: pinctrl: qcom: Add SM8550 pinctrl
...
Add device tree binding Documentation details for Qualcomm SM8550
TLMM device
Signed-off-by: Abel Vesa <abel.vesa@linaro.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221230203637.2539900-2-abel.vesa@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2023-01-09 14:19:50 +01:00
Melody Olvera
51a8f99718
pinctrl: qcom: Add QDU1000/QRU1000 pinctrl driver
...
Add pin control driver for the TLMM block found in the QDU1000
and QRU1000 SoC.
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20221216230852.21691-3-quic_molvera@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:34:53 +01:00
Melody Olvera
2daa14811e
dt-bindings: pinctrl: qcom: Add QDU1000 and QRU1000 pinctrl
...
Add device tree bindings for QDU1000 and QRU1000 TLMM devices.
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221216230852.21691-2-quic_molvera@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:34:53 +01:00
Biju Das
84f0b1ea2a
dt-bindings: pinctrl: renesas: Add RZ/G2L POEG binding
...
Add device tree bindings for the RZ/G2L Port Output Enable for GPT (POEG).
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20221215213206.56666-2-biju.das.jz@bp.renesas.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:10:36 +01:00
Arnd Bergmann
5d8ae2928f
pinctrl: at91: convert to NOIRQ_SYSTEM_SLEEP_PM_OPS
...
With the old SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, some configs result in a
build warning:
drivers/pinctrl/pinctrl-at91.c:1668:12: error: 'at91_gpio_resume' defined but not used [-Werror=unused-function]
1668 | static int at91_gpio_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-at91.c:1650:12: error: 'at91_gpio_suspend' defined but not used [-Werror=unused-function]
1650 | static int at91_gpio_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Ryan Wanner <Ryan.Wanner@microchip.com >
Link: https://lore.kernel.org/r/20221215164301.934805-1-arnd@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:08:26 +01:00
Lukas Bulwahn
a3a7482a0d
pinctrl: mxs: avoid defines prefixed with CONFIG
...
Defines prefixed with "CONFIG" should be limited to proper Kconfig options,
that are introduced in a Kconfig file.
Here, expressions to convert pin configurations to booleans for pull-up,
voltage and mA are macro definitions that begin with "CONFIG".
To avoid defines prefixed with "CONFIG", rename these defines to begin with
"PIN_CONFIG" instead.
No functional change.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com >
Link: https://lore.kernel.org/r/20221215092128.3954-1-lukas.bulwahn@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:05:16 +01:00
Uwe Kleine-König
f3cd465bbd
pinctrl: thunderbay: Drop empty platform remove function
...
A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20221213182322.962345-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:03:51 +01:00
Uwe Kleine-König
b7f44e1249
pinctrl: da850-pupd: Drop empty platform remove function
...
A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20221213182125.929303-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 02:02:46 +01:00
Basavaraj Natikar
df72b4a692
pinctrl: amd: Add Z-state wake control bits
...
GPIO registers include Bit 27 for WakeCntrlZ used to enable wake in
Z state. Hence add Z-state wake control bits to debugfs output to
debug and analyze Z-states problems.
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com >
Suggested-by: Mario Limonciello <mario.limonciello@amd.com >
Tested-by: Guruvendra Punugupati <Guruvendra.Punugupati@amd.com >
Link: https://lore.kernel.org/r/20221208093704.1151928-1-Basavaraj.Natikar@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2022-12-29 01:59:41 +01:00
Linus Torvalds
1b929c02af
Linux 6.2-rc1
v6.2-rc1
2022-12-25 13:41:39 -08:00
Steven Rostedt (Google)
292a089d78
treewide: Convert del_timer*() to timer_shutdown*()
...
Due to several bugs caused by timers being re-armed after they are
shutdown and just before they are freed, a new state of timers was added
called "shutdown". After a timer is set to this state, then it can no
longer be re-armed.
The following script was run to find all the trivial locations where
del_timer() or del_timer_sync() is called in the same function that the
object holding the timer is freed. It also ignores any locations where
the timer->function is modified between the del_timer*() and the free(),
as that is not considered a "trivial" case.
This was created by using a coccinelle script and the following
commands:
$ cat timer.cocci
@@
expression ptr, slab;
identifier timer, rfield;
@@
(
- del_timer(&ptr->timer);
+ timer_shutdown(&ptr->timer);
|
- del_timer_sync(&ptr->timer);
+ timer_shutdown_sync(&ptr->timer);
)
... when strict
when != ptr->timer
(
kfree_rcu(ptr, rfield);
|
kmem_cache_free(slab, ptr);
|
kfree(ptr);
)
$ spatch timer.cocci . > /tmp/t.patch
$ patch -p1 < /tmp/t.patch
Link: https://lore.kernel.org/lkml/20221123201306.823305113@linutronix.de/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org >
Acked-by: Pavel Machek <pavel@ucw.cz > [ LED ]
Acked-by: Kalle Valo <kvalo@kernel.org > [ wireless ]
Acked-by: Paolo Abeni <pabeni@redhat.com > [ networking ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2022-12-25 13:38:09 -08:00
Linus Torvalds
72a85e2b0a
Merge tag 'spi-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
...
Pull spi fix from Mark Brown:
"One driver specific change here which handles the case where a SPI
device for some reason tries to change the bus speed during a message
on fsl_spi hardware, this should be very unusual"
* tag 'spi-fix-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: fsl_spi: Don't change speed while chipselect is active
2022-12-23 14:44:08 -08:00