Any update on this patch?
On Fri, 2012-09-14 at 18:57 +0530, Ashish Jangam wrote:
> This is the Regulator patch for the DA9055 PMIC and has got dependency
> on the DA9055 MFD core.
>
> This patch support all of the DA9055 regulators. The output voltages are
> fully programmable through I2C interface only. The platform data with
> regulation constraints is passed down from the board to the regulator.
>
> This patch is functionaly tested on SMDK6410 board. DA9055 Evaluation
> board was connected to the SMDK6410 board.
>
> Signed-off-by: David Dajun Chen
> Signed-off-by: Ashish Jangam
> ---
> drivers/regulator/Kconfig| 10 +
> drivers/regulator/Makefile |1 +
> drivers/regulator/da9055-regulator.c | 727
> ++
> 3 files changed, 738 insertions(+), 0 deletions(-)
> create mode 100644 drivers/regulator/da9055-regulator.c
>
> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
> index 129c827..0bd6db1 100644
> --- a/drivers/regulator/Kconfig
> +++ b/drivers/regulator/Kconfig
> @@ -109,6 +109,16 @@ config REGULATOR_DA9052
> This driver supports the voltage regulators of DA9052-BC and
> DA9053-AA/Bx PMIC.
>
> +config REGULATOR_DA9055
> + tristate "Dialog Semiconductor DA9055 regulators"
> + depends on MFD_DA9055
> + help
> + Say y here to support the BUCKs and LDOs regulators found on
> + Dialog Semiconductor DA9055 PMIC.
> +
> + This driver can also be built as a module. If so, the module
> + will be called da9055-regulator.
> +
> config REGULATOR_ANATOP
> tristate "Freescale i.MX on-chip ANATOP LDO regulators"
> depends on MFD_ANATOP
> diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
> index 3a0dbc5..950b38b 100644
> --- a/drivers/regulator/Makefile
> +++ b/drivers/regulator/Makefile
> @@ -18,6 +18,7 @@ obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o
> obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o
> obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
> obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
> +obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o
> obj-$(CONFIG_REGULATOR_DBX500_PRCMU) += dbx500-prcmu.o
> obj-$(CONFIG_REGULATOR_DB8500_PRCMU) += db8500-prcmu.o
> obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
> diff --git a/drivers/regulator/da9055-regulator.c
> b/drivers/regulator/da9055-regulator.c
> new file mode 100644
> index 000..630b664
> --- /dev/null
> +++ b/drivers/regulator/da9055-regulator.c
> @@ -0,0 +1,727 @@
> +/*
> +* Regulator driver for DA9055 PMIC
> +*
> +* Copyright(c) 2012 Dialog Semiconductor Ltd.
> +*
> +* Author: David Dajun Chen
> +*
> +* This program is free software; you can redistribute it and/or modify
> +* it under the terms of the GNU General Public License as published by
> +* the Free Software Foundation; either version 2 of the License, or
> +* (at your option) any later version.
> +*
> +*/
> +
> +#include
> +#include
> +#include
> +#include
> +#include
> +#include
> +#include
> +
> +#include
> +#include
> +#include
> +
> +#define DA9055_MIN_UA0
> +#define DA9055_MAX_UA3
> +
> +#define DA9055_LDO_MODE_SYNC 0
> +#define DA9055_LDO_MODE_SLEEP1
> +
> +#define DA9055_BUCK_MODE_SLEEP 1
> +#define DA9055_BUCK_MODE_SYNC2
> +#define DA9055_BUCK_MODE_AUTO3
> +
> +/* DA9055 REGULATOR IDs */
> +#define DA9055_ID_BUCK1 0
> +#define DA9055_ID_BUCK2 1
> +#define DA9055_ID_LDO1 2
> +#define DA9055_ID_LDO2 3
> +#define DA9055_ID_LDO3 4
> +#define DA9055_ID_LDO4 5
> +#define DA9055_ID_LDO5 6
> +#define DA9055_ID_LDO6 7
> +
> +/* DA9055 GPIO OFFSET */
> +#define DA9055_GPIO_1_OFFSET 0x01
> +#define DA9055_GPIO_2_OFFSET 0x02
> +
> +/* DA9055 BUCK current limit */
> +static const int da9055_current_limits[] = { 50, 60, 70, 80
> };
> +
> +struct da9055_conf_reg {
> + int reg;
> + int sel_mask;
> + int en_mask;
> +};
> +
> +struct da9055_volt_reg {
> + int reg_a;
> + int reg_b;
> + int sl_shift;
> + int v_offset;
> + int v_mask;
> + int v_shift;
> +};
> +
> +struct da9055_mode_reg {
> + int reg;
> + int mask;
> + int shift;
> +};
> +
> +struct da9055_regulator_info {
> + struct regulator_desc reg_desc;
> + int step_uV;
> + int min_uV;
> + int max_uV;
> + struct da9055_conf_reg conf;
> + struct da9055_volt_reg volt;
> + struct da9055_mode_reg mode;
> +};
> +
> +struct da9055_regulator {
> + struct da9055 *da9055;
> + struct da9055_regulator_info *info;
> + struct regulator_dev *rdev;
> + int gpio_1;
> + int gpio_2;
> + enum gpio_select gpio_rsel;
> + enum gpio_select gpio_ren;
> +};
> +
> +static int verify_range(struct da9055_regulator_info *info,
> + int