USB: serial: cp210x: provide gpio valid mask
authorJohan Hovold <johan@kernel.org>
Fri, 9 Apr 2021 15:52:15 +0000 (17:52 +0200)
committerJohan Hovold <johan@kernel.org>
Mon, 12 Apr 2021 09:58:42 +0000 (11:58 +0200)
commitb979248d16d12b913501dacd61bddc7a36aac886
tree00533fde894a118f0d1d85dc9de8da975323e923
parent07125072b0a08a13331b46990ea48997fa0c64b4
USB: serial: cp210x: provide gpio valid mask

Use the new GPIO valid-mask feature to inform gpiolib which pins are
available for use instead of handling that in a request callback.

This also allows user space to figure out which pins are available
through the chardev interface without having to request each pin in
turn.

Note that the return value when requesting an unavailable pin will now
be -EINVAL instead of -ENODEV.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c