Added ipci165_attach_to_chip and ipci165_release_chip, which are mandatory
authorppisa <ppisa>
Wed, 15 Jun 2005 13:45:28 +0000 (13:45 +0000)
committerppisa <ppisa>
Wed, 15 Jun 2005 13:45:28 +0000 (13:45 +0000)
for the latest LinCAN base version.

lincan/src/ipci165.c

index 3dbbcb3..debe2c4 100644 (file)
@@ -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;