linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: myungjoo.ham@samsung.com (MyungJoo Ham)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/5] Samsung SoC ADC: use regulator (VDD for ADC).
Date: Wed, 22 Jun 2011 11:40:46 +0900	[thread overview]
Message-ID: <BANLkTinQYV8FJsy+5_sU8sTBhYPC7AQPow@mail.gmail.com> (raw)
In-Reply-To: <20110621104357.GE22177@opensource.wolfsonmicro.com>

On Tue, Jun 21, 2011 at 7:43 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Jun 21, 2011 at 10:58:43AM +0900, MyungJoo Ham wrote:
>
>> + ? ? ret = regulator_enable(adc->vdd);
>> + ? ? if (!ret)
>> + ? ? ? ? ? ? goto err_ioremap;
>> +
>
> This test looks the wrong way round? ?regulator_enable() should return 0
> on success but this will treat that as an error.

Whoops.. thanks for pointing that out!

>
>> ?static int s3c_adc_resume(struct platform_device *pdev)
>> ?{
>> ? ? ? struct adc_device *adc = platform_get_drvdata(pdev);
>> + ? ? int ret;
>>
>> + ? ? ret = regulator_enable(adc->vdd);
>> ? ? ? clk_enable(adc->clk);
>> ? ? ? enable_irq(adc->irq);
>>
>> ? ? ? writel(adc->prescale | S3C2410_ADCCON_PRSCEN,
>> ? ? ? ? ? ? ?adc->regs + S3C2410_ADCCON);
>>
>> - ? ? return 0;
>> + ? ? return ret;
>
> Seems better to return as soon as we notice the error, no point in
> starting anything else up if we don't have power.
>

Ok. I see.



-- 
MyungJoo Ham (???), Ph.D.
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: 82-10-6714-2858

  reply	other threads:[~2011-06-22  2:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16  8:30 [PATCH 1/2] Samsung SoC ADC: use regulator (VDD for ADC) MyungJoo Ham
2011-06-16  8:30 ` [PATCH 2/2] Samsung SoC ADC: Channel selection for S5PV210, S5PC110, and Exynos4 MyungJoo Ham
2011-06-16  8:33   ` [PATCH] Samsung SoC ADC: register address definition for S5PV210/S5PC110/Exynos4 MyungJoo Ham
2011-06-16  8:47     ` [PATCH] Samsung SoC: header file revised to prevent declaring duplicated MyungJoo Ham
2011-06-22  9:10       ` Kukjin Kim
2011-06-18 15:06 ` [PATCH 1/2] Samsung SoC ADC: use regulator (VDD for ADC) Mark Brown
2011-06-20  5:16   ` MyungJoo Ham
2011-06-20 10:17     ` Mark Brown
2011-06-21  1:58       ` [PATCH v2 0/5] Update Samsung-SoC ADC (regulator / recent CPU support) MyungJoo Ham
2011-06-21  1:58         ` [PATCH v2 1/5] Samsung SoC ADC: use regulator (VDD for ADC) MyungJoo Ham
2011-06-21 10:43           ` Mark Brown
2011-06-22  2:40             ` MyungJoo Ham [this message]
2011-06-21  1:58         ` [PATCH v2 2/5] Samsung SoC ADC: Channel selection for S5PV210, S5PC110, and Exynos4 MyungJoo Ham
2011-06-29 13:42           ` Kukjin Kim
2011-06-30  7:50             ` MyungJoo Ham
2011-06-21  1:58         ` [PATCH v2 3/5] ARM: Exynos4: Support ADC MyungJoo Ham
2011-06-29 13:52           ` Kukjin Kim
2011-06-21  1:58         ` [PATCH v2 4/5] ARM: S5PC110/S5PV210: " MyungJoo Ham
2011-06-21  1:58         ` [PATCH v2 5/5] Samsung SoC: header file revised to prevent declaring duplicated MyungJoo Ham

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=BANLkTinQYV8FJsy+5_sU8sTBhYPC7AQPow@mail.gmail.com \
    --to=myungjoo.ham@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).