From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-co1nam03on0121.outbound.protection.outlook.com ([104.47.40.121]:64374 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728649AbeIBRVd (ORCPT ); Sun, 2 Sep 2018 13:21:33 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Andrey Smirnov , Lee Jones , Sasha Levin Subject: [PATCH AUTOSEL 4.18 109/131] mfd: rave-sp: Initialize flow control and parity of the port Date: Sun, 2 Sep 2018 13:05:20 +0000 Message-ID: <20180902064601.183036-109-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Andrey Smirnov [ 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 --- drivers/mfd/rave-sp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index 36dcd98977d6..4f545fdc6ebc 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; =20 serdev_device_set_baudrate(serdev, baud); + serdev_device_set_flow_control(serdev, false); + + ret =3D serdev_device_set_parity(serdev, SERDEV_PARITY_NONE); + if (ret) { + dev_err(dev, "Failed to set parity\n"); + return ret; + } =20 ret =3D rave_sp_get_status(sp); if (ret) { --=20 2.17.1