From: Andrey Smirnov Date: Sat, 7 Jul 2018 02:41:05 +0000 (-0700) Subject: mfd: rave-sp: Initialize flow control and parity of the port X-Git-Tag: v4.18.9~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3ca5bae4d2d8f35ad847625b9f693c73db467f4e;p=users%2Fdwmw2%2Flinux.git mfd: rave-sp: Initialize flow control and parity of the port [ Upstream commit 6c450bdf13ebe110821a74960936cec936edae49 ] 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 Signed-off-by: Lee Jones Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index 36dcd98977d6d..4f545fdc6ebcc 100644 --- a/drivers/mfd/rave-sp.c +++ b/drivers/mfd/rave-sp.c @@ -776,6 +776,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) {