linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Matthias Kaehlcke <matthias.list@kaehlcke.net>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Felipe Balbi <balbi@ti.com>,
	Pantelis Antoniou <panto@antoniou-consulting.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: ti_am335x_adc: Take touchscreen channels into account for conversion timeout
Date: Sun, 15 Sep 2013 17:52:49 +0100	[thread overview]
Message-ID: <5235E5E1.3040808@kernel.org> (raw)
In-Reply-To: <5235DD9A.5040700@kernel.org>

On 09/15/13 17:17, Jonathan Cameron wrote:
> On 09/10/13 22:02, Matthias Kaehlcke wrote:
>> The calculation of the old conversion timeout value was based on the number of
>> channels used by this driver. This doesn't take into account that other channels
>> can be used by the touchscreen driver. Adjust the timeout value to the maximum
>> if the touchscreen driver is enabled
>>
>> Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
> Hmm... This is a bit of an uggly solution.  Can we do anything neater via some
> callbacks in the underlying mfd?  Rachna, any thoughts on this?
Ah, Rachna's email is dead.  So, anyone else care to comment?
> 
> If not I'm happy to take this as fixing a real problem and we can tidy up later
> if needed.
> 
> Jonathan
>> ---
>>  drivers/iio/adc/ti_am335x_adc.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
>> index 3ceac3e..898fc78 100644
>> --- a/drivers/iio/adc/ti_am335x_adc.c
>> +++ b/drivers/iio/adc/ti_am335x_adc.c
>> @@ -146,7 +146,11 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
>>  	bool found = false;
>>  	u32 step_en;
>>  	unsigned long timeout = jiffies + usecs_to_jiffies
>> +#ifdef CONFIG_TOUCHSCREEN_TI_AM335X_TSC
>> +				(IDLE_TIMEOUT * TOTAL_CHANNELS);
>> +#else
>>  				(IDLE_TIMEOUT * adc_dev->channels);
>> +#endif
>>  	step_en = get_adc_step_mask(adc_dev);
>>  	am335x_tsc_se_set(adc_dev->mfd_tscadc, step_en);
>>  
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2013-09-15 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f1830a7d0debce351966d2f3232158313d87dcc0.1378846446.git.matthias@kaehlcke.net>
2013-09-10 21:02 ` [PATCH 2/2] iio: ti_am335x_adc: Take touchscreen channels into account for conversion timeout Matthias Kaehlcke
2013-09-15 16:17   ` Jonathan Cameron
2013-09-15 16:52     ` Jonathan Cameron [this message]
2013-09-15 17:50     ` Matthias Kaehlcke
2013-09-23 13:31   ` Sebastian Andrzej Siewior
2013-09-23 16:46     ` Matthias Kaehlcke

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=5235E5E1.3040808@kernel.org \
    --to=jic23@kernel.org \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.list@kaehlcke.net \
    --cc=panto@antoniou-consulting.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).