Re: [PATCH v8 4/7] can: Add Nuvoton NCT6694 CANFD support

From: Ming Yu
Date: Thu Mar 27 2025 - 22:38:04 EST


Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> 於 2025年3月27日 週四 下午3:25寫道:
>
> On 27.03.2025 13:38:22, Ming Yu wrote:
> > Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> 於 2025年3月27日 週四 上午1:41寫道:
> > >
> > > > > > > > + priv->can.clock.freq = can_clk;
> > > > > > > > + priv->can.bittiming_const = &nct6694_can_bittiming_nominal_const;
> > > > > > > > + priv->can.data_bittiming_const = &nct6694_can_bittiming_data_const;
> > > > > > > > + priv->can.do_set_mode = nct6694_can_set_mode;
> > > > > > > > + priv->can.do_get_berr_counter = nct6694_can_get_berr_counter;
> > > > > > > > + priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
> > > > > > > > + CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_BERR_REPORTING |
> > > > > > > > + CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO;
> > > > > > >
> > > > > > > Does your device run in CAN-FD mode all the time? If so, please use
> > > > > > > can_set_static_ctrlmode() to set it after priv->can.ctrlmode_supported
> > > > > > > and remove CAN_CTRLMODE_FD from ctrlmode_supported.
> > > > > > >
> > > > > >
> > > > > > Our device is designed to allow users to dynamically switch between
> > > > > > Classical CAN and CAN-FD mode via ip link set ... fd on/off.
> > > > > > Therefore, CAN_CTRLMODE_FD needs to remain in ctrlmode_supported, and
> > > > > > can_set_static_ctrlmode() is not suitable in this case.
> > > > > > Please let me know if you have any concerns about this approach.
> > > > >
> > > > > Where do you evaluate if the user has configured CAN_CTRLMODE_FD or not?
> > > > >
> > > >
> > > > Sorry, I was previously confused about our device's control mode. I
> > > > will use can_set_static_ctrlmode() to set CAN_FD mode in the next
> > > > patch.
> > >
> > > Does your device support CAN-CC only mode? Does your device support to
> > > switch between CAN-CC only and CAN-FD mode?
> > >
> >
> > Our device supports both CAN-CC and CAN-FD mode.
>
> This doesn't answer my question:
>
> Does your device support CAN-CC only mode?
>

It can dynamically switch between CAN-CC and CAN-FD mode when
trasmitting or receiving, depending on whether the nct6694_can_frame
passs the flag with NCT6694_CAN_FRAME_FLAG_FD.


Thanks,
Ming