Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
staging
iio
iio_simple_dummy.h
Go to the documentation of this file.
1
11
#include <linux/kernel.h>
12
13
struct
iio_dummy_accel_calibscale
;
14
28
struct
iio_dummy_state
{
29
int
dac_val
;
30
int
single_ended_adc_val
;
31
int
differential_adc_val
[2];
32
int
accel_val
;
33
int
accel_calibbias
;
34
const
struct
iio_dummy_accel_calibscale
*
accel_calibscale
;
35
struct
mutex
lock
;
36
#ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS
37
int
event_irq;
38
int
event_val;
39
bool
event_en;
40
#endif
/* CONFIG_IIO_SIMPLE_DUMMY_EVENTS */
41
};
42
43
#ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS
44
45
struct
iio_dev
;
46
47
int
iio_simple_dummy_read_event_config
(
struct
iio_dev
*indio_dev,
48
u64
event_code
);
49
50
int
iio_simple_dummy_write_event_config
(
struct
iio_dev
*indio_dev,
51
u64
event_code
,
52
int
state
);
53
54
int
iio_simple_dummy_read_event_value
(
struct
iio_dev
*indio_dev,
55
u64
event_code
,
56
int
*
val
);
57
58
int
iio_simple_dummy_write_event_value
(
struct
iio_dev
*indio_dev,
59
u64
event_code
,
60
int
val
);
61
62
int
iio_simple_dummy_events_register
(
struct
iio_dev
*indio_dev);
63
int
iio_simple_dummy_events_unregister
(
struct
iio_dev
*indio_dev);
64
65
#else
/* Stubs for when events are disabled at compile time */
66
67
static
inline
int
68
iio_simple_dummy_events_register
(
struct
iio_dev
*indio_dev)
69
{
70
return
0;
71
};
72
73
static
inline
int
74
iio_simple_dummy_events_unregister
(
struct
iio_dev
*indio_dev)
75
{
76
return
0;
77
};
78
79
#endif
/* CONFIG_IIO_SIMPLE_DUMMY_EVENTS*/
80
90
enum
iio_simple_dummy_scan_elements
{
91
voltage0
,
92
diffvoltage1m2
,
93
diffvoltage3m4
,
94
accelx
,
95
};
96
97
#ifdef CONFIG_IIO_SIMPLE_DUMMY_BUFFER
98
int
iio_simple_dummy_configure_buffer
(
struct
iio_dev
*indio_dev,
99
const
struct
iio_chan_spec
*
channels
,
unsigned
int
num_channels
);
100
void
iio_simple_dummy_unconfigure_buffer
(
struct
iio_dev
*indio_dev);
101
#else
102
static
inline
int
iio_simple_dummy_configure_buffer
(
struct
iio_dev
*indio_dev,
103
const
struct
iio_chan_spec
*
channels
,
unsigned
int
num_channels
)
104
{
105
return
0;
106
};
107
static
inline
108
void
iio_simple_dummy_unconfigure_buffer
(
struct
iio_dev
*indio_dev)
109
{};
110
#endif
/* CONFIG_IIO_SIMPLE_DUMMY_BUFFER */
Generated on Thu Jan 10 2013 14:28:46 for Linux Kernel by
1.8.2