2 * Header file for the Linux CAN-bus driver.
3 * Written by Jan Kriz email:johen@post.cz
4 * This software is released under the GPL-License.
5 * Version lincan-0.3 17 Jul 2008
11 #include <linux/errno.h>
12 #include <linux/init.h>
13 #include <linux/slab.h>
14 #include <linux/kref.h>
15 #include <asm/uaccess.h>
16 #include <linux/usb.h>
17 #include <linux/mutex.h>
19 int usbcan_request_io(struct candevice_t *candev);
20 int usbcan_release_io(struct candevice_t *candev);
21 int usbcan_reset(struct candevice_t *candev);
22 int usbcan_init_hw_data(struct candevice_t *candev);
23 int usbcan_init_chip_data(struct candevice_t *candev, int chipnr);
24 int usbcan_init_obj_data(struct canchip_t *chip, int objnr);
25 void usbcan_write_register(unsigned data, unsigned long address);
26 unsigned usbcan_read_register(unsigned long address);
27 int usbcan_program_irq(struct candevice_t *candev);
29 int usbcan_chip_config(struct canchip_t *chip);
30 int usbcan_extended_mask(struct canchip_t *chip, unsigned long code, unsigned long mask);
31 int usbcan_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
32 int sampl_pt, int flags);
33 int usbcan_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj);
34 int usbcan_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj,
35 struct canmsg_t *msg);
36 int usbcan_send_msg(struct canchip_t *chip, struct msgobj_t *obj,
37 struct canmsg_t *msg);
38 int usbcan_fill_chipspecops(struct canchip_t *chip);
39 int usbcan_irq_handler(int irq, struct canchip_t *chip);
41 int usbcan_init(void);
42 void usbcan_exit(void);