From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
linux-kernel@vger.kernel.org, cphealy@gmail.com,
Lucas Stach <l.stach@pengutronix.de>,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Subject: [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port
Date: Fri, 6 Jul 2018 19:41:05 -0700 [thread overview]
Message-ID: <20180707024108.32373-4-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20180707024108.32373-1-andrew.smirnov@gmail.com>
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.
Cc: linux-kernel@vger.kernel.org
Cc: cphealy@gmail.com
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
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 a90ec4986b22..aa75d5841ca0 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -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) {
--
2.17.1
next prev parent reply other threads:[~2018-07-07 2:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 2:41 [PATCH 0/6] RAVE SP MFD driver fixes/improvements Andrey Smirnov
2018-07-07 2:41 ` [PATCH 1/6] mfd: rave-sp: Remove unused defines Andrey Smirnov
2018-07-13 7:30 ` Lee Jones
2018-07-07 2:41 ` [PATCH 2/6] mfd: rave-sp: Fix incorrectly specified checksum type Andrey Smirnov
2018-07-13 7:30 ` Lee Jones
2018-07-07 2:41 ` Andrey Smirnov [this message]
2018-07-13 7:31 ` [PATCH 3/6] mfd: rave-sp: Initialize flow control and parity of the port Lee Jones
2018-07-07 2:41 ` [PATCH 4/6] mfd: rave-sp: Add legacy EEPROM access command translation Andrey Smirnov
2018-07-13 7:31 ` Lee Jones
2018-07-07 2:41 ` [PATCH 5/6] mfd: rave-sp: Add legacy watchdog ping " Andrey Smirnov
2018-07-13 7:31 ` Lee Jones
2018-07-07 2:41 ` [PATCH 6/6] mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it Andrey Smirnov
2018-07-13 7:31 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180707024108.32373-4-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=cphealy@gmail.com \
--cc=l.stach@pengutronix.de \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita.yoush@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®