~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/staging/iio/adc/ad7298.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#define AD7298_TAVG     (1 << 1) /* temperature sensor averaging enable */
18
18
#define AD7298_PDD      (1 << 0) /* partial power down enable */
19
19
 
20
 
#define AD7298_CH_MASK  (AD7298_CH0 | AD7298_CH1 | AD7298_CH2 | AD7298_CH3 | \
21
 
                        AD7298_CH4 | AD7298_CH5 | AD7298_CH6 | AD7298_CH7)
22
 
 
23
20
#define AD7298_MAX_CHAN         8
24
21
#define AD7298_BITS             12
25
22
#define AD7298_STORAGE_BITS     16
26
23
#define AD7298_INTREF_mV        2500
27
24
 
 
25
#define AD7298_CH_TEMP          9
 
26
 
28
27
#define RES_MASK(bits)  ((1 << (bits)) - 1)
29
28
 
30
29
/*
37
36
};
38
37
 
39
38
struct ad7298_state {
40
 
        struct iio_dev                  *indio_dev;
41
39
        struct spi_device               *spi;
42
40
        struct regulator                *reg;
43
 
        struct work_struct              poll_work;
44
 
        atomic_t                        protect_ring;
45
41
        size_t                          d_size;
46
42
        u16                             int_vref_mv;
47
43
        unsigned                        ext_ref;
58
54
};
59
55
 
60
56
#ifdef CONFIG_IIO_RING_BUFFER
61
 
int ad7298_scan_from_ring(struct ad7298_state *st, long ch);
 
57
int ad7298_scan_from_ring(struct iio_dev *indio_dev, long ch);
62
58
int ad7298_register_ring_funcs_and_init(struct iio_dev *indio_dev);
63
59
void ad7298_ring_cleanup(struct iio_dev *indio_dev);
64
60
#else /* CONFIG_IIO_RING_BUFFER */
65
 
static inline int ad7298_scan_from_ring(struct ad7298_state *st, long ch)
 
61
static inline int ad7298_scan_from_ring(struct iio_dev *indio_dev, long ch)
66
62
{
67
63
        return 0;
68
64
}