From 8067389268a55b493aba5414ea99cdc6a8f93865 Mon Sep 17 00:00:00 2001 From: ppisa Date: Wed, 15 Jun 2005 13:45:28 +0000 Subject: [PATCH] Added ipci165_attach_to_chip and ipci165_release_chip, which are mandatory for the latest LinCAN base version. --- lincan/src/ipci165.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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; -- 2.39.2