mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
serial: st-asc: Use new GPIOD API to obtain RTS pin
The commits mentioned below adapt the GPIO API to allow more information to be passed directly through devm_get_gpiod_from_child() in the first instance. This facilitates the removal of subsequent calls, such as gpiod_direction_output(). This patch firstly moves to utilise the new API and secondly removes the now superfluous call do set the direction. Reported-by: Stephen Rothwell <[email protected]> Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Lee Jones <[email protected]> [Also drop the header file dummies that only this driver was using] Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
f759921cfb
commit
0043c1dfbe
2 changed files with 6 additions and 21 deletions
|
|
@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||
pinctrl_select_state(ascport->pinctrl,
|
||||
ascport->states[NO_HW_FLOWCTRL]);
|
||||
|
||||
gpiod = devm_get_gpiod_from_child(port->dev, "rts",
|
||||
&np->fwnode);
|
||||
if (!IS_ERR(gpiod)) {
|
||||
gpiod_direction_output(gpiod, 0);
|
||||
gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
|
||||
"rts",
|
||||
&np->fwnode,
|
||||
GPIOD_OUT_LOW,
|
||||
np->name);
|
||||
if (!IS_ERR(gpiod))
|
||||
ascport->rts = gpiod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue