lkml.org 
[lkml]   [2017]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] extcon: arizona: Wait for any running HPDETs to complete on jack removal
On Wed, Jan 25, 2017 at 06:35:13PM +0900, Chanwoo Choi wrote:
> On 2017년 01월 25일 18:34, Charles Keepax wrote:
> > As the HPDET can't be aborted mid way through we should not allow any new
> > insertion to be processed until the previous HPDET has finished. It is very
> > unlikely but with low enough debounce settings you could start a new HPDET
> > before the old one has completed, which results in an erroneous reading.
> >
> > Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> > ---
> > + /*
> > + * If the jack was removed during a headphone detection we
> > + * need to wait for the headphone detection to finish, as
> > + * it can not be aborted. We don't want to be able to start
> > + * a new headphone detection from a fresh insert until this
> > + * one is finished.
> > + */
> > + arizona_hpdet_wait(info);
>
> If there is no necessary to handle the error return value,
> I recommend that you better to use the dev_warn() instead of dev_err().
>
> dev_warn(arizona->dev, "HPDET did not appear to complete\n");
>
>
> How about changing the debug level with dev_warn()?
>

Yeah can do.

Thanks,
Charles

\
 
 \ /
  Last update: 2017-01-25 10:42    [W:0.086 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site