Skip to contentSkip to conversation

gpio: pca953x: disable regmap locking

PATCH In review Bartosz Golaszewski 3 participants 3 messages Apr 7, 2020 – Apr 16, 2020 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: pca953x: disable regmap locking

From: Bartosz Golaszewski <[email protected]>

This driver uses its own locking but regmap silently uses a mutex for all operations too. Add the option to disable locking to the regmap config struct.

---
 drivers/gpio/gpio-pca953x.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-pca953x.c +1 -0
index 5638b4e5355f..40da1954d74b 100644
@@ -306,6 +306,7 @@ static const struct regmap_config pca953x_i2c_regmap = {
 	.writeable_reg = pca953x_writeable_register,
 	.volatile_reg = pca953x_volatile_register,
 
+	.disable_locking = true,
 	.cache_type = REGCACHE_RBTREE,
 	/* REVISIT: should be 0x7f but some 24 bit chips use REG_ADDR_AI */
 	.max_register = 0xff,
Signature · 1 line
2.25.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

This driver uses its own locking but regmap silently uses a mutex for all operations too. Add the option to disable locking to the regmap config struct.

SATA on Salvator-XS with R-Car H3 ES2.0 relies on a pca9654 GPIO hog and still works, so

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Acked-by on v1 1/1
#2 lore raw
In reply to Bartosz Golaszewski
Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

This driver uses its own locking but regmap silently uses a mutex for all operations too. Add the option to disable locking to the regmap config struct.

Please queued this in your next devel pull request for me, thanks!

Yours,
Linus Walleij