Re: [PATCH 1/8] mfd: Add Dialog DA906x core driver.

2012-08-31 Thread Krystian Garbaciak
> On Fri, Aug 24, 2012 at 02:50:00PM +0100, Krystian Garbaciak wrote: > > > This is MFD module providing access to registers and interrupts of DA906x > > series PMIC. It is used by other functional modules, registered as MFD > > cells. > > Driver uses regmap

Re: [RFC PATCH 2/8] regulator: Add Dialog DA906x voltage regulators support.

2012-08-31 Thread Krystian Garbaciak
> On Wed, Aug 29, 2012 at 03:50:00PM +0100, Krystian Garbaciak wrote: > > > Because, for some regulators, this is required: val += fvol->offset, > > I was only able to reduce it to the following form. > > What on earth makes you say this? The above is obviously l

Re: [RFC PATCH 2/8] regulator: Add Dialog DA906x voltage regulators support.

2012-08-29 Thread Krystian Garbaciak
> > +static int da906x_set_voltage(struct regulator_dev *rdev, > > + int min_uV, int max_uV, unsigned *selector) > > +{ > > + struct da906x_regulator *regl = rdev_get_drvdata(rdev); > > + const struct field *fvol = ®l->info->voltage; > > + int ret; > > + unsigned v

Re: [PATCH] regulator: Fix bug in regulator_mode_to_status() core function.

2012-08-29 Thread Krystian Garbaciak
> +static const struct i_table vsys_tbl[] = { > > + ILINE(0, DA906X_ADC_MAX, 2500, 5500) > > +}; > > + > > +static const struct i_table adcin_tbl[] = { > > + ILINE(0, DA906X_ADC_MAX, 0, 2500) > > +}; > > + > > +static const struct i_table tjunc_tbl[] = { > > + ILINE(0, DA906X_ADC_MAX, 333, -8

[PATCH] regulator: Add REGULATOR_STATUS_UNDEFINED.

2012-07-12 Thread Krystian Garbaciak
REGULATOR_STATUS_UNDEFINED is to be returned by regulator, if any other state doesn't really apply. Signed-off-by: Krystian Garbaciak --- drivers/regulator/core.c |5 - include/linux/regulator/driver.h |2 ++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --

[PATCH] regulator: Fix a typo in regulator_mode_to_status() core function.

2012-07-12 Thread Krystian Garbaciak
Case REGULATOR_STATUS_STANDBY -> REGULATOR_MODE_STANDBY. Signed-off-by: Krystian Garbaciak --- drivers/regulator/core.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 09a737c..af44b94 100644 --- a/driv

Re: [PATCH] regulator: Fix bug in regulator_mode_to_status() core function.

2012-07-11 Thread Krystian Garbaciak
> > > This is deliberate. It's not reporting an error, it's reporting an > > > indeterminate status which is a different thing. > > > Ok, then I would propose to use REGULATOR_STATUS_OFF instead of 0, to > > present > > your deliberate decision here. > > I don't think you're fully understanding

Re: [PATCH] regulator: Fix bug in regulator_mode_to_status() core function.

2012-07-11 Thread Krystian Garbaciak
> From: Mark Brown [mailto:broo...@opensource.wolfsonmicro.com] > Sent: 11 July 2012 14:29 > > On Wed, Jul 11, 2012 at 01:10:01PM +0100, Krystian Garbaciak wrote: > > Fix typo for case REGULATOR_STATUS_STANDBY -> REGULATOR_MODE_STANDBY. > > For undefined mode, return R

[PATCH] regulator: Fix bug in regulator_mode_to_status() core function.

2012-07-11 Thread Krystian Garbaciak
Fix typo for case REGULATOR_STATUS_STANDBY -> REGULATOR_MODE_STANDBY. For undefined mode, return REGULATOR_STATUS_ERROR (0 is not valid status). Signed-off-by: Krystian Garbaciak --- drivers/regulator/core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/driv