mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Vincent Mailhol <mailhol@kernel.org>,
	netdev@vger.kernel.org,
	Stephen Hemminger <stephen@networkplumber.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	David Ahern <dsahern@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-can@vger.kernel.org
Subject: Re: [PATCH 6/7] iplink_can: add CAN XL's "tms" option
Date: Sat, 29 Nov 2025 18:21:17 +0100	[thread overview]
Message-ID: <d2e94a1f-b2f3-473a-babe-76fd0fed0ab9@hartkopp.net> (raw)
In-Reply-To: <20251129-canxl-netlink-v1-6-96f2c0c54011@kernel.org>

Hi Vincent,

On 29.11.25 16:29, Vincent Mailhol wrote:
> This is the iproute2 counterpart of Linux kernel's commit 233134af2086
> ("can: netlink: add CAN_CTRLMODE_XL_TMS flag").
> 
> The Transceiver Mode Switching (TMS) indicates whether the CAN XL
> controller shall use the PWM or NRZ encoding during the data phase.
> 
> The term "transceiver mode switching" is used in both ISO 11898-1 and CiA
> 612-2 (although only the latter one uses the abbreviation TMS). We adopt
> the same naming convention here for consistency.
> 
> Add the "tms" option to iplink_can which controls the CAN_CTRLMODE_XL_TMS
> flag of the CAN netlink interface.
> 
> Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
> ---
>   ip/iplink_can.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/ip/iplink_can.c b/ip/iplink_can.c
> index 24f59aad..3e7925e8 100644
> --- a/ip/iplink_can.c
> +++ b/ip/iplink_can.c
> @@ -49,6 +49,7 @@ static void print_usage(FILE *f)
>   		"\t[ restricted { on | off } ]\n"
>   		"\t[ xl { on | off } ]\n"
>   		"\t[ xtdc-mode { auto | manual | off } ]\n"
> +		"\t[ tms { on | off } ]\n"
>   		"\n"
>   		"\t[ restart-ms TIME-MS ]\n"
>   		"\t[ restart ]\n"
> @@ -127,6 +128,7 @@ static void print_ctrlmode(enum output_type t, __u32 flags, const char *key)
>   	print_flag(t, &flags, CAN_CTRLMODE_XL, "XL");
>   	print_flag(t, &flags, CAN_CTRLMODE_XL_TDC_AUTO, "XL-TDC-AUTO");
>   	print_flag(t, &flags, CAN_CTRLMODE_XL_TDC_MANUAL, "XL-TDC-MANUAL");
> +	print_flag(t, &flags, CAN_CTRLMODE_XL_TMS, "XL-TMS");

print_flag(t, &flags, CAN_CTRLMODE_XL_TMS, "TMS");

That fits to the command line option and the messages inside the kernel now.

Best regards,
Oliver

>   
>   	if (flags)
>   		print_hex(t, NULL, "%x", flags);
> @@ -333,6 +335,9 @@ static int can_parse_opt(struct link_util *lu, int argc, char **argv,
>   				invarg("\"xtdc-mode\" must be either of \"auto\", \"manual\" or \"off\"",
>   					*argv);
>   			}
> +		} else if (matches(*argv, "tms") == 0) {
> +			NEXT_ARG();
> +			set_ctrlmode("tms", *argv, &cm, CAN_CTRLMODE_XL_TMS);
>   		} else if (matches(*argv, "restart") == 0) {
>   			__u32 val = 1;
>   
> 


  reply	other threads:[~2025-11-29 17:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 15:29 [PATCH 0/7] iplink_can: add CAN XL support Vincent Mailhol
2025-11-29 15:29 ` [PATCH 1/7] iplink_can: print_usage: fix the text indentation Vincent Mailhol
2025-11-29 15:29 ` [PATCH 2/7] iplink_can: print_usage: change unit for minimum time quanta to mtq Vincent Mailhol
2025-11-29 15:29 ` [PATCH 3/7] iplink_can: print_usage: describe the CAN bittiming units Vincent Mailhol
2025-11-29 15:29 ` [PATCH 4/7] iplink_can: add the "restricted" option Vincent Mailhol
2025-11-29 17:03   ` Stephen Hemminger
2025-11-29 15:29 ` [PATCH 5/7] iplink_can: add initial CAN XL support Vincent Mailhol
2025-11-29 17:04   ` Stephen Hemminger
2025-11-29 23:13     ` Vincent Mailhol
2025-11-29 15:29 ` [PATCH 6/7] iplink_can: add CAN XL's "tms" option Vincent Mailhol
2025-11-29 17:21   ` Oliver Hartkopp [this message]
2025-11-29 23:16     ` Vincent Mailhol
2025-11-29 15:29 ` [PATCH 7/7] iplink_can: add CAN XL's PWM interface Vincent Mailhol
2025-11-29 17:26   ` Oliver Hartkopp
2025-11-29 15:38 ` [PATCH 0/7] iplink_can: add CAN XL support Vincent Mailhol

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=d2e94a1f-b2f3-473a-babe-76fd0fed0ab9@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=dsahern@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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 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®