Re: [PATCH v3 1/2] mfd: Add support for MAX77686.

2012-05-22 Thread Yadwinder Singh Brar
CC' ing to maintainer.
(I forget to add maintainer in cc, sorry for noise).

On Tue, May 22, 2012 at 11:26 AM,  yadi.bra...@gmail.com wrote:
 From: Yadwinder Singh Brar yadi.b...@samsung.com

 MAX77686 is a mulitifunction device with PMIC, RTC and Charger on chip. Th
 driver provides common support for accessing the device. This is initial
 version of this driver that supports to enable the chip with its primary I
 bus.It also includes IRQ and device tree support for MAX77686 chip.

 Signed-off-by: Yadwinder Singh Brar yadi.b...@samsung.com
 Reviewed-by: Mark Brown broo...@opensource.wolfsonmicro.com
 ---
  Documentation/devicetree/bindings/mfd/max77686.txt |   61 
  drivers/mfd/Kconfig                                |   21 ++
  drivers/mfd/Makefile                               |    1 +
  drivers/mfd/max77686-irq.c                         |  255 
  drivers/mfd/max77686.c                             |  322 
 
  include/linux/mfd/max77686-private.h               |  282 +
  include/linux/mfd/max77686.h                       |  100 ++
  7 files changed, 1042 insertions(+), 0 deletions(-)
  create mode 100644 Documentation/devicetree/bindings/mfd/max77686.txt
  create mode 100644 drivers/mfd/max77686-irq.c
  create mode 100644 drivers/mfd/max77686.c
  create mode 100644 include/linux/mfd/max77686-private.h
  create mode 100644 include/linux/mfd/max77686.h

 diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt 
 b/Documentation/devicetree/bindings/mfd/max77686.txt
 new file mode 100644
 index 000..78a47bd
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/mfd/max77686.txt
 @@ -0,0 +1,61 @@
 +Maxim MAX77686 multi-function device
 +
 +MAX77686 is a Mulitifunction device with PMIC, RTC and Charger on chip. It is
 +interfaced to host controller using i2c interface. PMIC and Charger 
 submodules
 +are addressed using same i2c slave address where as RTC submodule uses
 +different slave address,presently for which we are statically creating i2c
 +client while probing.This document describes the binding for mfd device and
 +PMIC submodule.
 +
 +Required properties:
 +- compatible : Must be maxim,max77686;
 +- reg : Specifiec the i2c slave address of PMIC block.
 +- interrupts : This i2c device has an IRQ line connected to the main SoC.
 +- interrupt-parent : The parent interrupt controller.
 +
 +Optional node:
 +- max77686,buck_ramp_delay : Ramp delay to be setup for buck2,34.
 +
 +- voltage-regulators : The regulators of max77686 have to be instantiated
 +  under subnode named voltage-regulators uing the following format.
 +
 +       regulator_name {
 +               standard regulator constraints
 +       };
 +       refer Documentation/devicetree/bindings/regulator/regulator.txt
 +
 +  The names of regulator should be as follow:
 +
 +       -LDOn   :       for LDOs, where n can lie in range 1 to 26.
 +                       example: LDO1, LDO2, LDO26.
 +       -BUCKn  :       for BUCKs, where n can lie in range 1 to 9.
 +                       example: BUCK1, BUCK5, BUCK9.
 +
 +
 +Example:
 +
 +       max77686_pmic@09 {
 +               compatible = maxim,max77686;
 +               interrupt-parent = wakeup_eint;
 +               interrupts = 26 0;
 +               reg = 0x09;
 +
 +               max77686,buck_ramp_delay = 2;         /* default */
 +
 +               voltage-regulators {
 +                       ldo11_reg: LDO11 {
 +                               regulator-name = vdd_ldo11;
 +                               regulator-min-microvolt = 190;
 +                               regulator-max-microvolt = 190;
 +                               regulator-always-on;
 +                       };
 +
 +                       buck1_reg: BUCK1 {
 +                               regulator-name = vdd_mif;
 +                               regulator-min-microvolt = 95;
 +                               regulator-max-microvolt = 130;
 +                               regulator-always-on;
 +                               regulator-boot-on;
 +                       };
 +       }
 +
 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
 index a4fd173..d8285e5 100644
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
 @@ -442,6 +442,27 @@ config MFD_MAX8998
          additional drivers must be enabled in order to use the functionality
          of the device.

 +config MFD_MAX77686
 +       bool Maxim Semiconductor MAX77686 PMIC Support
 +       depends on I2C=y  GENERIC_HARDIRQS
 +       select MFD_CORE
 +       select REGMAP_I2C
 +       help
 +         Say yes here to support for Maxim Semiconductor MAX77686.
 +         This is a Power Management IC with RTC on chip.
 +         This driver provides common support for accessing the device;
 +         additional drivers must be enabled in order to use the functionality
 +         of the device.
 +
 +config DEBUG_MAX77686
 +       bool MAX77686 PMIC debugging
 +       depends 

[PATCH v3 1/2] mfd: Add support for MAX77686.

2012-05-21 Thread yadi . brar01
From: Yadwinder Singh Brar yadi.b...@samsung.com

MAX77686 is a mulitifunction device with PMIC, RTC and Charger on chip. Th
driver provides common support for accessing the device. This is initial
version of this driver that supports to enable the chip with its primary I
bus.It also includes IRQ and device tree support for MAX77686 chip.

Signed-off-by: Yadwinder Singh Brar yadi.b...@samsung.com
Reviewed-by: Mark Brown broo...@opensource.wolfsonmicro.com
---
 Documentation/devicetree/bindings/mfd/max77686.txt |   61 
 drivers/mfd/Kconfig|   21 ++
 drivers/mfd/Makefile   |1 +
 drivers/mfd/max77686-irq.c |  255 
 drivers/mfd/max77686.c |  322 
 include/linux/mfd/max77686-private.h   |  282 +
 include/linux/mfd/max77686.h   |  100 ++
 7 files changed, 1042 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/max77686.txt
 create mode 100644 drivers/mfd/max77686-irq.c
 create mode 100644 drivers/mfd/max77686.c
 create mode 100644 include/linux/mfd/max77686-private.h
 create mode 100644 include/linux/mfd/max77686.h

diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt 
b/Documentation/devicetree/bindings/mfd/max77686.txt
new file mode 100644
index 000..78a47bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/max77686.txt
@@ -0,0 +1,61 @@
+Maxim MAX77686 multi-function device
+
+MAX77686 is a Mulitifunction device with PMIC, RTC and Charger on chip. It is
+interfaced to host controller using i2c interface. PMIC and Charger submodules
+are addressed using same i2c slave address where as RTC submodule uses
+different slave address,presently for which we are statically creating i2c
+client while probing.This document describes the binding for mfd device and
+PMIC submodule.
+
+Required properties:
+- compatible : Must be maxim,max77686;
+- reg : Specifiec the i2c slave address of PMIC block.
+- interrupts : This i2c device has an IRQ line connected to the main SoC.
+- interrupt-parent : The parent interrupt controller.
+
+Optional node:
+- max77686,buck_ramp_delay : Ramp delay to be setup for buck2,34.
+
+- voltage-regulators : The regulators of max77686 have to be instantiated
+  under subnode named voltage-regulators uing the following format.
+
+   regulator_name {
+   standard regulator constraints
+   };
+   refer Documentation/devicetree/bindings/regulator/regulator.txt
+
+  The names of regulator should be as follow:
+
+   -LDOn   :   for LDOs, where n can lie in range 1 to 26.
+   example: LDO1, LDO2, LDO26.
+   -BUCKn  :   for BUCKs, where n can lie in range 1 to 9.
+   example: BUCK1, BUCK5, BUCK9.
+
+
+Example:
+
+   max77686_pmic@09 {
+   compatible = maxim,max77686;
+   interrupt-parent = wakeup_eint;
+   interrupts = 26 0;
+   reg = 0x09;
+
+   max77686,buck_ramp_delay = 2; /* default */
+
+   voltage-regulators {
+   ldo11_reg: LDO11 {
+   regulator-name = vdd_ldo11;
+   regulator-min-microvolt = 190;
+   regulator-max-microvolt = 190;
+   regulator-always-on;
+   };
+
+   buck1_reg: BUCK1 {
+   regulator-name = vdd_mif;
+   regulator-min-microvolt = 95;
+   regulator-max-microvolt = 130;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   }
+
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index a4fd173..d8285e5 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -442,6 +442,27 @@ config MFD_MAX8998
  additional drivers must be enabled in order to use the functionality
  of the device.
 
+config MFD_MAX77686
+   bool Maxim Semiconductor MAX77686 PMIC Support
+   depends on I2C=y  GENERIC_HARDIRQS
+   select MFD_CORE
+   select REGMAP_I2C
+   help
+ Say yes here to support for Maxim Semiconductor MAX77686.
+ This is a Power Management IC with RTC on chip.
+ This driver provides common support for accessing the device;
+ additional drivers must be enabled in order to use the functionality
+ of the device.
+
+config DEBUG_MAX77686
+   bool MAX77686 PMIC debugging
+   depends on MFD_MAX77686
+   help
+ Say yes, if you need enable debug messages in
+ MFD_MAX77686 driver.
+ Further for enabling/disabling particular type of debug
+ messages set max77686_debug_mask accordingly.
+
 config