Re: [PATCH 4/5] regulator: Add support for TI TWL6032

2016-12-01 Thread Rob Herring
On Sat, Nov 26, 2016 at 08:13:25PM +0200, Nicolae Rosia wrote:
> The TWL6032 PMIC is similar to TWL6030, has different
> output names, and regulator control logic.
> It is used on Barnes & Noble Nook HD and HD+.
> 
> Signed-off-by: Nicolae Rosia 
> ---
>  .../bindings/regulator/twl6032-regulator.txt   | 109 
>  drivers/regulator/Kconfig  |   7 +
>  drivers/regulator/Makefile |   1 +
>  drivers/regulator/twl6032-regulator.c  | 582 
> +
>  4 files changed, 699 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/regulator/twl6032-regulator.txt
>  create mode 100644 drivers/regulator/twl6032-regulator.c
> 
> diff --git 
> a/Documentation/devicetree/bindings/regulator/twl6032-regulator.txt 
> b/Documentation/devicetree/bindings/regulator/twl6032-regulator.txt
> new file mode 100644
> index 000..323f5a9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/twl6032-regulator.txt
> @@ -0,0 +1,109 @@
> +TWL6032 PMIC Voltage Regulator Bindings
> +
> +The parent node must be MFD TWL Core, ti,twl6032.
> +
> +Required properties:
> +- compatible: "ti,twl6032"
> +
> +Optional properties:
> +- regulators node containing regulator childs.

s/childs/children/

regulators node is not a property.

> +
> +The child regulators  must be named after their hardware

extra space ^

> +counterparts: LDO[1-6], LDOLN, LDOUSB and VANA.
> +
> +Each regulator is defined using the standard binding
> +for regulators as described in ./regulator.txt
> +
> +Example:
> +twl {
> + compatible = "ti,twl6032";
> +
> + [...]
> +
> + pmic {
> + compatible = "ti,twl6032-regulator";

Not documented.

> +
> + regulators {

Do you really need pmic node and regulators node?

> + ldo1: LDO1 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <250>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + ldo2: LDO2 {
> + regulator-min-microvolt = <100>;
> + regulator-max-microvolt = <300>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + ldo3: LDO3 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <180>;
> + regulator-boot-on;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + ldo4: LDO4 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <180>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + ldo5: LDO5 {
> + regulator-min-microvolt = <120>;
> + regulator-max-microvolt = <300>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + ldo6: LDO6 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <180>;
> + regulator-always-on;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + ldo7: LDO7 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <180>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldoln: LDOLN {
> + regulator-min-microvolt = <100>;
> + regulator-max-microvolt = <300>;
> + };
> +
> + ldousb: LDOUSB {
> + regulator-min-microvolt = <100>;
> + regulator-max-microvolt = <300>;
> + };
> +
> + vana: VANA {
> + regulator-min-microvolt = <210>;
> + regulato

Re: [PATCH 4/5] regulator: Add support for TI TWL6032

2016-11-26 Thread Rosia, Nicolae
Hi,

On Sun, 2016-11-27 at 02:55 +0800, kbuild test robot wrote:
> Hi Nicolae,
> 
> [auto build test ERROR on omap/for-next]
> [also build test ERROR on v4.9-rc6]
> [cannot apply to next-20161125]
> [if your patch is applied to the wrong git tree, please drop us a
> note to help improve the system]
> 
> url:https://github.com/0day-ci/linux/commits/Nicolae-Rosia/mfd-tw
> l-improvements-and-new-regulator-driver/20161127-022201
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-
> omap.git for-next
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386 
> 
> All error/warnings (new ones prefixed by >>):
> 
>    In file included from drivers/regulator/twl6032-regulator.c:11:0:
> > > drivers/regulator/twl6032-regulator.c:557:31: error:
> > > 'twl6032_regulator_driver_ids' undeclared here (not in a
> > > function)
> 
> MODULE_DEVICE_TABLE(platform, twl6032_regulator_driver_ids);
>   ^
>    include/linux/module.h:213:21: note: in definition of macro
> 'MODULE_DEVICE_TABLE'
> extern const typeof(name)
> __mod_##type##__##name##_device_table  \
> ^~~~
> > > include/linux/module.h:213:27: error:
> > > '__mod_platform__twl6032_regulator_driver_ids_device_table'
> > > aliased to undefined symbol 'twl6032_regulator_driver_ids'
> 
> extern const typeof(name)
> __mod_##type##__##name##_device_table  \
>   ^
> > > drivers/regulator/twl6032-regulator.c:557:1: note: in expansion
> > > of macro 'MODULE_DEVICE_TABLE'
> 
> MODULE_DEVICE_TABLE(platform, twl6032_regulator_driver_ids);
> ^~~
> 
> vim +/twl6032_regulator_driver_ids +557 drivers/regulator/twl6032-
> regulator.c
> 
>    551
>    552static const struct of_device_id twl6032_dt_match[] = {
>    553{ .compatible = "ti,twl6032-regulator" },
>    554{ /* last entry */ }
>    555};
>    556
>  > 557MODULE_DEVICE_TABLE(platform,
> twl6032_regulator_driver_ids);
>    558
>    559static struct platform_driver twl6032_regulator_driver
> = {
>    560.driver = {

Thanks, I did not notice this since I was only testing using built-in
module.
I will wait for comments before sending V2, untill then here's an
inline patch with the fix.


Best regards,
Nicolae



Re: [PATCH 4/5] regulator: Add support for TI TWL6032

2016-11-26 Thread kbuild test robot
Hi Nicolae,

[auto build test ERROR on omap/for-next]
[also build test ERROR on v4.9-rc6]
[cannot apply to next-20161125]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nicolae-Rosia/mfd-twl-improvements-and-new-regulator-driver/20161127-022201
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git 
for-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from drivers/regulator/twl6032-regulator.c:11:0:
>> drivers/regulator/twl6032-regulator.c:557:31: error: 
>> 'twl6032_regulator_driver_ids' undeclared here (not in a function)
MODULE_DEVICE_TABLE(platform, twl6032_regulator_driver_ids);
  ^
   include/linux/module.h:213:21: note: in definition of macro 
'MODULE_DEVICE_TABLE'
extern const typeof(name) __mod_##type##__##name##_device_table  \
^~~~
>> include/linux/module.h:213:27: error: 
>> '__mod_platform__twl6032_regulator_driver_ids_device_table' aliased to 
>> undefined symbol 'twl6032_regulator_driver_ids'
extern const typeof(name) __mod_##type##__##name##_device_table  \
  ^
>> drivers/regulator/twl6032-regulator.c:557:1: note: in expansion of macro 
>> 'MODULE_DEVICE_TABLE'
MODULE_DEVICE_TABLE(platform, twl6032_regulator_driver_ids);
^~~

vim +/twl6032_regulator_driver_ids +557 drivers/regulator/twl6032-regulator.c

   551  
   552  static const struct of_device_id twl6032_dt_match[] = {
   553  { .compatible = "ti,twl6032-regulator" },
   554  { /* last entry */ }
   555  };
   556  
 > 557  MODULE_DEVICE_TABLE(platform, twl6032_regulator_driver_ids);
   558  
   559  static struct platform_driver twl6032_regulator_driver = {
   560  .driver = {

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip