Added missing chip attach and release to the virtual chip driver.
authorppisa <ppisa>
Fri, 1 Jul 2005 17:25:04 +0000 (17:25 +0000)
committerppisa <ppisa>
Fri, 1 Jul 2005 17:25:04 +0000 (17:25 +0000)
lincan/src/virtual.c

index 3b300a9..f1ae39e 100644 (file)
@@ -189,6 +189,30 @@ int virtual_stop_chip(struct canchip_t *chip)
        return 0;
 }
 
+/**
+ * virtual_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/virtual.c
+ */
+int virtual_attach_to_chip(struct canchip_t *chip)
+{
+       return 0;
+}
+
+/**
+ * virtual_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/virtual.c
+ */
+int virtual_release_chip(struct canchip_t *chip)
+{
+       virtual_stop_chip(chip);
+       return 0;
+}
 
 /**
  * virtual_remote_request: - configures message object and asks for RTR message
@@ -473,6 +497,8 @@ int virtual_init_chip_data(struct candevice_t *candev, int chipnr)
        chip->chipspecops->remote_request=virtual_remote_request;
        chip->chipspecops->enable_configuration=virtual_enable_configuration;
        chip->chipspecops->disable_configuration=virtual_disable_configuration;
+       chip->chipspecops->attach_to_chip=virtual_attach_to_chip;
+       chip->chipspecops->release_chip=virtual_release_chip;
        chip->chipspecops->set_btregs=virtual_set_btregs;
        chip->chipspecops->start_chip=virtual_start_chip;
        chip->chipspecops->stop_chip=virtual_stop_chip;