pinctrl: Match DT helper types
Subsystems (3)
PATCH 1/1 pinctrl: Match DT helper types
The affected pinctrl drivers either check for the presence of a standard property or read a property documented with an 8-bit cell encoding. Using boolean or u32 helpers for those cases disagrees with the binding.
Use a presence helper for "gpio-ranges" and read "microchip,spi-present-mask" with the u8 helper documented by the binding.
--- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- drivers/pinctrl/pinctrl-mcp23s08_spi.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +1 -1
@@ -868,7 +868,7 @@ static int iproc_gpio_probe(struct platform_device *pdev) gc->set = iproc_gpio_set; gc->get = iproc_gpio_get; - chip->pinmux_is_supported =of_property_read_bool (dev->of_node, + chip->pinmux_is_supported =of_property_present (dev->of_node,"gpio-ranges" );/* optional GPIO interrupt support */
drivers/pinctrl/pinctrl-mcp23s08_spi.c +3 -3
@@ -143,13 +143,13 @@ static int mcp23s08_probe(struct spi_device *spi)unsigned int addr;int chips;int ret; -u32 v; +u8 v; info =spi_get_device_match_data (spi); - ret =device_property_read_u32 (dev,"microchip,spi-present-mask" , &v); + ret =device_property_read_u8 (dev,"microchip,spi-present-mask" , &v);if (ret) { - ret =device_property_read_u32 (dev,"mcp,spi-present-mask" , &v); + ret =device_property_read_u8 (dev,"mcp,spi-present-mask" , &v);if (ret) {dev_err (dev,"missing spi-present-mask" );return ret;
Signature · 1 line
2.53.0
Linus Walleij
maintainerQuoted 10 lines · Rob Herring (Arm)
The affected pinctrl drivers either check for the presence of a standard property or read a property documented with an 8-bit cell encoding. Using boolean or u32 helpers for those cases disagrees with the binding.
Use a presence helper for "gpio-ranges" and read "microchip,spi-present-mask" with the u8 helper documented by the binding.
Assisted-by Codex:gpt-5-5Signed-off-by Rob Herring (Arm) <[email protected]>
Patch applied because good fix.
Yours,
Linus Walleij
Quoted 10 lines · Rob Herring (Arm)' via BCM-KERNEL-FEEDBACK-LIST,PDL
The affected pinctrl drivers either check for the presence of a standard property or read a property documented with an 8-bit cell encoding. Using boolean or u32 helpers for those cases disagrees with the binding.
Use a presence helper for "gpio-ranges" and read "microchip,spi-present-mask" with the u8 helper documented by the binding.
Assisted-by Codex:gpt-5-5Signed-off-by Rob Herring (Arm) <[email protected]>
Signature · 1 line
Florian