linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>, <shawnguo@kernel.org>,
	<s.hauer@pengutronix.de>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@st.com>, <linus.walleij@linaro.org>,
	<lorenzo.bianconi83@gmail.com>, <songqiang1304521@gmail.com>
Subject: Re: [PATCH 2/3] iio: adc: at91-sama5d2_adc: remove predisable/postenable hooks
Date: Sun, 24 May 2020 14:54:36 +0100	[thread overview]
Message-ID: <20200524145436.41aaeea2@archlinux> (raw)
In-Reply-To: <20200522104632.517470-2-alexandru.ardelean@analog.com>

On Fri, 22 May 2020 13:46:31 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> This should be squashed into the first patch, but it's the more peculiar of
> the changes.
> I am not sure whether this is correct. The touchscreen channels shouldn't
> be enabled by the IIO framework. So, we may need a different way to handle
> those if needed.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Hmm. Unfortunately I can't remember exactly what is going on here.

From a quick look my suspicion is we can handle this using the same
'is it a triggered buffer' test as you now have in the core code.

The touchscreen path operates as a non triggered buffer (I think...)

I'm definitely looking for an ack and preferably a tested-by for this
one.  You are right - it's non obvious!

Jonathan

> ---
>  drivers/iio/adc/at91-sama5d2_adc.c | 18 ------------------
>  1 file changed, 18 deletions(-)
> 
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index 9abbbdcc7420..f71071096392 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -937,14 +937,6 @@ static int at91_adc_buffer_preenable(struct iio_dev *indio_dev)
>  	return 0;
>  }
>  
> -static int at91_adc_buffer_postenable(struct iio_dev *indio_dev)
> -{
> -	if (at91_adc_current_chan_is_touch(indio_dev))
> -		return 0;
> -
> -	return iio_triggered_buffer_postenable(indio_dev);
> -}
> -
>  static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
>  {
>  	struct at91_adc_state *st = iio_priv(indio_dev);
> @@ -995,19 +987,9 @@ static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
>  	return 0;
>  }
>  
> -static int at91_adc_buffer_predisable(struct iio_dev *indio_dev)
> -{
> -	if (at91_adc_current_chan_is_touch(indio_dev))
> -		return 0;
> -
> -	return iio_triggered_buffer_predisable(indio_dev);
> -}
> -
>  static const struct iio_buffer_setup_ops at91_buffer_setup_ops = {
>  	.preenable = &at91_adc_buffer_preenable,
>  	.postdisable = &at91_adc_buffer_postdisable,
> -	.postenable = &at91_adc_buffer_postenable,
> -	.predisable = &at91_adc_buffer_predisable,
>  };
>  
>  static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *indio,


  reply	other threads:[~2020-05-24 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 10:46 [PATCH 1/3] iio: Move attach/detach of the poll func to the core Alexandru Ardelean
2020-05-22 10:46 ` [PATCH 2/3] iio: adc: at91-sama5d2_adc: remove predisable/postenable hooks Alexandru Ardelean
2020-05-24 13:54   ` Jonathan Cameron [this message]
2020-05-22 10:46 ` [PATCH 3/3] iio: remove iio_triggered_buffer_postenable()/iio_triggered_buffer_predisable() Alexandru Ardelean
2020-05-24 13:38   ` Jonathan Cameron
2020-05-25 11:30     ` Ardelean, Alexandru
2020-05-24 13:41 ` [PATCH 1/3] iio: Move attach/detach of the poll func to the core Jonathan Cameron
2020-07-14 14:57 ` Ardelean, Alexandru
2020-07-14 17:25   ` 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=20200524145436.41aaeea2@archlinux \
    --to=jic23@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=songqiang1304521@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).