[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimwqF3APEbJnTGcO5mh+AnS=N787g@mail.gmail.com>
Date: Thu, 30 Jun 2011 18:03:06 +0900
From: MyungJoo Ham <myungjoo.ham@...il.com>
To: Vasily Khoruzhick <anarsoul@...il.com>
Cc: linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
Kukjin Kim <kgene.kim@...sung.com>,
Russell King <linux@....linux.org.uk>,
Jassi Brar <jassi.brar@...sung.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
linux-kernel@...r.kernel.org,
Kyungmin Park <kyungmin.park@...sung.com>,
Ben Dooks <ben-linux@...ff.org>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Seungwhan Youn <sw.youn@...sung.com>,
Changhwan Youn <chaos.youn@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH v3 1/6] Samsung SoC ADC: use regulator (VDD for ADC).
On Thu, Jun 30, 2011 at 5:22 PM, Vasily Khoruzhick <anarsoul@...il.com> wrote:
> On Thursday 30 June 2011 10:49:30 MyungJoo Ham wrote:
>> This patch allows the Samsung ADC driver to enable VDD regulator at
>> probe and resume and to disable at exit and suspend.
>> In a platform where ADC's VDD regulator is not "always-on", this control
>> is required although this patch does not provide fine-grained power
>> control (turning on the regulator only when being accessed).
>>
>> However, if VDD regulator ("vdd" for the adc device) is not provided,
>> the regulator control will not be activated because there are platforms
>> that do not provide regulator for ADC device.
>>
>> arch_initcall has been modified to module_init in order to allow
>> regulators to be available at probe.
>>
>> Signed-off-by: MyungJoo Ham <myungjoo.ham@...sung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
[]
>> + adc->vdd = regulator_get(dev, "vdd");
>> + if (IS_ERR(adc->vdd)) {
>> + dev_err(dev, "operating without regulator \"vdd\" .\n");
>> + ret = PTR_ERR(adc->vdd);
>> + goto err_alloc;
>> + }
>> +
>
> NACK. Make it optional, otherwise it breaks s3c24xx.
>
Ok. Now, I've got the issue I've worried in the previous patch revision.
Anyway, Mark once stated:
--- quote starts ---
On Sun, Jun 19, 2011 at 12:06 AM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
>> + if (IS_ERR_OR_NULL(adc->vdd)) {
>> + dev_dbg(dev, "operating without regulator %s.\n", S3C_ADC_REGULATOR_NAME);
>> + adc->vdd = NULL; /* Do not control regulator */
>> + }
>> +
>
> No, don't do this. Just unconditionally assume the regulator is present
> if power is essential for use of the device. The regulator API will
> stub out correctly if it's not in use to allow things to proceed and if
> vdd is genuinely not hooked up then the driver can't function.
--- quote ends ---
Then, how about unconditionally using ADC VDD for TYPE_ADCV3
(S5PC110/S5PV210/Exynos4210) and forget VDD for older ADC types?
Thanks.
- MyungJoo
--
MyungJoo Ham, Ph.D.
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: 82-10-6714-2858
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists