Commit 72db6eb6 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:meter remove stubs from ade7753.

General cleanup and use of standard functions to simplfy some spi reads
as well.
Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 96df9799
This diff is collapsed.
...@@ -60,81 +60,17 @@ ...@@ -60,81 +60,17 @@
/** /**
* struct ade7753_state - device instance specific data * struct ade7753_state - device instance specific data
* @us: actual spi_device * @us: actual spi_device
* @work_trigger_to_ring: bh for triggered event handling
* @inter: used to check if new interrupt has been triggered
* @last_timestamp: passing timestamp from th to bh of interrupt handler
* @indio_dev: industrial I/O device structure * @indio_dev: industrial I/O device structure
* @trig: data ready trigger registered with iio
* @tx: transmit buffer * @tx: transmit buffer
* @rx: recieve buffer * @rx: recieve buffer
* @buf_lock: mutex to protect tx and rx * @buf_lock: mutex to protect tx and rx
**/ **/
struct ade7753_state { struct ade7753_state {
struct spi_device *us; struct spi_device *us;
struct work_struct work_trigger_to_ring;
s64 last_timestamp;
struct iio_dev *indio_dev; struct iio_dev *indio_dev;
struct iio_trigger *trig;
u8 *tx; u8 *tx;
u8 *rx; u8 *rx;
struct mutex buf_lock; struct mutex buf_lock;
}; };
#if defined(CONFIG_IIO_RING_BUFFER) && defined(THIS_HAS_RING_BUFFER_SUPPORT)
/* At the moment triggers are only used for ring buffer
* filling. This may change!
*/
enum ade7753_scan {
ADE7753_SCAN_ACTIVE_POWER,
ADE7753_SCAN_CH1,
ADE7753_SCAN_CH2,
};
void ade7753_remove_trigger(struct iio_dev *indio_dev);
int ade7753_probe_trigger(struct iio_dev *indio_dev);
ssize_t ade7753_read_data_from_ring(struct device *dev,
struct device_attribute *attr,
char *buf);
int ade7753_configure_ring(struct iio_dev *indio_dev);
void ade7753_unconfigure_ring(struct iio_dev *indio_dev);
int ade7753_initialize_ring(struct iio_ring_buffer *ring);
void ade7753_uninitialize_ring(struct iio_ring_buffer *ring);
#else /* CONFIG_IIO_RING_BUFFER */
static inline void ade7753_remove_trigger(struct iio_dev *indio_dev)
{
}
static inline int ade7753_probe_trigger(struct iio_dev *indio_dev)
{
return 0;
}
static inline ssize_t
ade7753_read_data_from_ring(struct device *dev,
struct device_attribute *attr,
char *buf)
{
return 0;
}
static int ade7753_configure_ring(struct iio_dev *indio_dev)
{
return 0;
}
static inline void ade7753_unconfigure_ring(struct iio_dev *indio_dev)
{
}
static inline int ade7753_initialize_ring(struct iio_ring_buffer *ring)
{
return 0;
}
static inline void ade7753_uninitialize_ring(struct iio_ring_buffer *ring)
{
}
#endif /* CONFIG_IIO_RING_BUFFER */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment