Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751949AbaJSUjW (ORCPT ); Sun, 19 Oct 2014 16:39:22 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:61686 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbaJSUjT (ORCPT ); Sun, 19 Oct 2014 16:39:19 -0400 MIME-Version: 1.0 In-Reply-To: <54441F71.800@gmx.de> References: <1412257439-15683-1-git-send-email-daniel.baluta@intel.com> <1412257439-15683-2-git-send-email-daniel.baluta@intel.com> <54441F71.800@gmx.de> Date: Sun, 19 Oct 2014 23:39:18 +0300 X-Google-Sender-Auth: bNpKtxE8E4WqNHlTmhqt7D-jNLU Message-ID: Subject: Re: [RFC PATCH 1/8] iio: dummy: Introduce virtual registers for dummy device From: Daniel Baluta To: Hartmut Knaack Cc: Daniel Baluta , Jonathan Cameron , linux-iio@vger.kernel.org, Linux Kernel Mailing List , irina.tirdea@intel.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 19, 2014 at 11:30 PM, Hartmut Knaack 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 >> Signed-off-by: Irina Tirdea >> --- >> 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/