lkml.org 
[lkml]   [2014]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [RFC PATCH 1/8] iio: dummy: Introduce virtual registers for dummy device
    From
    On Sun, Oct 19, 2014 at 11:30 PM, Hartmut Knaack <knaack.h@gmx.de> wrote:
    > Daniel Baluta schrieb am 02.10.2014 15:43:
    >> 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: Daniel Baluta <daniel.baluta@intel.com>
    >> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
    >> ---
    >> drivers/staging/iio/iio_dummy_evgen.c | 16 ++++++++++++++++
    >> drivers/staging/iio/iio_dummy_evgen.h | 7 +++++++
    >> drivers/staging/iio/iio_simple_dummy.h | 2 ++
    >> drivers/staging/iio/iio_simple_dummy_events.c | 23 ++++++++++++++++++-----
    >> 4 files changed, 43 insertions(+), 5 deletions(-)
    >>
    > <...>
    >> @@ -153,6 +161,14 @@ static ssize_t iio_evgen_poke(struct device *dev,
    >> size_t len)
    >> {
    >> struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
    >> + unsigned long event, ret;
    > int ret

    Good catch. Will fix in v3.

    Daniel.


    \
     
     \ /
      Last update: 2014-10-19 23:01    [W:2.295 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site