summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol@kernel.org>2025-11-26 13:16:10 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2025-11-26 13:20:43 +0300
commit8e2a2885a2a6217190065d1aae98fe88a670cc28 (patch)
tree5a935695c5ef5cc0c6b5454db3efed4026898e3e /scripts
parentf6ccc2b293ba27e9171c63e456d9cba664fa2337 (diff)
downloadlinux-8e2a2885a2a6217190065d1aae98fe88a670cc28.tar.xz
can: bittiming: add PWM validation
Add can_validate_pwm() to validate the values pwms, pwml and pwml. Error messages are added to each of the checks to inform the user on what went wrong. Refer to those error messages to understand the validation logic. The boundary values CAN_PWM_DECODE_NS (the transceiver minimum decoding margin) and CAN_PWM_NS_MAX (the maximum PWM symbol duration) are hardcoded for the moment. Note that a transceiver capable of bitrates higher than 20 Mbps may be able to handle a CAN_PWM_DECODE_NS below 5 ns. If such transceivers become commercially available, this code could be revisited to make this parameter configurable. For now, leave it static. Signed-off-by: Vincent Mailhol <mailhol@kernel.org> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://patch.msgid.link/20251126-canxl-v8-9-e7e3eb74f889@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions