]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pinctrl: cy8c95x0: Enable regmap locking for debug
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Feb 2025 13:10:29 +0000 (15:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:14 +0000 (14:01 +0100)
[ Upstream commit aac4470fa6e695e4d6ac94cc77d4690b57f1d2bc ]

When regmap locking is disabled, debugfs is also disabled.
Enable locking for debug when CONFIG_DEBUG_PINCTRL is set.

Fixes: f71aba339a66 ("pinctrl: cy8c95x0: Use single I2C lock")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/20250203131506.3318201-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-cy8c95x0.c

index 05224808d92bee113331626a03e5d54949aaf090..c0f094f51da84fc750b497ca46dcd251245b225e 100644 (file)
@@ -472,7 +472,11 @@ static const struct regmap_config cy8c9520_i2c_regmap = {
        .max_register = 0,              /* Updated at runtime */
        .num_reg_defaults_raw = 0,      /* Updated at runtime */
        .use_single_read = true,        /* Workaround for regcache bug */
+#if IS_ENABLED(CONFIG_DEBUG_PINCTRL)
+       .disable_locking = false,
+#else
        .disable_locking = true,
+#endif
 };
 
 static inline int cy8c95x0_regmap_update_bits_base(struct cy8c95x0_pinctrl *chip,