[linux-sunxi] Re: [PATCH] regulator: axp20x: support AXP813 variant

2016-07-28 Thread Jean-Francois Moine
On Thu, 28 Jul 2016 22:19:44 +0200
Maxime Ripard  wrote:

> >  Documentation/devicetree/bindings/mfd/axp20x.txt | 32 -
> >  drivers/mfd/axp20x-rsb.c |  1 +
> >  drivers/mfd/axp20x.c |  3 +
> >  drivers/regulator/axp20x-regulator.c | 82 
> > +++-
> >  include/linux/mfd/axp20x.h   | 38 +++
> >  5 files changed, 153 insertions(+), 3 deletions(-)
> 
> And this needs to be split per logical changes.

There is only one logical change: support the AXP813.

-- 
Ken ar c'hentaƱ | ** Breizh ha Linux atav! **
Jef |   http://moinejf.free.fr/

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH] regulator: axp20x: support AXP813 variant

2016-07-28 Thread Maxime Ripard
Hi,

This patch must be sent to the MFD, regulators and DT maintainers, and
the relevant mailing lists.

On Thu, Jul 28, 2016 at 09:28:14AM +0200, Jean-Francois Moine wrote:
> The X-Powers AXP813 PMIC is close enough to the AXP809 with some
> more outputs.
> 
> Signed-off-by: Jean-Francois Moine 
> ---
>  Documentation/devicetree/bindings/mfd/axp20x.txt | 32 -
>  drivers/mfd/axp20x-rsb.c |  1 +
>  drivers/mfd/axp20x.c |  3 +
>  drivers/regulator/axp20x-regulator.c | 82 
> +++-
>  include/linux/mfd/axp20x.h   | 38 +++
>  5 files changed, 153 insertions(+), 3 deletions(-)

And this needs to be split per logical changes.

> diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt 
> b/Documentation/devicetree/bindings/mfd/axp20x.txt
> index 585a955..2a8ec61 100644
> --- a/Documentation/devicetree/bindings/mfd/axp20x.txt
> +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
> @@ -7,10 +7,12 @@ axp209 (X-Powers)
>  axp221 (X-Powers)
>  axp223 (X-Powers)
>  axp809 (X-Powers)
> +axp813 (X-Powers)
>  
>  Required properties:
>  - compatible: "x-powers,axp152", "x-powers,axp202", "x-powers,axp209",
> -   "x-powers,axp221", "x-powers,axp223", "x-powers,axp809"
> +   "x-powers,axp221", "x-powers,axp223", "x-powers,axp809",
> +   "x-powers,axp813"
>  - reg: The I2C slave address or RSB hardware address for the AXP chip
>  - interrupt-parent: The parent interrupt controller
>  - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin
> @@ -110,6 +112,34 @@ LDO_IO1  : LDO   : ips-supply
> : GPIO 1
>  RTC_LDO  : LDO   : ips-supply: always on
>  SW   : On/Off Switch : swin-supply
>  
> +AXP813 regulators, type, and corresponding input supply names:
> +
> +Regulator  TypeSupply Name Notes
> +-  --- -
> +DCDC1: DC-DC buck: vin1-supply
> +DCDC2: DC-DC buck: vin2-supply
> +DCDC3: DC-DC buck: vin3-supply
> +DCDC4: DC-DC buck: vin4-supply
> +DCDC5: DC-DC buck: vin5-supply
> +DCDC6: DC-DC buck: vin6-supply
> +DCDC7: DC-DC buck: vin7-supply
> +RTC_LDO  : LDO   : ips-supply: always on
> +ALDO1: LDO   : aldoin-supply : shared supply
> +ALDO2: LDO   : aldoin-supply : shared supply
> +ALDO3: LDO   : aldoin-supply : shared supply
> +DLDO1: LDO   : dldoin-supply : shared supply
> +DLDO2: LDO   : dldoin-supply : shared supply
> +DLDO3: LDO   : dldoin-supply : shared supply
> +DLDO4: LDO   : dldoin-supply : shared supply
> +ELDO1: LDO   : eldoin-supply : shared supply
> +ELDO2: LDO   : eldoin-supply : shared supply
> +ELDO3: LDO   : eldoin-supply : shared supply
> +FLDO1: LDO   : fldoin-supply : shared supply
> +FLDO2: LDO   : fldoin-supply : shared supply
> +LDO_IO0  : LDO   : ips-supply: GPIO 0
> +LDO_IO1  : LDO   : ips-supply: GPIO 1
> +DC1SW: On/Off Switch :   : DCDC1 
> secondary output
> +
>  Example:
>  
>  axp209: pmic@34 {
> diff --git a/drivers/mfd/axp20x-rsb.c b/drivers/mfd/axp20x-rsb.c
> index a407527..e34643b 100644
> --- a/drivers/mfd/axp20x-rsb.c
> +++ b/drivers/mfd/axp20x-rsb.c
> @@ -62,6 +62,7 @@ static int axp20x_rsb_remove(struct sunxi_rsb_device *rdev)
>  static const struct of_device_id axp20x_rsb_of_match[] = {
>   { .compatible = "x-powers,axp223", .data = (void *)AXP223_ID },
>   { .compatible = "x-powers,axp809", .data = (void *)AXP809_ID },
> + { .compatible = "x-powers,axp813", .data = (void *)AXP813_ID },
>   { },
>  };
>  MODULE_DEVICE_TABLE(of, axp20x_rsb_of_match);
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index fd80b09..e62d56f 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -39,6 +39,7 @@ static const char * const axp20x_model_names[] = {
>   "AXP223",
>   "AXP288",
>   "AXP809",
> + "AXP813",
>  };
>  
>  static const struct regmap_range axp152_writeable_ranges[] = {
> @@ -494,6 +495,7 @@ static const struct regmap_irq_chip 
> axp288_regmap_irq_chip = {
>  
>  };
>  
> +/* common 803/809/813 */
>  static const struct regmap_irq_chip axp809_regmap_irq_chip = {
>   .name   = "axp809",
>   .status_base= AXP20X_IRQ1_STATE,
> @@