Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-24 Thread Gyungoh Yoo
On Thu, Oct 23, 2014 at 02:01:03PM +0100, Mark Brown wrote: > On Thu, Oct 23, 2014 at 12:14:43PM +0900, Gyungoh Yoo wrote: > > > So, what do you think about DT like below? > > > sky81452@2c { > > compatible = "skyworks,sky81452"; > > reg = <0x2c>; > > > > backlight { > >

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-24 Thread Gyungoh Yoo
On Thu, Oct 23, 2014 at 02:01:03PM +0100, Mark Brown wrote: On Thu, Oct 23, 2014 at 12:14:43PM +0900, Gyungoh Yoo wrote: So, what do you think about DT like below? sky81452@2c { compatible = skyworks,sky81452; reg = 0x2c; backlight { compatible =

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-23 Thread Mark Brown
On Thu, Oct 23, 2014 at 12:14:43PM +0900, Gyungoh Yoo wrote: > So, what do you think about DT like below? > sky81452@2c { > compatible = "skyworks,sky81452"; > reg = <0x2c>; > > backlight { > compatible = "skyworks,sky81452-backlight"; > name =

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-23 Thread Mark Brown
On Thu, Oct 23, 2014 at 12:14:43PM +0900, Gyungoh Yoo wrote: So, what do you think about DT like below? sky81452@2c { compatible = skyworks,sky81452; reg = 0x2c; backlight { compatible = skyworks,sky81452-backlight; name = pwm-backlight;

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-22 Thread Gyungoh Yoo
On Wed, Oct 22, 2014 at 11:27:23AM +0100, Mark Brown wrote: > On Mon, Oct 20, 2014 at 03:10:24PM +0900, Gyungoh Yoo wrote: > > On Fri, Oct 17, 2014 at 04:26:05PM +0200, Mark Brown wrote: > > > > The thing I'm seeing is that the binding for your device with the > > > subnode looks very much like

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-22 Thread Mark Brown
On Mon, Oct 20, 2014 at 03:10:24PM +0900, Gyungoh Yoo wrote: > On Fri, Oct 17, 2014 at 04:26:05PM +0200, Mark Brown wrote: > > The thing I'm seeing is that the binding for your device with the > > subnode looks very much like the device trees of devices with multiple > > regulators. The fact

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-22 Thread Gyungoh Yoo
On Wed, Oct 22, 2014 at 11:27:23AM +0100, Mark Brown wrote: On Mon, Oct 20, 2014 at 03:10:24PM +0900, Gyungoh Yoo wrote: On Fri, Oct 17, 2014 at 04:26:05PM +0200, Mark Brown wrote: The thing I'm seeing is that the binding for your device with the subnode looks very much like the device

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-22 Thread Mark Brown
On Mon, Oct 20, 2014 at 03:10:24PM +0900, Gyungoh Yoo wrote: On Fri, Oct 17, 2014 at 04:26:05PM +0200, Mark Brown wrote: The thing I'm seeing is that the binding for your device with the subnode looks very much like the device trees of devices with multiple regulators. The fact that you

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-20 Thread Gyungoh Yoo
On Fri, Oct 17, 2014 at 04:26:05PM +0200, Mark Brown wrote: > On Fri, Oct 17, 2014 at 07:43:09PM +0900, Gyungoh Yoo wrote: > > > Are you talking about simplification using of_regulator_match()? > > This driver has only one regulator. > > Is the API also useful for this driver? > > The thing I'm

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-20 Thread Gyungoh Yoo
On Fri, Oct 17, 2014 at 04:26:05PM +0200, Mark Brown wrote: On Fri, Oct 17, 2014 at 07:43:09PM +0900, Gyungoh Yoo wrote: Are you talking about simplification using of_regulator_match()? This driver has only one regulator. Is the API also useful for this driver? The thing I'm seeing is

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Mark Brown
On Fri, Oct 17, 2014 at 07:43:09PM +0900, Gyungoh Yoo wrote: > Are you talking about simplification using of_regulator_match()? > This driver has only one regulator. > Is the API also useful for this driver? The thing I'm seeing is that the binding for your device with the subnode looks very

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Gyungoh Yoo
On Fri, Oct 17, 2014 at 12:17:34PM +0200, Mark Brown wrote: > On Fri, Oct 17, 2014 at 06:19:50PM +0900, Gyungoh Yoo wrote: > > > Wow. I understand. > > I missed .supply_name. I think I need something like > > below, before devm_regulator_register(). > > > config->supply_name =

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Mark Brown
On Fri, Oct 17, 2014 at 06:19:50PM +0900, Gyungoh Yoo wrote: > Wow. I understand. > I missed .supply_name. I think I need something like > below, before devm_regulator_register(). > config->supply_name = init_data->constraints.name; > I will resubmit it. No, not supply_name (though you

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Gyungoh Yoo
On Tue, Oct 14, 2014 at 09:56:06AM +0200, Mark Brown wrote: > On Tue, Oct 14, 2014 at 10:11:12AM +0900, Gyungoh Yoo wrote: > > On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: > > > > If you're doing anything here you should convert the code to use the > > > simplified interface for

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Gyungoh Yoo
On Tue, Oct 14, 2014 at 09:56:06AM +0200, Mark Brown wrote: On Tue, Oct 14, 2014 at 10:11:12AM +0900, Gyungoh Yoo wrote: On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: If you're doing anything here you should convert the code to use the simplified interface for parsing

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Mark Brown
On Fri, Oct 17, 2014 at 06:19:50PM +0900, Gyungoh Yoo wrote: Wow. I understand. I missed .supply_name. I think I need something like below, before devm_regulator_register(). config-supply_name = init_data-constraints.name; I will resubmit it. No, not supply_name (though you really

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Gyungoh Yoo
On Fri, Oct 17, 2014 at 12:17:34PM +0200, Mark Brown wrote: On Fri, Oct 17, 2014 at 06:19:50PM +0900, Gyungoh Yoo wrote: Wow. I understand. I missed .supply_name. I think I need something like below, before devm_regulator_register(). config-supply_name =

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-17 Thread Mark Brown
On Fri, Oct 17, 2014 at 07:43:09PM +0900, Gyungoh Yoo wrote: Are you talking about simplification using of_regulator_match()? This driver has only one regulator. Is the API also useful for this driver? The thing I'm seeing is that the binding for your device with the subnode looks very much

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-14 Thread Mark Brown
On Tue, Oct 14, 2014 at 10:11:12AM +0900, Gyungoh Yoo wrote: > On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: > > If you're doing anything here you should convert the code to use the > > simplified interface for parsing regulator data based on putting the > > subnode name and

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-14 Thread Mark Brown
On Tue, Oct 14, 2014 at 10:11:12AM +0900, Gyungoh Yoo wrote: On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: If you're doing anything here you should convert the code to use the simplified interface for parsing regulator data based on putting the subnode name and regualtor name

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-13 Thread Gyungoh Yoo
On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: > On Mon, Oct 13, 2014 at 02:47:41PM +0900, Gyungoh Yoo wrote: > > > - np = of_get_child_by_name(dev->parent->of_node, "regulator"); > > - if (unlikely(!np)) { > > + if (!np) { > > dev_err(dev, "regulator node not

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-13 Thread Mark Brown
On Mon, Oct 13, 2014 at 02:47:41PM +0900, Gyungoh Yoo wrote: > - np = of_get_child_by_name(dev->parent->of_node, "regulator"); > - if (unlikely(!np)) { > + if (!np) { > dev_err(dev, "regulator node not found"); > - return NULL; > + return

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-13 Thread Mark Brown
On Mon, Oct 13, 2014 at 02:47:41PM +0900, Gyungoh Yoo wrote: - np = of_get_child_by_name(dev-parent-of_node, regulator); - if (unlikely(!np)) { + if (!np) { dev_err(dev, regulator node not found); - return NULL; + return ERR_PTR(-ENODATA);

Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-13 Thread Gyungoh Yoo
On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote: On Mon, Oct 13, 2014 at 02:47:41PM +0900, Gyungoh Yoo wrote: - np = of_get_child_by_name(dev-parent-of_node, regulator); - if (unlikely(!np)) { + if (!np) { dev_err(dev, regulator node not found); -

[RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-12 Thread Gyungoh Yoo
Signed-off-by: Gyungoh Yoo --- Changes v4: Removed MODULE_VERSION() Modified license to GPLv2 Changes v3: Modified to return ENODATA when of_node is NULL Modified the messages in error cases Changes v2: Added 'compatible' attribute in the driver Added message for exception or errors.

[RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

2014-10-12 Thread Gyungoh Yoo
Signed-off-by: Gyungoh Yoo jack@skyworksinc.com --- Changes v4: Removed MODULE_VERSION() Modified license to GPLv2 Changes v3: Modified to return ENODATA when of_node is NULL Modified the messages in error cases Changes v2: Added 'compatible' attribute in the driver Added message for