From: Brian Kloppenborg <bkloppenborg@gmail.com>
To: Johan Hovold <johan@kernel.org>, linux-usb@vger.kernel.org
Cc: Brian Kloppenborg <brian@kloppenborg.net>
Subject: [PATCH 2/2] Make cp210x register GPS PPS signals on the RI pin.
Date: Sun, 8 Oct 2023 20:34:25 -0600 [thread overview]
Message-ID: <20231009023425.366783-3-brian@kloppenborg.net> (raw)
In-Reply-To: <20231009023425.366783-1-brian@kloppenborg.net>
---
drivers/usb/serial/cp210x.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index af96d592456b..458360851a71 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -857,6 +857,15 @@ static void cp210x_process_msr(struct usb_serial_port *port, unsigned char msr,
if(msr & CP210X_MSR_DELTA_RI_BIT) {
port->icount.rng++;
+
+ // Support PPS signal on Ring Indicator pin. While uncommon, this is
+ // found on some devices, like the Adafruit Ultimate GPS USB-C edition.
+ tty = tty_port_tty_get(&port->port);
+ if (tty) {
+ usb_serial_handle_dcd_change(port, tty,
+ (msr) & CP210X_MSR_RI_STATE_BIT);
+ }
+ tty_kref_put(tty);
}
if(msr & CP210X_MSR_DELTA_DCD_BIT) {
--
2.34.1
next prev parent reply other threads:[~2023-10-09 2:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 2:34 [PATCH 0/2] Enable modem line status events on cp210x, add support for PPS on RI pin Brian Kloppenborg
2023-10-09 2:34 ` [PATCH 1/2] Make cp210x respond to modem status changes (CTS, DSR, RI, DCD) by default Brian Kloppenborg
2023-10-09 8:59 ` Greg KH
2023-10-09 9:00 ` Greg KH
2023-10-09 2:34 ` Brian Kloppenborg [this message]
2023-10-09 9:00 ` [PATCH 2/2] Make cp210x register GPS PPS signals on the RI pin Greg KH
2023-12-15 13:02 ` [PATCH 0/2] Enable modem line status events on cp210x, add support for PPS on " Johan Hovold
2023-12-16 1:40 ` Brian Kloppenborg
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=20231009023425.366783-3-brian@kloppenborg.net \
--to=bkloppenborg@gmail.com \
--cc=brian@kloppenborg.net \
--cc=johan@kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.