blob: d5e03e558b352b123fb685fc7917a32099fd0839 [file] [log] [blame]
Ian Abbott97ce84d2012-06-19 10:17:45 +01001#ifndef _COMEDI_INTERNAL_H
2#define _COMEDI_INTERNAL_H
3
Ian Abbottf2867662012-06-19 10:17:46 +01004#include <linux/types.h>
5
Greg Kroah-Hartman24343582010-05-03 15:38:37 -07006/*
Ian Abbott4d7df822012-04-13 14:12:53 +01007 * various internal comedi stuff
Greg Kroah-Hartman24343582010-05-03 15:38:37 -07008 */
Greg Kroah-Hartman3b6b25b2010-05-03 15:50:09 -07009int do_rangeinfo_ioctl(struct comedi_device *dev,
10 struct comedi_rangeinfo __user *arg);
Ian Abbott7638ffc2013-04-04 14:58:50 +010011struct comedi_device *comedi_alloc_board_minor(struct device *hardware_device);
Ian Abbott3346b792013-04-04 14:58:47 +010012void comedi_release_hardware_device(struct device *hardware_device);
Ian Abbottf65cc542013-02-01 10:20:30 +000013int comedi_alloc_subdevice_minor(struct comedi_subdevice *s);
Ian Abbotte9ab1c22013-02-01 10:20:29 +000014void comedi_free_subdevice_minor(struct comedi_subdevice *s);
H Hartley Sweeten61c9fb02013-01-09 13:27:07 -070015
Greg Kroah-Hartman7029a872010-05-03 15:55:45 -070016int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
17 unsigned long new_size);
H Hartley Sweeten61c9fb02013-01-09 13:27:07 -070018void comedi_buf_reset(struct comedi_async *async);
H Hartley Sweeten8bd650f2013-01-09 13:32:18 -070019unsigned int comedi_buf_write_n_allocated(struct comedi_async *async);
Ian Abbott4d7df822012-04-13 14:12:53 +010020
21extern unsigned int comedi_default_buf_size_kb;
22extern unsigned int comedi_default_buf_maxsize_kb;
H Hartley Sweeten39bd5e592013-01-30 15:25:06 -070023
24/* drivers.c */
25
Ian Abbottf2867662012-06-19 10:17:46 +010026extern struct comedi_driver *comedi_drivers;
Ian Abbott97ce84d2012-06-19 10:17:45 +010027
H Hartley Sweeten39bd5e592013-01-30 15:25:06 -070028int insn_inval(struct comedi_device *, struct comedi_subdevice *,
29 struct comedi_insn *, unsigned int *);
30
31void comedi_device_detach(struct comedi_device *);
32int comedi_device_attach(struct comedi_device *, struct comedi_devconfig *);
33
H Hartley Sweeten085494a2013-01-30 15:25:31 -070034#ifdef CONFIG_PROC_FS
35
36/* proc.c */
37
38void comedi_proc_init(void);
39void comedi_proc_cleanup(void);
40#else
41static inline void comedi_proc_init(void)
42{
43}
44static inline void comedi_proc_cleanup(void)
45{
46}
47#endif
48
Ian Abbott97ce84d2012-06-19 10:17:45 +010049#endif /* _COMEDI_INTERNAL_H */