Commit fddd408a authored by Marc Zyngier's avatar Marc Zyngier Committed by Johan Hovold
Browse files

USB: serial: ftdi_sio: log the CBUS GPIO validity



The validity of the ftdi CBUS GPIO is pretty hidden so far,
and finding out *why* some GPIOs don't work is sometimes
hard to identify. So let's help the user by displaying the
map of the CBUS pins that are valid for a GPIO.

Suggested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201204164739.781812-4-maz@kernel.org


Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
[johan: demote to KERN_DEBUG, rephrase messages, drop ftx-prog warning]
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 5d47c887
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2009,6 +2009,12 @@ static int ftdi_gpio_init_valid_mask(struct gpio_chip *gc,

	bitmap_complement(valid_mask, &map, ngpios);

	if (bitmap_empty(valid_mask, ngpios))
		dev_dbg(&port->dev, "no CBUS pin configured for GPIO\n");
	else
		dev_dbg(&port->dev, "CBUS%*pbl configured for GPIO\n", ngpios,
			valid_mask);

	return 0;
}