~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        bool                            use_onchip_ref;
49
49
};
50
50
 
 
51
/**
 
52
 * struct ad7887_chip_info - chip specifc information
 
53
 * @int_vref_mv:        the internal reference voltage
 
54
 * @channel:            channel specification
 
55
 */
 
56
 
51
57
struct ad7887_chip_info {
52
 
        u8                              bits;           /* number of ADC bits */
53
 
        u8                              storagebits;    /* number of bits read from the ADC */
54
 
        u8                              left_shift;     /* number of bits the sample must be shifted */
55
 
        char                            sign;           /* [s]igned or [u]nsigned */
56
 
        u16                             int_vref_mv;    /* internal reference voltage */
 
58
        u16                             int_vref_mv;
 
59
        struct iio_chan_spec            channel[3];
57
60
};
58
61
 
59
62
struct ad7887_state {
60
 
        struct iio_dev                  *indio_dev;
61
63
        struct spi_device               *spi;
62
64
        const struct ad7887_chip_info   *chip_info;
63
65
        struct regulator                *reg;
64
 
        struct work_struct              poll_work;
65
 
        atomic_t                        protect_ring;
 
66
        size_t                          d_size;
66
67
        u16                             int_vref_mv;
67
 
        bool                            en_dual;
68
68
        struct spi_transfer             xfer[4];
69
69
        struct spi_message              msg[3];
70
70
        struct spi_message              *ring_msg;