Skip to content

Commit

Permalink
mfd: rave-sp: Initialize flow control and parity of the port
Browse files Browse the repository at this point in the history
Relying on serial port defaults for flow control and parity can result
in complete breakdown of communication with RAVE SP on some platforms
where defaults are not what we need them to be. One such case is
VF610-base ZII SPU3 board (not supported upstream). To avoid this
problem in the future, add code to explicitly configure both.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Andrey Smirnov authored and Lee Jones committed Jul 27, 2018
1 parent a6e3bb0 commit 6c450bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/mfd/rave-sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,13 @@ static int rave_sp_probe(struct serdev_device *serdev)
return ret;

serdev_device_set_baudrate(serdev, baud);
serdev_device_set_flow_control(serdev, false);

ret = serdev_device_set_parity(serdev, SERDEV_PARITY_NONE);
if (ret) {
dev_err(dev, "Failed to set parity\n");
return ret;
}

ret = rave_sp_get_status(sp);
if (ret) {
Expand Down

0 comments on commit 6c450bd

Please sign in to comment.