]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7b9f145320647630c581dcd8b7cb5f4bc961741f
tree00533fde894a118f0d1d85dc9de8da975323e923
parent193b4d8686b7d9f38c8abcd23726522392a9bdbc
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