summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/iio_simple_dummy.h
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@intel.com>2014-11-10 14:45:29 +0200
committerJonathan Cameron <jic23@kernel.org>2014-11-22 11:05:44 +0000
commit356ae946f9945997213b19279bc2e84bb61cc26a (patch)
treebb833bd9115524bc59d4a69424cd4ae8913d5c8f /drivers/staging/iio/iio_simple_dummy.h
parentd7d787d29148cde12958c2e3765ad3a55dc55eaf (diff)
iio: dummy: Add virtual registers for dummy device
We need a way to store events generated by iio_dummy_evgen module, in order to correctly process IRQs in iio_simple_dummy_events. For the moment, we add two registers: * id_reg - ID register, stores the source of the event * id_data - DATA register, stores the type of the event e.g echo 4 > /sys/bus/iio/devices/iio_evgen/poke2 id_reg 0x02, id_data 0x04 This means, event of type 4 was generated by fake device 2. We currently use a hardcoded mapping of virtual events to IIO events. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/iio_simple_dummy.h')
-rw-r--r--drivers/staging/iio/iio_simple_dummy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/iio/iio_simple_dummy.h b/drivers/staging/iio/iio_simple_dummy.h
index 3027aed79093..ad898424d9bd 100644
--- a/drivers/staging/iio/iio_simple_dummy.h
+++ b/drivers/staging/iio/iio_simple_dummy.h
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
struct iio_dummy_accel_calibscale;
+struct iio_dummy_regs;
/**
* struct iio_dummy_state - device instance specific state.
@@ -35,6 +36,7 @@ struct iio_dummy_state {
int accel_calibbias;
const struct iio_dummy_accel_calibscale *accel_calibscale;
struct mutex lock;
+ struct iio_dummy_regs *regs;
#ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS
int event_irq;
int event_val;