LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Irina Tirdea <irina.tirdea@intel.com>, linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Vlad Dogaru <vlad.dogaru@intel.com>,
Daniel Baluta <daniel.baluta@intel.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>
Subject: Re: [PATCH v2 06/10] iio: core: Remove IIO_EV_TYPE_INSTANCE
Date: Mon, 26 Jan 2015 19:04:39 +0000 [thread overview]
Message-ID: <54C68FC7.5090403@kernel.org> (raw)
In-Reply-To: <1421003416-27557-7-git-send-email-irina.tirdea@intel.com>
On 11/01/15 19:10, Irina Tirdea wrote:
> By introducing IIO_EV_TYPE_CHANGE, IIO_EV_TYPE_INSTANCE becomes redundant.
> The effect of IIO_EV_TYPE_INSTANCE can be obtained by using IIO_EV_TYPE_CHANGE
> with IIO_EV_INFO_VALUE set to 1.
>
> Remove all instances of IIO_EV_TYPE_INSTANCE and replace them with
> IIO_EV_TYPE_CHANGE where needed.
>
Definitely a more general interfaces so good.
Applied to the togreg branch of iio.git
Thanks,
Jonathan
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---
> drivers/iio/industrialio-event.c | 1 -
> drivers/staging/iio/Documentation/iio_event_monitor.c | 2 --
> drivers/staging/iio/iio_simple_dummy.c | 2 +-
> drivers/staging/iio/iio_simple_dummy_events.c | 4 ++--
> include/linux/iio/types.h | 1 -
> 5 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
> index 08c4a4c..b5663f6 100644
> --- a/drivers/iio/industrialio-event.c
> +++ b/drivers/iio/industrialio-event.c
> @@ -197,7 +197,6 @@ static const char * const iio_ev_type_text[] = {
> [IIO_EV_TYPE_ROC] = "roc",
> [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
> [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
> - [IIO_EV_TYPE_INSTANCE] = "instance",
> [IIO_EV_TYPE_CHANGE] = "change",
> };
>
> diff --git a/drivers/staging/iio/Documentation/iio_event_monitor.c b/drivers/staging/iio/Documentation/iio_event_monitor.c
> index 2e78d58..72c96aa 100644
> --- a/drivers/staging/iio/Documentation/iio_event_monitor.c
> +++ b/drivers/staging/iio/Documentation/iio_event_monitor.c
> @@ -59,7 +59,6 @@ static const char * const iio_ev_type_text[] = {
> [IIO_EV_TYPE_ROC] = "roc",
> [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
> [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
> - [IIO_EV_TYPE_INSTANCE] = "instance",
> [IIO_EV_TYPE_CHANGE] = "change",
> };
>
> @@ -179,7 +178,6 @@ static bool event_is_known(struct iio_event_data *event)
> case IIO_EV_TYPE_ROC:
> case IIO_EV_TYPE_THRESH_ADAPTIVE:
> case IIO_EV_TYPE_MAG_ADAPTIVE:
> - case IIO_EV_TYPE_INSTANCE:
> case IIO_EV_TYPE_CHANGE:
> break;
> default:
> diff --git a/drivers/staging/iio/iio_simple_dummy.c b/drivers/staging/iio/iio_simple_dummy.c
> index 0b8611a..e452021 100644
> --- a/drivers/staging/iio/iio_simple_dummy.c
> +++ b/drivers/staging/iio/iio_simple_dummy.c
> @@ -73,7 +73,7 @@ static const struct iio_event_spec iio_dummy_event = {
> * simple step detect event - triggered when a step is detected
> */
> static const struct iio_event_spec step_detect_event = {
> - .type = IIO_EV_TYPE_INSTANCE,
> + .type = IIO_EV_TYPE_CHANGE,
> .dir = IIO_EV_DIR_NONE,
> .mask_separate = BIT(IIO_EV_INFO_ENABLE),
> };
> diff --git a/drivers/staging/iio/iio_simple_dummy_events.c b/drivers/staging/iio/iio_simple_dummy_events.c
> index ac15a44..a5cd3bb 100644
> --- a/drivers/staging/iio/iio_simple_dummy_events.c
> +++ b/drivers/staging/iio/iio_simple_dummy_events.c
> @@ -86,7 +86,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
> }
> case IIO_STEPS:
> switch (type) {
> - case IIO_EV_TYPE_INSTANCE:
> + case IIO_EV_TYPE_CHANGE:
> st->event_en = state;
> break;
> default:
> @@ -201,7 +201,7 @@ static irqreturn_t iio_simple_dummy_event_handler(int irq, void *private)
> iio_push_event(indio_dev,
> IIO_EVENT_CODE(IIO_STEPS, 0, IIO_NO_MOD,
> IIO_EV_DIR_NONE,
> - IIO_EV_TYPE_INSTANCE, 0, 0, 0),
> + IIO_EV_TYPE_CHANGE, 0, 0, 0),
> iio_get_time_ns());
> break;
> default:
> diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
> index 3ba3d66..580ed5b 100644
> --- a/include/linux/iio/types.h
> +++ b/include/linux/iio/types.h
> @@ -78,7 +78,6 @@ enum iio_event_type {
> IIO_EV_TYPE_ROC,
> IIO_EV_TYPE_THRESH_ADAPTIVE,
> IIO_EV_TYPE_MAG_ADAPTIVE,
> - IIO_EV_TYPE_INSTANCE,
> IIO_EV_TYPE_CHANGE,
> };
>
>
next prev parent reply other threads:[~2015-01-26 19:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 19:10 [PATCH v2 00/10] Add MMA9553 driver & PM support for MMA9551 Irina Tirdea
2015-01-11 19:10 ` [PATCH v2 01/10] iio: core: Introduce ENERGY channel type Irina Tirdea
2015-01-25 22:58 ` Jonathan Cameron
2015-03-29 0:14 ` Hartmut Knaack
2015-03-30 11:18 ` Tirdea, Irina
2015-01-11 19:10 ` [PATCH v2 02/10] iio: core: Introduce DISTANCE " Irina Tirdea
2015-01-25 22:59 ` Jonathan Cameron
2015-01-11 19:10 ` [PATCH v2 03/10] iio: core: Introduce IIO_VELOCITY and IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z Irina Tirdea
2015-01-25 23:00 ` Jonathan Cameron
2015-01-11 19:10 ` [PATCH v2 04/10] iio: core: Introduce IO_CHAN_INFO_CALIBWEIGHT Irina Tirdea
2015-01-25 23:01 ` Jonathan Cameron
2015-01-11 19:10 ` [PATCH v2 05/10] iio: core: Introduce CHANGE event type Irina Tirdea
2015-01-25 23:03 ` Jonathan Cameron
2015-01-11 19:10 ` [PATCH v2 06/10] iio: core: Remove IIO_EV_TYPE_INSTANCE Irina Tirdea
2015-01-26 19:04 ` Jonathan Cameron [this message]
2015-01-11 19:10 ` [PATCH v2 07/10] iio: core: Introduce IIO_CHAN_INFO_FILTER_OUTLIERS_THRESH and _PERIOD Irina Tirdea
2015-01-25 23:07 ` Jonathan Cameron
2015-01-26 14:40 ` Daniel Baluta
2015-01-26 19:01 ` Jonathan Cameron
2015-01-27 16:20 ` Tirdea, Irina
2015-01-11 19:10 ` [PATCH v2 08/10] iio: accel: mma9551: Add runtime pm support Irina Tirdea
2015-01-26 19:08 ` Jonathan Cameron
2015-01-27 17:18 ` Tirdea, Irina
2015-01-11 19:10 ` [PATCH v2 09/10] iio: accel: mma9551: split driver to expose mma955x api Irina Tirdea
2015-01-26 19:25 ` Jonathan Cameron
2015-01-11 19:10 ` [PATCH v2 10/10] iio: add driver for Freescale MMA9553 Irina Tirdea
2015-01-26 20:44 ` Jonathan Cameron
2015-01-27 17:09 ` Tirdea, Irina
2015-01-27 17:31 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C68FC7.5090403@kernel.org \
--to=jic23@kernel.org \
--cc=daniel.baluta@intel.com \
--cc=irina.tirdea@intel.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=vlad.dogaru@intel.com \
--subject='Re: [PATCH v2 06/10] iio: core: Remove IIO_EV_TYPE_INSTANCE' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).