mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <sam@ravnborg.org>
Cc: <alexandre.belloni@bootlin.com>, <bbrezillon@kernel.org>,
	<airlied@linux.ie>, <dri-devel@lists.freedesktop.org>,
	<linux-kernel@vger.kernel.org>, <Ludovic.Desroches@microchip.com>,
	<daniel@ffwll.ch>, <lee.jones@linaro.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/5] mfd: atmel-hlcdc: return in case of error
Date: Wed, 11 Dec 2019 12:07:18 +0000	[thread overview]
Message-ID: <99b559e2-4621-dec3-8c6c-b7a36f9ef07e@microchip.com> (raw)
In-Reply-To: <20191210203716.GC24756@ravnborg.org>

Hi Sam,

On 10.12.2019 22:37, Sam Ravnborg wrote:
> Hi Claudiu.
> 
> On Tue, Dec 10, 2019 at 03:24:45PM +0200, Claudiu Beznea wrote:
>> For HLCDC timing engine configurations bit ATMEL_HLCDC_SIP of
>> ATMEL_HLCDC_SR needs to checked if it is equal with zero before applying
>> new configuration to timing engine. In case of timeout there is no
>> indicator about this, so, return with error in case of timeout in
>> regmap_atmel_hlcdc_reg_write() and also print a message about this.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> ---
>>  drivers/mfd/atmel-hlcdc.c | 14 ++++++++++----
>>  1 file changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
>> index 64013c57a920..19f1dbeb8bcd 100644
>> --- a/drivers/mfd/atmel-hlcdc.c
>> +++ b/drivers/mfd/atmel-hlcdc.c
>> @@ -39,10 +39,16 @@ static int regmap_atmel_hlcdc_reg_write(void *context, unsigned int reg,
>>
>>       if (reg <= ATMEL_HLCDC_DIS) {
>>               u32 status;
>> -
>> -             readl_poll_timeout_atomic(hregmap->regs + ATMEL_HLCDC_SR,
>> -                                       status, !(status & ATMEL_HLCDC_SIP),
>> -                                       1, 100);
>> +             int ret;
>> +
>> +             ret = readl_poll_timeout_atomic(hregmap->regs + ATMEL_HLCDC_SR,
>> +                                             status,
>> +                                             !(status & ATMEL_HLCDC_SIP),
>> +                                             1, 100);
>> +             if (ret) {
>> +                     pr_err("Timeout waiting for ATMEL_HLCDC_SIP\n");
>> +                     return ret;
> Consider adding device * to atmel_hlcdc_regmap - so you can use
> dev_err() here. This makes it obvious what device this comes from.

OK! I'll do it in v2.

> 
>         Sam
> 
>> +             }
>>       }
>>
>>       writel(val, hregmap->regs + reg);
>> --
>> 2.7.4
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

  reply	other threads:[~2019-12-11 12:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 13:24 [PATCH 0/5] fixes for atmel-hlcdc Claudiu Beznea
2019-12-10 13:24 ` [PATCH 1/5] drm: atmel-hlcdc: use double rate for pixel clock only if supported Claudiu Beznea
2019-12-10 13:24 ` [PATCH 2/5] drm: atmel-hlcdc: enable clock before configuring timing engine Claudiu Beznea
2019-12-10 20:18   ` Sam Ravnborg
2019-12-10 13:24 ` [PATCH 3/5] mfd: atmel-hlcdc: return in case of error Claudiu Beznea
2019-12-10 20:37   ` Sam Ravnborg
2019-12-11 12:07     ` Claudiu.Beznea [this message]
2019-12-10 13:24 ` [PATCH 4/5] Revert "drm/atmel-hlcdc: allow selecting a higher pixel-clock than requested" Claudiu Beznea
2019-12-10 14:11   ` Peter Rosin
2019-12-10 14:59     ` Claudiu.Beznea
2019-12-10 17:22       ` Peter Rosin
2019-12-11 11:45         ` Claudiu.Beznea
2019-12-11 13:28           ` Peter Rosin
2019-12-13  9:28             ` Claudiu.Beznea
2019-12-13  9:30               ` Peter Rosin
2019-12-10 13:24 ` [PATCH 5/5] Revert "drm: atmel-hlcdc: enable sys_clk during initalization." Claudiu Beznea
2019-12-10 20:34   ` Sam Ravnborg
2019-12-11 11:55     ` Claudiu.Beznea

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=99b559e2-4621-dec3-8c6c-b7a36f9ef07e@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Ludovic.Desroches@microchip.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /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

all inboxes | Powered by JetHome®