From: ppisa Date: Wed, 15 Jun 2005 13:45:28 +0000 (+0000) Subject: Added ipci165_attach_to_chip and ipci165_release_chip, which are mandatory X-Git-Tag: CLT_COMM_CAN-lincan-0_3_1~4 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/8067389268a55b493aba5414ea99cdc6a8f93865?hp=6dbd69eeb947673bbcb552f83f439cf8516b19f6 Added ipci165_attach_to_chip and ipci165_release_chip, which are mandatory for the latest LinCAN base version. --- diff --git a/lincan/src/ipci165.c b/lincan/src/ipci165.c index 3dbbcb3..debe2c4 100644 --- a/lincan/src/ipci165.c +++ b/lincan/src/ipci165.c @@ -967,6 +967,32 @@ void ipci165_do_tx_timeout(unsigned long data) DEBUGMSG ("ipci165_do_tx_timeout: finished\n"); } +/** + * ipci165_attach_to_chip: - attaches to the chip, setups registers and state + * @chip: pointer to chip state structure + * + * Return Value: negative value reports error. + * File: src/ipci165.c + */ +int ipci165_attach_to_chip(struct canchip_t *chip) +{ + return 0; +} + +/** + * ipci165_release_chip: - called before chip structure removal if %CHIP_ATTACHED is set + * @chip: pointer to chip state structure + * + * Return Value: negative value reports error. + * File: src/ipci165.c + */ +int ipci165_release_chip(struct canchip_t *chip) +{ + ipci165_stop_chip(chip); + /* disable interrupts in the hardware, etc. */ + return 0; +} + /* * * iPC-I 165/PCI Board Functionality * * */ /** @@ -1419,6 +1445,8 @@ int ipci165_init_chip_data(struct candevice_t *candev, int chipnr) chip->chip_data = chip_data; CANMSG("initializing ipci165 chip operations\n"); + chip->chipspecops->attach_to_chip=ipci165_attach_to_chip; + chip->chipspecops->release_chip=ipci165_release_chip; chip->chipspecops->chip_config=ipci165_chip_config; chip->chipspecops->baud_rate=ipci165_baud_rate; chip->chipspecops->set_btregs=ipci165_set_btregs;