X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/7b27dfa59f08097c83b79a90edd2c72716f930f7..e9956e90300c765498554ea6f5928edbafd825fd:/lincan/include/main.h diff --git a/lincan/include/main.h b/lincan/include/main.h index e05e774..99a493d 100644 --- a/lincan/include/main.h +++ b/lincan/include/main.h @@ -80,6 +80,7 @@ struct candevice_t { int nr_all_chips; int nr_82527_chips; int nr_sja1000_chips; + can_spinlock_t device_lock; struct canchip_t *chip[MAX_HW_CHIPS]; struct hwspecops_t *hwspecops; @@ -320,6 +321,8 @@ struct hwspecops_t { * @enable_configuration: enable chip configuration mode * @disable_configuration: disable chip configuration mode * @set_btregs: configures bitrate registers + * @attach_to_chip: attaches to the chip, setups registers and possibly state informations + * @release_chip: called before chip structure removal if %CHIP_ATTACHED is set * @start_chip: starts chip message processing * @stop_chip: stops chip message processing * @irq_handler: interrupt service routine @@ -350,6 +353,8 @@ struct chipspecops_t { int (*disable_configuration)(struct canchip_t *chip); int (*set_btregs)(struct canchip_t *chip, unsigned short btr0, unsigned short btr1); + int (*attach_to_chip)(struct canchip_t *chip); + int (*release_chip)(struct canchip_t *chip); int (*start_chip)(struct canchip_t *chip); int (*stop_chip)(struct canchip_t *chip); int (*irq_handler)(int irq, struct canchip_t *chip);