Bhupesh SHARMA wrote: > Hi Mark, > >> -----Original Message----- >> From: Marc Kleine-Budde [mailto:[email protected]] >> Sent: Tuesday, August 31, 2010 4:36 PM >> To: Bhupesh SHARMA >> Cc: Wolfgang Grandegger; [email protected] >> Subject: Re: [RFC PATCH 2/4 RESEND] Bosch CCAN driver >> >> Bhupesh SHARMA wrote: >>>> -----Original Message----- >>>> From: Marc Kleine-Budde [mailto:[email protected]] >>>> Sent: Tuesday, August 31, 2010 4:12 PM >>>> To: Bhupesh SHARMA >>>> Cc: Wolfgang Grandegger; [email protected] >>>> Subject: Re: [RFC PATCH 2/4 RESEND] Bosch CCAN driver >>>> >>>> Bhupesh SHARMA wrote: >>>> >>>> [...] >>>> >>>>>>> +enum bosch_ccan_operating_mode { >>>>>>> + CCAN_NORMAL_MODE = 0, >>>>>>> + CCAN_BASIC_MODE, >>>>>>> + CCAN_LOOPBACK_MODE, >>>>>>> + CCAN_LOOPBACK_WITH_SILENT_MODE, >>>>>>> + CCAN_SILENT_MODE >>>>>>> +}; >>>>>> I do not see a need for another enumeration o the type. We already >>>>>> have the CAN_CTRLMODE_*. >>>>> Yes. But I don't see CAN_CTRLMODE_* capturing all the operating >> mode >>>> types supported by Bosch CCAN. >>>> >>>> which are missing? >>> I guess CCAN_BASIC_MODE and CCAN_LOOPBACK_WITH_SILENT_MODE are >> missing. >>> Or am I missing something here. >> ccan's silent seems to map to socketcan's listen only. >> >> What's the difference between normal and basic mode? > > Correct, ccan's silent maps to socketcan's listen but what about 'loopback > with silent' mode supported by ccan.
it's a combination of these: [frog...@hardanger:linux-2.6 (master)]$ grep -r -e "CTRLMODE_\(LISTEN\|LOOPBACK\)" include/linux/can include/linux/can/netlink.h:#define CAN_CTRLMODE_LOOPBACK 0x01 /* Loopback mode */ include/linux/can/netlink.h:#define CAN_CTRLMODE_LISTENONLY 0x02 /* Listen-only mode */ :) > Also the normal and basic modes differ. As per the Bosch CCAN User Manual: > Basic Mode: > The IF1 Registers are used as Transmit Buffer and the IF2 Registers are used > as Receive Buffer. > The transmission of the contents of the IF1 Registers is requested by writing > the Busy bit of the IF1 Command > Request Register to '1' and after the reception of a message the contents of > the shift register is stored into > the IF2 Registers, without any acceptance filtering. > > In Basic Mode the evaluation of all Message Object related control and status > bits and of the > control bits of the IFx Command Mask Registers is turned off. > > This is entirely different from the NORMAL mode. I'm not into the chip, but it seems we just need one of these modes, makes from my point of view no sense to make it configurable. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
