All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-omap@vger.kernel.org,
	Marcel Partap <mpartap@gmx.net>,
	Michael Scott <michael.scott@linaro.org>
Subject: Re: [PATCH 3/3] iio: adc: cpcap: Remove hung interrupt quirk
Date: Wed, 24 May 2017 20:24:17 +0100	[thread overview]
Message-ID: <20170524202417.407ad526@kernel.org> (raw)
In-Reply-To: <20170523005146.726-4-tony@atomide.com>

On Mon, 22 May 2017 17:51:46 -0700
Tony Lindgren <tony@atomide.com> wrote:

> This is no longer needed as the real problem was interrupt flags
> not getting passed properly from device tree to the cpcap-core.c
> mfd driver. This got fixed with commit ac89473213c6 ("mfd: cpcap:
> Fix interrupt to use level interrupt") So let's remove ADC
> interrupt specific the quirk.
> 
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Michael Scott <michael.scott@linaro.org>
> Reviewed-by: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
Applied to the togreg branch of iio.git and initially pushed out
as testing for the autobuilders to play with it.

Thanks for cleaning this up.

Jonathan
> ---
>  drivers/iio/adc/cpcap-adc.c | 24 +-----------------------
>  1 file changed, 1 insertion(+), 23 deletions(-)
> 
> diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c
> --- a/drivers/iio/adc/cpcap-adc.c
> +++ b/drivers/iio/adc/cpcap-adc.c
> @@ -89,7 +89,7 @@
>  #define ST_ADC_CAL_BATTI_LOW_THRESHOLD	494
>  #define ST_ADC_CALIBRATE_DIFF_THRESHOLD	3
>  
> -#define CPCAP_ADC_MAX_RETRIES		5	/* Calibration and quirk */
> +#define CPCAP_ADC_MAX_RETRIES		5	/* Calibration */
>  
>  /**
>   * struct cpcap_adc_ato - timing settings for cpcap adc
> @@ -635,27 +635,6 @@ static void cpcap_adc_setup_bank(struct cpcap_adc *ddata,
>  	}
>  }
>  
> -/*
> - * Occasionally the ADC does not seem to start and there will be no
> - * interrupt. Let's re-init interrupt to prevent the ADC from hanging
> - * for the next request. It is unclear why this happens, but the next
> - * request will usually work after doing this.
> - */
> -static void cpcap_adc_quirk_reset_lost_irq(struct cpcap_adc *ddata)
> -{
> -	int error;
> -
> -	dev_info(ddata->dev, "lost ADC irq, attempting to reinit\n");
> -	disable_irq(ddata->irq);
> -	error = regmap_update_bits(ddata->reg, CPCAP_REG_ADCC2,
> -				   CPCAP_BIT_ADTRIG_DIS,
> -				   CPCAP_BIT_ADTRIG_DIS);
> -	if (error)
> -		dev_warn(ddata->dev, "%s reset failed: %i\n",
> -			 __func__, error);
> -	enable_irq(ddata->irq);
> -}
> -
>  static int cpcap_adc_start_bank(struct cpcap_adc *ddata,
>  				struct cpcap_adc_request *req)
>  {
> @@ -673,7 +652,6 @@ static int cpcap_adc_start_bank(struct cpcap_adc *ddata,
>  			return 0;
>  
>  		if (error == 0) {
> -			cpcap_adc_quirk_reset_lost_irq(ddata);
>  			error = -ETIMEDOUT;
>  			continue;
>  		}


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Peter Meerwald-Stadler
	<pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marcel Partap <mpartap-hi6Y0CQ0nG0@public.gmane.org>,
	Michael Scott
	<michael.scott-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 3/3] iio: adc: cpcap: Remove hung interrupt quirk
Date: Wed, 24 May 2017 20:24:17 +0100	[thread overview]
Message-ID: <20170524202417.407ad526@kernel.org> (raw)
In-Reply-To: <20170523005146.726-4-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>

On Mon, 22 May 2017 17:51:46 -0700
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> wrote:

> This is no longer needed as the real problem was interrupt flags
> not getting passed properly from device tree to the cpcap-core.c
> mfd driver. This got fixed with commit ac89473213c6 ("mfd: cpcap:
> Fix interrupt to use level interrupt") So let's remove ADC
> interrupt specific the quirk.
> 
> Cc: Marcel Partap <mpartap-hi6Y0CQ0nG0@public.gmane.org>
> Cc: Michael Scott <michael.scott-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Reviewed-by: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Applied to the togreg branch of iio.git and initially pushed out
as testing for the autobuilders to play with it.

Thanks for cleaning this up.

Jonathan
> ---
>  drivers/iio/adc/cpcap-adc.c | 24 +-----------------------
>  1 file changed, 1 insertion(+), 23 deletions(-)
> 
> diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c
> --- a/drivers/iio/adc/cpcap-adc.c
> +++ b/drivers/iio/adc/cpcap-adc.c
> @@ -89,7 +89,7 @@
>  #define ST_ADC_CAL_BATTI_LOW_THRESHOLD	494
>  #define ST_ADC_CALIBRATE_DIFF_THRESHOLD	3
>  
> -#define CPCAP_ADC_MAX_RETRIES		5	/* Calibration and quirk */
> +#define CPCAP_ADC_MAX_RETRIES		5	/* Calibration */
>  
>  /**
>   * struct cpcap_adc_ato - timing settings for cpcap adc
> @@ -635,27 +635,6 @@ static void cpcap_adc_setup_bank(struct cpcap_adc *ddata,
>  	}
>  }
>  
> -/*
> - * Occasionally the ADC does not seem to start and there will be no
> - * interrupt. Let's re-init interrupt to prevent the ADC from hanging
> - * for the next request. It is unclear why this happens, but the next
> - * request will usually work after doing this.
> - */
> -static void cpcap_adc_quirk_reset_lost_irq(struct cpcap_adc *ddata)
> -{
> -	int error;
> -
> -	dev_info(ddata->dev, "lost ADC irq, attempting to reinit\n");
> -	disable_irq(ddata->irq);
> -	error = regmap_update_bits(ddata->reg, CPCAP_REG_ADCC2,
> -				   CPCAP_BIT_ADTRIG_DIS,
> -				   CPCAP_BIT_ADTRIG_DIS);
> -	if (error)
> -		dev_warn(ddata->dev, "%s reset failed: %i\n",
> -			 __func__, error);
> -	enable_irq(ddata->irq);
> -}
> -
>  static int cpcap_adc_start_bank(struct cpcap_adc *ddata,
>  				struct cpcap_adc_request *req)
>  {
> @@ -673,7 +652,6 @@ static int cpcap_adc_start_bank(struct cpcap_adc *ddata,
>  			return 0;
>  
>  		if (error == 0) {
> -			cpcap_adc_quirk_reset_lost_irq(ddata);
>  			error = -ETIMEDOUT;
>  			continue;
>  		}

  reply	other threads:[~2017-05-24 19:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23  0:51 [PATCHv2 0/3] Few non-critical cpcap ADC fixes Tony Lindgren
2017-05-23  0:51 ` Tony Lindgren
2017-05-23  0:51 ` [PATCH 1/3] iio: adc: cpcap: Fix default register values and battery temperature Tony Lindgren
2017-05-23  0:51   ` Tony Lindgren
2017-05-24 19:18   ` Jonathan Cameron
2017-05-24 19:18     ` Jonathan Cameron
2017-06-07  6:22     ` Tony Lindgren
2017-06-07  6:22       ` Tony Lindgren
2017-06-11 14:12       ` Jonathan Cameron
2017-06-11 14:12         ` Jonathan Cameron
2017-05-23  0:51 ` [PATCH 2/3] iio: adc: cpcap: Fix die temperature Tony Lindgren
2017-05-23  0:51   ` Tony Lindgren
2017-05-24 19:19   ` Jonathan Cameron
2017-05-24 19:19     ` Jonathan Cameron
2017-05-23  0:51 ` [PATCH 3/3] iio: adc: cpcap: Remove hung interrupt quirk Tony Lindgren
2017-05-23  0:51   ` Tony Lindgren
2017-05-24 19:24   ` Jonathan Cameron [this message]
2017-05-24 19:24     ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2017-05-19  3:40 [PATCH 0/3] Few non-critical cpcap ADC fixes Tony Lindgren
2017-05-19  3:40 ` [PATCH 3/3] iio: adc: cpcap: Remove hung interrupt quirk Tony Lindgren
2017-05-19  3:40   ` Tony Lindgren
2017-05-20 12:29   ` Sebastian Reichel
2017-05-20 12:29     ` Sebastian Reichel
2017-05-20 15:56     ` Jonathan Cameron
2017-05-20 15:56       ` 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=20170524202417.407ad526@kernel.org \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=michael.scott@linaro.org \
    --cc=mpartap@gmx.net \
    --cc=pmeerw@pmeerw.net \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.