[PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding

Vincent Mailhol posted 3 patches 3 months, 1 week ago
drivers/net/can/dev/calc_bittiming.c | 68 ++++++++++++++++++++++++------------
1 file changed, 45 insertions(+), 23 deletions(-)
[PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding
Posted by Vincent Mailhol 3 months, 1 week ago
I wrote this series in response to Oliver's feedback in [1]. I am
sending this as an RFC based on top of [2] for the moment so that we
can discuss this separately. The plan is to merge this to the CAN XL
branch once we reach a consensus on this part.

Patch #1 and #2 are refactors, patch #3 introduces a dedicated
function for the PWM sample point calculation.

[1] https://lore.kernel.org/linux-can/743ba133-3735-48fd-994a-9727cfe8c114@hartkopp.net/

[2] [PATCH v2 00/10] can: netlink: add CAN XL
Link: https://lore.kernel.org/linux-can/20251021-canxl-netlink-v2-0-8b8f58257ab6@kernel.org/

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
Vincent Mailhol (3):
      can: calc_bittiming: get rid of the incorrect "nominal" word
      can: calc_bittiming: add can_calc_sample_point_nrz()
      can: calc_bittiming: add can_calc_sample_point_pwm()

 drivers/net/can/dev/calc_bittiming.c | 68 ++++++++++++++++++++++++------------
 1 file changed, 45 insertions(+), 23 deletions(-)
---
base-commit: ffee675aceb9f44b0502a8bec912abb0c4f4af62
change-id: 20251102-pwm_sample_point-8823cb3cd459
prerequisite-change-id: 20241229-canxl-netlink-bc640af10673:v2
prerequisite-patch-id: 6b3294205bd76b38257516c63b7001ab242c9b62
prerequisite-patch-id: 56431d12edcc0f325cf5204bb6868742c462c0ed
prerequisite-patch-id: 1547fd7ea8f1937f0491cfc0996b09890f850991
prerequisite-patch-id: 1dae270b0454352e46b927f71d1b47ff2bf7a49e
prerequisite-patch-id: e4d43de873dfdefc023a0b86e397b37ea2b9e9a3
prerequisite-patch-id: 4f3db477ff411effe70075c59ae6eac04fc65600
prerequisite-patch-id: 148dbfce9d3bb09537087ee93e60bb7819bdadee
prerequisite-patch-id: 7996539e26d449e8db260425c7287b4dce8cdf35
prerequisite-patch-id: 42215044df6a63fff07c7a7d771d7dc375cc8b0e
prerequisite-patch-id: 640ebf8ac8a1d114dcb91e6c05b9414bd09416fc
prerequisite-patch-id: 84ee5e4f937f8e4cd97833d601affea78fe55914

Best regards,
-- 
Vincent Mailhol <mailhol@kernel.org>
Re: [PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding
Posted by Vincent Mailhol 2 months, 3 weeks ago
On 02/11/2025 at 23:01, Vincent Mailhol wrote:
> I wrote this series in response to Oliver's feedback in [1]. I am
> sending this as an RFC based on top of [2] for the moment so that we
> can discuss this separately. The plan is to merge this to the CAN XL
> branch once we reach a consensus on this part.

I changed my mind. I will keep this as a separate series. v2 is ready locally, I
will share everything together once the next can-xl series is ready.


Yours sincerely,
Vincent Mailhol
Re: [PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding
Posted by Oliver Hartkopp 2 months, 3 weeks ago
Hi Vincent,

I was not sure when you would show up again and therefore I started to 
rework the discussed points this morning

- error-signalling / mixed-mode / CANXL-only mode
- restricted mode warning removal
- TMS as a mandatory setting (now default off)

for your convenience and for an inspiration/review.

I'll send the patch set as-is without further documentation.

The PWM sample-point and CAN_RAW changes are missing.

Best regards,
Oliver

On 15.11.25 12:17, Vincent Mailhol wrote:
> On 02/11/2025 at 23:01, Vincent Mailhol wrote:
>> I wrote this series in response to Oliver's feedback in [1]. I am
>> sending this as an RFC based on top of [2] for the moment so that we
>> can discuss this separately. The plan is to merge this to the CAN XL
>> branch once we reach a consensus on this part.
> 
> I changed my mind. I will keep this as a separate series. v2 is ready locally, I
> will share everything together once the next can-xl series is ready.
> 
> 
> Yours sincerely,
> Vincent Mailhol
> 
>
Re: [PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding
Posted by Oliver Hartkopp 3 months ago

On 02.11.25 23:01, Vincent Mailhol wrote:
> I wrote this series in response to Oliver's feedback in [1]. I am
> sending this as an RFC based on top of [2] for the moment so that we
> can discuss this separately. The plan is to merge this to the CAN XL
> branch once we reach a consensus on this part.
> 
> Patch #1 and #2 are refactors, patch #3 introduces a dedicated
> function for the PWM sample point calculation.
> 
> [1] https://lore.kernel.org/linux-can/743ba133-3735-48fd-994a-9727cfe8c114@hartkopp.net/
> 
> [2] [PATCH v2 00/10] can: netlink: add CAN XL
> Link: https://lore.kernel.org/linux-can/20251021-canxl-netlink-v2-0-8b8f58257ab6@kernel.org/
> 
> Signed-off-by: Vincent Mailhol <mailhol@kernel.org>

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net>

> ---
> Vincent Mailhol (3):
>        can: calc_bittiming: get rid of the incorrect "nominal" word
>        can: calc_bittiming: add can_calc_sample_point_nrz()
>        can: calc_bittiming: add can_calc_sample_point_pwm()
> 
>   drivers/net/can/dev/calc_bittiming.c | 68 ++++++++++++++++++++++++------------
>   1 file changed, 45 insertions(+), 23 deletions(-)
> ---
> base-commit: ffee675aceb9f44b0502a8bec912abb0c4f4af62
> change-id: 20251102-pwm_sample_point-8823cb3cd459
> prerequisite-change-id: 20241229-canxl-netlink-bc640af10673:v2
> prerequisite-patch-id: 6b3294205bd76b38257516c63b7001ab242c9b62
> prerequisite-patch-id: 56431d12edcc0f325cf5204bb6868742c462c0ed
> prerequisite-patch-id: 1547fd7ea8f1937f0491cfc0996b09890f850991
> prerequisite-patch-id: 1dae270b0454352e46b927f71d1b47ff2bf7a49e
> prerequisite-patch-id: e4d43de873dfdefc023a0b86e397b37ea2b9e9a3
> prerequisite-patch-id: 4f3db477ff411effe70075c59ae6eac04fc65600
> prerequisite-patch-id: 148dbfce9d3bb09537087ee93e60bb7819bdadee
> prerequisite-patch-id: 7996539e26d449e8db260425c7287b4dce8cdf35
> prerequisite-patch-id: 42215044df6a63fff07c7a7d771d7dc375cc8b0e
> prerequisite-patch-id: 640ebf8ac8a1d114dcb91e6c05b9414bd09416fc
> prerequisite-patch-id: 84ee5e4f937f8e4cd97833d601affea78fe55914
> 
> Best regards,