All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: Jeroen Hofstee <jhofstee@victronenergy.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH v3 4/7] can: gs_usb: document GS_CAN_FEATURE_BERR_REPORTING
Date: Thu, 20 Oct 2022 00:10:13 +0200	[thread overview]
Message-ID: <20221019221016.1659260-5-mkl@pengutronix.de> (raw)
In-Reply-To: <20221019221016.1659260-1-mkl@pengutronix.de>

From: Jeroen Hofstee <jhofstee@victronenergy.com>

Document the new feature ("GS_CAN_FEATURE_BERR_REPORTING") that
indicates that the bus error reporting in the CAN controller can
switched on and off with the GS_CAN_MODE_BERR_REPORTING mode bit in
the GS_USB_BREQ_MODE control message.

Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Link: https://lore.kernel.org/all/20221019213035.1607752-5-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/gs_usb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index f9e2b394c71e..68e474a762c5 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -134,6 +134,7 @@ struct gs_device_config {
 /* GS_CAN_FEATURE_REQ_USB_QUIRK_LPC546XX BIT(9) */
 /* GS_CAN_FEATURE_BT_CONST_EXT BIT(10) */
 /* GS_CAN_FEATURE_TERMINATION BIT(11) */
+#define GS_CAN_MODE_BERR_REPORTING BIT(12)
 
 struct gs_device_mode {
 	__le32 mode;
@@ -174,7 +175,8 @@ struct gs_device_termination_state {
 #define GS_CAN_FEATURE_REQ_USB_QUIRK_LPC546XX BIT(9)
 #define GS_CAN_FEATURE_BT_CONST_EXT BIT(10)
 #define GS_CAN_FEATURE_TERMINATION BIT(11)
-#define GS_CAN_FEATURE_MASK GENMASK(11, 0)
+#define GS_CAN_FEATURE_BERR_REPORTING BIT(12)
+#define GS_CAN_FEATURE_MASK GENMASK(12, 0)
 
 /* internal quirks - keep in GS_CAN_FEATURE space for now */
 
-- 
2.35.1



  parent reply	other threads:[~2022-10-19 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 22:10 [PATCH v3 0/7] can: gs_usb: new features: GS_CAN_FEATURE_GET_STATE, GS_CAN_FEATURE_BERR_REPORTING Marc Kleine-Budde
2022-10-19 22:10 ` [PATCH v3 1/7] can: gs_usb: gs_can_open(): allow loopback and listen only at the same time Marc Kleine-Budde
2022-10-19 22:10 ` [PATCH v3 2/7] can: gs_usb: gs_can_open(): sort checks for ctrlmode Marc Kleine-Budde
2022-10-19 22:10 ` [PATCH v3 3/7] can: gs_usb: gs_can_open(): merge setting of timestamp flags and init Marc Kleine-Budde
2022-10-19 22:10 ` Marc Kleine-Budde [this message]
2022-10-19 22:10 ` [PATCH v3 5/7] can: gs_usb: add ability to enable / disable berr reporting Marc Kleine-Budde
2022-10-19 22:10 ` [PATCH v3 6/7] can: gs_usb: document GS_CAN_FEATURE_GET_STATE Marc Kleine-Budde
2022-10-19 22:10 ` [PATCH v3 7/7] can: gs_usb: add support for reading error counters Marc Kleine-Budde

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=20221019221016.1659260-5-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=jhofstee@victronenergy.com \
    --cc=linux-can@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.