]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mfd: rave-sp: Initialize flow control and parity of the port
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Sat, 7 Jul 2018 02:41:05 +0000 (19:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:41:36 +0000 (22:41 +0200)
[ 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 <andrew.smirnov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/rave-sp.c

index 36dcd98977d6da6add1075b19376fe8ab562e936..4f545fdc6ebcc1ae5b8dfe1bc76177c987b134c2 100644 (file)
@@ -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) {