Skip to content

Commit 7dd1871

Browse files
author
Bartosz Golaszewski
committed
gpio: tps65219: don't use CONFIG_DEBUG_GPIO
CONFIG_DEBUG_GPIO should only be used to enable debug log messages and for core GPIOLIB debugging. Don't use it to control the execution of potentially buggy code. Just put it under an always-false #if. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 20bddcb commit 7dd1871

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/gpio/gpio-tps65219.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ static int tps65219_gpio_change_direction(struct gpio_chip *gc, unsigned int off
9696
* Below can be used for test purpose only.
9797
*/
9898

99-
if (IS_ENABLED(CONFIG_DEBUG_GPIO)) {
100-
int ret = regmap_update_bits(gpio->tps->regmap, TPS65219_REG_MFP_1_CONFIG,
101-
TPS65219_GPIO0_DIR_MASK, direction);
102-
if (ret) {
103-
dev_err(dev,
104-
"GPIO DEBUG enabled: Fail to change direction to %u for GPIO%d.\n",
105-
direction, offset);
106-
return ret;
107-
}
99+
#if 0
100+
int ret = regmap_update_bits(gpio->tps->regmap, TPS65219_REG_MFP_1_CONFIG,
101+
TPS65219_GPIO0_DIR_MASK, direction);
102+
if (ret) {
103+
dev_err(dev,
104+
"GPIO DEBUG enabled: Fail to change direction to %u for GPIO%d.\n",
105+
direction, offset);
106+
return ret;
108107
}
108+
#endif
109109

110110
dev_err(dev,
111111
"GPIO%d direction set by NVM, change to %u failed, not allowed by specification\n",

0 commit comments

Comments
 (0)