* [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index
@ 2019-10-04 23:10 Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2019-10-04 23:10 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, linux-kernel, Bartlomiej Zolnierkiewicz,
Chanwoo Choi, Krzysztof Kozlowski, Liam Girdwood, Sangbeom Kim,
Support Opensource, linux-samsung-soc
This series swiches regulator drivers form using
[devm_]gpiod_get_from_of_node() that is scheduled to be removed in favor
of [devm_]fwnode_gpiod_get_index() that behaves more like standard
[devm_]gpiod_get_index() and will potentially handle secondary software
nodes in cases we need to augment platform firmware.
This depends on the new code that can be found in
ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
I hope that it would be possible to pull in this immutable branch and
not wait until after 5.5 merge window.
Thanks!
Dmitry Torokhov (7):
regulator: s5m8767: switch to using devm_fwnode_gpiod_get
regulator: slg51000: switch to using fwnode_gpiod_get_index
regulator: tps65090: switch to using devm_fwnode_gpiod_get
regulator: s2mps11: switch to using devm_fwnode_gpiod_get
regulator: da9211: switch to using devm_fwnode_gpiod_get
regulator: tps65132: switch to using devm_fwnode_gpiod_get()
regulator: max77686: switch to using fwnode_gpiod_get_index
drivers/regulator/da9211-regulator.c | 12 ++++++------
drivers/regulator/max77686-regulator.c | 5 +++--
drivers/regulator/s2mps11.c | 7 +++----
drivers/regulator/s5m8767.c | 7 +++----
drivers/regulator/slg51000-regulator.c | 13 +++++--------
drivers/regulator/tps65090-regulator.c | 26 +++++++++++++++-----------
drivers/regulator/tps65132-regulator.c | 17 ++++++++++-------
7 files changed, 45 insertions(+), 42 deletions(-)
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index
2019-10-04 23:10 [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Dmitry Torokhov
@ 2019-10-04 23:10 ` Dmitry Torokhov
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2019-10-04 23:10 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, linux-kernel, Bartlomiej Zolnierkiewicz,
Chanwoo Choi, Krzysztof Kozlowski, Liam Girdwood, Sangbeom Kim,
Support Opensource, linux-samsung-soc
This series swiches regulator drivers form using
[devm_]gpiod_get_from_of_node() that is scheduled to be removed in favor
of [devm_]fwnode_gpiod_get_index() that behaves more like standard
[devm_]gpiod_get_index() and will potentially handle secondary software
nodes in cases we need to augment platform firmware.
This depends on the new code that can be found in
ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
I hope that it would be possible to pull in this immutable branch and
not wait until after 5.5 merge window.
Thanks!
Dmitry Torokhov (7):
regulator: s5m8767: switch to using devm_fwnode_gpiod_get
regulator: slg51000: switch to using fwnode_gpiod_get_index
regulator: tps65090: switch to using devm_fwnode_gpiod_get
regulator: s2mps11: switch to using devm_fwnode_gpiod_get
regulator: da9211: switch to using devm_fwnode_gpiod_get
regulator: tps65132: switch to using devm_fwnode_gpiod_get()
regulator: max77686: switch to using fwnode_gpiod_get_index
drivers/regulator/da9211-regulator.c | 12 ++++++------
drivers/regulator/max77686-regulator.c | 5 +++--
drivers/regulator/s2mps11.c | 7 +++----
drivers/regulator/s5m8767.c | 7 +++----
drivers/regulator/slg51000-regulator.c | 13 +++++--------
drivers/regulator/tps65090-regulator.c | 26 +++++++++++++++-----------
drivers/regulator/tps65132-regulator.c | 17 ++++++++++-------
7 files changed, 45 insertions(+), 42 deletions(-)
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
2019-10-04 23:10 [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
@ 2019-10-04 23:10 ` Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
` (3 more replies)
2019-10-04 23:10 ` [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-05 19:01 ` [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Linus Walleij
3 siblings, 4 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2019-10-04 23:10 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, linux-kernel, Bartlomiej Zolnierkiewicz,
Krzysztof Kozlowski, Liam Girdwood, Sangbeom Kim,
linux-samsung-soc
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/regulator/s5m8767.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 6ca27e9d5ef7..bdc07739e9a2 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -567,11 +567,10 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
continue;
}
- rdata->ext_control_gpiod = devm_gpiod_get_from_of_node(
+ rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
&pdev->dev,
- reg_np,
- "s5m8767,pmic-ext-control-gpios",
- 0,
+ of_fwnode_handle(reg_np),
+ "s5m8767,pmic-ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s5m8767");
if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
@ 2019-10-04 23:10 ` Dmitry Torokhov
2019-10-05 6:42 ` kbuild test robot
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2019-10-04 23:10 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, linux-kernel, Bartlomiej Zolnierkiewicz,
Krzysztof Kozlowski, Liam Girdwood, Sangbeom Kim,
linux-samsung-soc
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/regulator/s5m8767.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 6ca27e9d5ef7..bdc07739e9a2 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -567,11 +567,10 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
continue;
}
- rdata->ext_control_gpiod = devm_gpiod_get_from_of_node(
+ rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
&pdev->dev,
- reg_np,
- "s5m8767,pmic-ext-control-gpios",
- 0,
+ of_fwnode_handle(reg_np),
+ "s5m8767,pmic-ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s5m8767");
if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get
2019-10-04 23:10 [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
@ 2019-10-04 23:10 ` Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
2019-10-07 13:03 ` Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-05 19:01 ` [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Linus Walleij
3 siblings, 2 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2019-10-04 23:10 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, linux-kernel, Bartlomiej Zolnierkiewicz,
Krzysztof Kozlowski, Liam Girdwood, Sangbeom Kim,
linux-samsung-soc
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/regulator/s2mps11.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 5bc00884cf51..4f2dc5ebffdc 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -844,10 +844,9 @@ static void s2mps14_pmic_dt_parse_ext_control_gpio(struct platform_device *pdev,
if (!rdata[reg].init_data || !rdata[reg].of_node)
continue;
- gpio[reg] = devm_gpiod_get_from_of_node(&pdev->dev,
- rdata[reg].of_node,
- "samsung,ext-control-gpios",
- 0,
+ gpio[reg] = devm_fwnode_gpiod_get(&pdev->dev,
+ of_fwnode_handle(rdata[reg].of_node),
+ "samsung,ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s2mps11-regulator");
if (PTR_ERR(gpio[reg]) == -ENOENT)
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get
2019-10-04 23:10 ` [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
@ 2019-10-04 23:10 ` Dmitry Torokhov
2019-10-07 13:03 ` Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
1 sibling, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2019-10-04 23:10 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, linux-kernel, Bartlomiej Zolnierkiewicz,
Krzysztof Kozlowski, Liam Girdwood, Sangbeom Kim,
linux-samsung-soc
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/regulator/s2mps11.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 5bc00884cf51..4f2dc5ebffdc 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -844,10 +844,9 @@ static void s2mps14_pmic_dt_parse_ext_control_gpio(struct platform_device *pdev,
if (!rdata[reg].init_data || !rdata[reg].of_node)
continue;
- gpio[reg] = devm_gpiod_get_from_of_node(&pdev->dev,
- rdata[reg].of_node,
- "samsung,ext-control-gpios",
- 0,
+ gpio[reg] = devm_fwnode_gpiod_get(&pdev->dev,
+ of_fwnode_handle(rdata[reg].of_node),
+ "samsung,ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s2mps11-regulator");
if (PTR_ERR(gpio[reg]) == -ENOENT)
--
2.23.0.581.g78d2f28ef7-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
@ 2019-10-05 6:42 ` kbuild test robot
2019-10-05 6:42 ` kbuild test robot
2019-10-05 6:59 ` kbuild test robot
2019-10-07 13:03 ` Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
3 siblings, 1 reply; 16+ messages in thread
From: kbuild test robot @ 2019-10-05 6:42 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: kbuild-all, Mark Brown, Linus Walleij, linux-kernel,
Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Sangbeom Kim, linux-samsung-soc
[-- Attachment #1: Type: text/plain, Size: 7523 bytes --]
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on regulator/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/regulator-switch-to-using-devm_-fwnode_gpiod_get_index/20191005-085020
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_pdata':
>> drivers/regulator/s5m8767.c:570:30: error: implicit declaration of function 'devm_fwnode_gpiod_get'; did you mean 'devm_gpiod_get'? [-Werror=implicit-function-declaration]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^~~~~~~~~~~~~~~~~~~~~
devm_gpiod_get
>> drivers/regulator/s5m8767.c:570:28: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^
cc1: some warnings being treated as errors
vim +570 drivers/regulator/s5m8767.c
519
520 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
521 struct sec_platform_data *pdata)
522 {
523 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
524 struct device_node *pmic_np, *regulators_np, *reg_np;
525 struct sec_regulator_data *rdata;
526 struct sec_opmode_data *rmode;
527 unsigned int i, dvs_voltage_nr = 8, ret;
528
529 pmic_np = iodev->dev->of_node;
530 if (!pmic_np) {
531 dev_err(iodev->dev, "could not find pmic sub-node\n");
532 return -ENODEV;
533 }
534
535 regulators_np = of_get_child_by_name(pmic_np, "regulators");
536 if (!regulators_np) {
537 dev_err(iodev->dev, "could not find regulators sub-node\n");
538 return -EINVAL;
539 }
540
541 /* count the number of regulators to be supported in pmic */
542 pdata->num_regulators = of_get_child_count(regulators_np);
543
544 rdata = devm_kcalloc(&pdev->dev,
545 pdata->num_regulators, sizeof(*rdata),
546 GFP_KERNEL);
547 if (!rdata)
548 return -ENOMEM;
549
550 rmode = devm_kcalloc(&pdev->dev,
551 pdata->num_regulators, sizeof(*rmode),
552 GFP_KERNEL);
553 if (!rmode)
554 return -ENOMEM;
555
556 pdata->regulators = rdata;
557 pdata->opmode = rmode;
558 for_each_child_of_node(regulators_np, reg_np) {
559 for (i = 0; i < ARRAY_SIZE(regulators); i++)
560 if (of_node_name_eq(reg_np, regulators[i].name))
561 break;
562
563 if (i == ARRAY_SIZE(regulators)) {
564 dev_warn(iodev->dev,
565 "don't know how to configure regulator %pOFn\n",
566 reg_np);
567 continue;
568 }
569
> 570 rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
571 &pdev->dev,
572 of_fwnode_handle(reg_np),
573 "s5m8767,pmic-ext-control",
574 GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
575 "s5m8767");
576 if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
577 rdata->ext_control_gpiod = NULL;
578 else if (IS_ERR(rdata->ext_control_gpiod))
579 return PTR_ERR(rdata->ext_control_gpiod);
580
581 rdata->id = i;
582 rdata->initdata = of_get_regulator_init_data(
583 &pdev->dev, reg_np,
584 ®ulators[i]);
585 rdata->reg_node = reg_np;
586 rdata++;
587 rmode->id = i;
588 if (of_property_read_u32(reg_np, "op_mode",
589 &rmode->mode)) {
590 dev_warn(iodev->dev,
591 "no op_mode property property at %pOF\n",
592 reg_np);
593
594 rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
595 }
596 rmode++;
597 }
598
599 of_node_put(regulators_np);
600
601 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) {
602 pdata->buck2_gpiodvs = true;
603
604 if (of_property_read_u32_array(pmic_np,
605 "s5m8767,pmic-buck2-dvs-voltage",
606 pdata->buck2_voltage, dvs_voltage_nr)) {
607 dev_err(iodev->dev, "buck2 voltages not specified\n");
608 return -EINVAL;
609 }
610 }
611
612 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) {
613 pdata->buck3_gpiodvs = true;
614
615 if (of_property_read_u32_array(pmic_np,
616 "s5m8767,pmic-buck3-dvs-voltage",
617 pdata->buck3_voltage, dvs_voltage_nr)) {
618 dev_err(iodev->dev, "buck3 voltages not specified\n");
619 return -EINVAL;
620 }
621 }
622
623 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) {
624 pdata->buck4_gpiodvs = true;
625
626 if (of_property_read_u32_array(pmic_np,
627 "s5m8767,pmic-buck4-dvs-voltage",
628 pdata->buck4_voltage, dvs_voltage_nr)) {
629 dev_err(iodev->dev, "buck4 voltages not specified\n");
630 return -EINVAL;
631 }
632 }
633
634 if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
635 pdata->buck4_gpiodvs) {
636 ret = s5m8767_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
637 if (ret)
638 return -EINVAL;
639
640 if (of_property_read_u32(pmic_np,
641 "s5m8767,pmic-buck-default-dvs-idx",
642 &pdata->buck_default_idx)) {
643 pdata->buck_default_idx = 0;
644 } else {
645 if (pdata->buck_default_idx >= 8) {
646 pdata->buck_default_idx = 0;
647 dev_info(iodev->dev,
648 "invalid value for default dvs index, use 0\n");
649 }
650 }
651 }
652
653 ret = s5m8767_pmic_dt_parse_ds_gpio(iodev, pdata, pmic_np);
654 if (ret)
655 return -EINVAL;
656
657 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
658 pdata->buck2_ramp_enable = true;
659
660 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
661 pdata->buck3_ramp_enable = true;
662
663 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
664 pdata->buck4_ramp_enable = true;
665
666 if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
667 || pdata->buck4_ramp_enable) {
668 if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
669 &pdata->buck_ramp_delay))
670 pdata->buck_ramp_delay = 0;
671 }
672
673 return 0;
674 }
675 #else
676 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
677 struct sec_platform_data *pdata)
678 {
679 return 0;
680 }
681 #endif /* CONFIG_OF */
682
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59595 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
2019-10-05 6:42 ` kbuild test robot
@ 2019-10-05 6:42 ` kbuild test robot
0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2019-10-05 6:42 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: kbuild-all, Mark Brown, Linus Walleij, linux-kernel,
Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Sangbeom Kim, linux-samsung-soc
[-- Attachment #1: Type: text/plain, Size: 7523 bytes --]
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on regulator/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/regulator-switch-to-using-devm_-fwnode_gpiod_get_index/20191005-085020
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_pdata':
>> drivers/regulator/s5m8767.c:570:30: error: implicit declaration of function 'devm_fwnode_gpiod_get'; did you mean 'devm_gpiod_get'? [-Werror=implicit-function-declaration]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^~~~~~~~~~~~~~~~~~~~~
devm_gpiod_get
>> drivers/regulator/s5m8767.c:570:28: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^
cc1: some warnings being treated as errors
vim +570 drivers/regulator/s5m8767.c
519
520 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
521 struct sec_platform_data *pdata)
522 {
523 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
524 struct device_node *pmic_np, *regulators_np, *reg_np;
525 struct sec_regulator_data *rdata;
526 struct sec_opmode_data *rmode;
527 unsigned int i, dvs_voltage_nr = 8, ret;
528
529 pmic_np = iodev->dev->of_node;
530 if (!pmic_np) {
531 dev_err(iodev->dev, "could not find pmic sub-node\n");
532 return -ENODEV;
533 }
534
535 regulators_np = of_get_child_by_name(pmic_np, "regulators");
536 if (!regulators_np) {
537 dev_err(iodev->dev, "could not find regulators sub-node\n");
538 return -EINVAL;
539 }
540
541 /* count the number of regulators to be supported in pmic */
542 pdata->num_regulators = of_get_child_count(regulators_np);
543
544 rdata = devm_kcalloc(&pdev->dev,
545 pdata->num_regulators, sizeof(*rdata),
546 GFP_KERNEL);
547 if (!rdata)
548 return -ENOMEM;
549
550 rmode = devm_kcalloc(&pdev->dev,
551 pdata->num_regulators, sizeof(*rmode),
552 GFP_KERNEL);
553 if (!rmode)
554 return -ENOMEM;
555
556 pdata->regulators = rdata;
557 pdata->opmode = rmode;
558 for_each_child_of_node(regulators_np, reg_np) {
559 for (i = 0; i < ARRAY_SIZE(regulators); i++)
560 if (of_node_name_eq(reg_np, regulators[i].name))
561 break;
562
563 if (i == ARRAY_SIZE(regulators)) {
564 dev_warn(iodev->dev,
565 "don't know how to configure regulator %pOFn\n",
566 reg_np);
567 continue;
568 }
569
> 570 rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
571 &pdev->dev,
572 of_fwnode_handle(reg_np),
573 "s5m8767,pmic-ext-control",
574 GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
575 "s5m8767");
576 if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
577 rdata->ext_control_gpiod = NULL;
578 else if (IS_ERR(rdata->ext_control_gpiod))
579 return PTR_ERR(rdata->ext_control_gpiod);
580
581 rdata->id = i;
582 rdata->initdata = of_get_regulator_init_data(
583 &pdev->dev, reg_np,
584 ®ulators[i]);
585 rdata->reg_node = reg_np;
586 rdata++;
587 rmode->id = i;
588 if (of_property_read_u32(reg_np, "op_mode",
589 &rmode->mode)) {
590 dev_warn(iodev->dev,
591 "no op_mode property property at %pOF\n",
592 reg_np);
593
594 rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
595 }
596 rmode++;
597 }
598
599 of_node_put(regulators_np);
600
601 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) {
602 pdata->buck2_gpiodvs = true;
603
604 if (of_property_read_u32_array(pmic_np,
605 "s5m8767,pmic-buck2-dvs-voltage",
606 pdata->buck2_voltage, dvs_voltage_nr)) {
607 dev_err(iodev->dev, "buck2 voltages not specified\n");
608 return -EINVAL;
609 }
610 }
611
612 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) {
613 pdata->buck3_gpiodvs = true;
614
615 if (of_property_read_u32_array(pmic_np,
616 "s5m8767,pmic-buck3-dvs-voltage",
617 pdata->buck3_voltage, dvs_voltage_nr)) {
618 dev_err(iodev->dev, "buck3 voltages not specified\n");
619 return -EINVAL;
620 }
621 }
622
623 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) {
624 pdata->buck4_gpiodvs = true;
625
626 if (of_property_read_u32_array(pmic_np,
627 "s5m8767,pmic-buck4-dvs-voltage",
628 pdata->buck4_voltage, dvs_voltage_nr)) {
629 dev_err(iodev->dev, "buck4 voltages not specified\n");
630 return -EINVAL;
631 }
632 }
633
634 if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
635 pdata->buck4_gpiodvs) {
636 ret = s5m8767_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
637 if (ret)
638 return -EINVAL;
639
640 if (of_property_read_u32(pmic_np,
641 "s5m8767,pmic-buck-default-dvs-idx",
642 &pdata->buck_default_idx)) {
643 pdata->buck_default_idx = 0;
644 } else {
645 if (pdata->buck_default_idx >= 8) {
646 pdata->buck_default_idx = 0;
647 dev_info(iodev->dev,
648 "invalid value for default dvs index, use 0\n");
649 }
650 }
651 }
652
653 ret = s5m8767_pmic_dt_parse_ds_gpio(iodev, pdata, pmic_np);
654 if (ret)
655 return -EINVAL;
656
657 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
658 pdata->buck2_ramp_enable = true;
659
660 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
661 pdata->buck3_ramp_enable = true;
662
663 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
664 pdata->buck4_ramp_enable = true;
665
666 if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
667 || pdata->buck4_ramp_enable) {
668 if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
669 &pdata->buck_ramp_delay))
670 pdata->buck_ramp_delay = 0;
671 }
672
673 return 0;
674 }
675 #else
676 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
677 struct sec_platform_data *pdata)
678 {
679 return 0;
680 }
681 #endif /* CONFIG_OF */
682
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59595 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
2019-10-05 6:42 ` kbuild test robot
@ 2019-10-05 6:59 ` kbuild test robot
2019-10-05 6:59 ` kbuild test robot
2019-10-07 13:03 ` Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
3 siblings, 1 reply; 16+ messages in thread
From: kbuild test robot @ 2019-10-05 6:59 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: kbuild-all, Mark Brown, Linus Walleij, linux-kernel,
Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Sangbeom Kim, linux-samsung-soc
[-- Attachment #1: Type: text/plain, Size: 7557 bytes --]
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on regulator/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/regulator-switch-to-using-devm_-fwnode_gpiod_get_index/20191005-085020
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_pdata':
drivers/regulator/s5m8767.c:570:30: error: implicit declaration of function 'devm_fwnode_gpiod_get'; did you mean 'devm_gpiod_get'? [-Werror=implicit-function-declaration]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^~~~~~~~~~~~~~~~~~~~~
devm_gpiod_get
>> drivers/regulator/s5m8767.c:570:28: warning: assignment to 'struct gpio_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^
cc1: some warnings being treated as errors
vim +570 drivers/regulator/s5m8767.c
519
520 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
521 struct sec_platform_data *pdata)
522 {
523 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
524 struct device_node *pmic_np, *regulators_np, *reg_np;
525 struct sec_regulator_data *rdata;
526 struct sec_opmode_data *rmode;
527 unsigned int i, dvs_voltage_nr = 8, ret;
528
529 pmic_np = iodev->dev->of_node;
530 if (!pmic_np) {
531 dev_err(iodev->dev, "could not find pmic sub-node\n");
532 return -ENODEV;
533 }
534
535 regulators_np = of_get_child_by_name(pmic_np, "regulators");
536 if (!regulators_np) {
537 dev_err(iodev->dev, "could not find regulators sub-node\n");
538 return -EINVAL;
539 }
540
541 /* count the number of regulators to be supported in pmic */
542 pdata->num_regulators = of_get_child_count(regulators_np);
543
544 rdata = devm_kcalloc(&pdev->dev,
545 pdata->num_regulators, sizeof(*rdata),
546 GFP_KERNEL);
547 if (!rdata)
548 return -ENOMEM;
549
550 rmode = devm_kcalloc(&pdev->dev,
551 pdata->num_regulators, sizeof(*rmode),
552 GFP_KERNEL);
553 if (!rmode)
554 return -ENOMEM;
555
556 pdata->regulators = rdata;
557 pdata->opmode = rmode;
558 for_each_child_of_node(regulators_np, reg_np) {
559 for (i = 0; i < ARRAY_SIZE(regulators); i++)
560 if (of_node_name_eq(reg_np, regulators[i].name))
561 break;
562
563 if (i == ARRAY_SIZE(regulators)) {
564 dev_warn(iodev->dev,
565 "don't know how to configure regulator %pOFn\n",
566 reg_np);
567 continue;
568 }
569
> 570 rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
571 &pdev->dev,
572 of_fwnode_handle(reg_np),
573 "s5m8767,pmic-ext-control",
574 GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
575 "s5m8767");
576 if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
577 rdata->ext_control_gpiod = NULL;
578 else if (IS_ERR(rdata->ext_control_gpiod))
579 return PTR_ERR(rdata->ext_control_gpiod);
580
581 rdata->id = i;
582 rdata->initdata = of_get_regulator_init_data(
583 &pdev->dev, reg_np,
584 ®ulators[i]);
585 rdata->reg_node = reg_np;
586 rdata++;
587 rmode->id = i;
588 if (of_property_read_u32(reg_np, "op_mode",
589 &rmode->mode)) {
590 dev_warn(iodev->dev,
591 "no op_mode property property at %pOF\n",
592 reg_np);
593
594 rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
595 }
596 rmode++;
597 }
598
599 of_node_put(regulators_np);
600
601 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) {
602 pdata->buck2_gpiodvs = true;
603
604 if (of_property_read_u32_array(pmic_np,
605 "s5m8767,pmic-buck2-dvs-voltage",
606 pdata->buck2_voltage, dvs_voltage_nr)) {
607 dev_err(iodev->dev, "buck2 voltages not specified\n");
608 return -EINVAL;
609 }
610 }
611
612 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) {
613 pdata->buck3_gpiodvs = true;
614
615 if (of_property_read_u32_array(pmic_np,
616 "s5m8767,pmic-buck3-dvs-voltage",
617 pdata->buck3_voltage, dvs_voltage_nr)) {
618 dev_err(iodev->dev, "buck3 voltages not specified\n");
619 return -EINVAL;
620 }
621 }
622
623 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) {
624 pdata->buck4_gpiodvs = true;
625
626 if (of_property_read_u32_array(pmic_np,
627 "s5m8767,pmic-buck4-dvs-voltage",
628 pdata->buck4_voltage, dvs_voltage_nr)) {
629 dev_err(iodev->dev, "buck4 voltages not specified\n");
630 return -EINVAL;
631 }
632 }
633
634 if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
635 pdata->buck4_gpiodvs) {
636 ret = s5m8767_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
637 if (ret)
638 return -EINVAL;
639
640 if (of_property_read_u32(pmic_np,
641 "s5m8767,pmic-buck-default-dvs-idx",
642 &pdata->buck_default_idx)) {
643 pdata->buck_default_idx = 0;
644 } else {
645 if (pdata->buck_default_idx >= 8) {
646 pdata->buck_default_idx = 0;
647 dev_info(iodev->dev,
648 "invalid value for default dvs index, use 0\n");
649 }
650 }
651 }
652
653 ret = s5m8767_pmic_dt_parse_ds_gpio(iodev, pdata, pmic_np);
654 if (ret)
655 return -EINVAL;
656
657 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
658 pdata->buck2_ramp_enable = true;
659
660 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
661 pdata->buck3_ramp_enable = true;
662
663 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
664 pdata->buck4_ramp_enable = true;
665
666 if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
667 || pdata->buck4_ramp_enable) {
668 if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
669 &pdata->buck_ramp_delay))
670 pdata->buck_ramp_delay = 0;
671 }
672
673 return 0;
674 }
675 #else
676 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
677 struct sec_platform_data *pdata)
678 {
679 return 0;
680 }
681 #endif /* CONFIG_OF */
682
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53274 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
2019-10-05 6:59 ` kbuild test robot
@ 2019-10-05 6:59 ` kbuild test robot
0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2019-10-05 6:59 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: kbuild-all, Mark Brown, Linus Walleij, linux-kernel,
Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Sangbeom Kim, linux-samsung-soc
[-- Attachment #1: Type: text/plain, Size: 7557 bytes --]
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on regulator/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/regulator-switch-to-using-devm_-fwnode_gpiod_get_index/20191005-085020
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/regulator/s5m8767.c: In function 's5m8767_pmic_dt_parse_pdata':
drivers/regulator/s5m8767.c:570:30: error: implicit declaration of function 'devm_fwnode_gpiod_get'; did you mean 'devm_gpiod_get'? [-Werror=implicit-function-declaration]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^~~~~~~~~~~~~~~~~~~~~
devm_gpiod_get
>> drivers/regulator/s5m8767.c:570:28: warning: assignment to 'struct gpio_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
^
cc1: some warnings being treated as errors
vim +570 drivers/regulator/s5m8767.c
519
520 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
521 struct sec_platform_data *pdata)
522 {
523 struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
524 struct device_node *pmic_np, *regulators_np, *reg_np;
525 struct sec_regulator_data *rdata;
526 struct sec_opmode_data *rmode;
527 unsigned int i, dvs_voltage_nr = 8, ret;
528
529 pmic_np = iodev->dev->of_node;
530 if (!pmic_np) {
531 dev_err(iodev->dev, "could not find pmic sub-node\n");
532 return -ENODEV;
533 }
534
535 regulators_np = of_get_child_by_name(pmic_np, "regulators");
536 if (!regulators_np) {
537 dev_err(iodev->dev, "could not find regulators sub-node\n");
538 return -EINVAL;
539 }
540
541 /* count the number of regulators to be supported in pmic */
542 pdata->num_regulators = of_get_child_count(regulators_np);
543
544 rdata = devm_kcalloc(&pdev->dev,
545 pdata->num_regulators, sizeof(*rdata),
546 GFP_KERNEL);
547 if (!rdata)
548 return -ENOMEM;
549
550 rmode = devm_kcalloc(&pdev->dev,
551 pdata->num_regulators, sizeof(*rmode),
552 GFP_KERNEL);
553 if (!rmode)
554 return -ENOMEM;
555
556 pdata->regulators = rdata;
557 pdata->opmode = rmode;
558 for_each_child_of_node(regulators_np, reg_np) {
559 for (i = 0; i < ARRAY_SIZE(regulators); i++)
560 if (of_node_name_eq(reg_np, regulators[i].name))
561 break;
562
563 if (i == ARRAY_SIZE(regulators)) {
564 dev_warn(iodev->dev,
565 "don't know how to configure regulator %pOFn\n",
566 reg_np);
567 continue;
568 }
569
> 570 rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
571 &pdev->dev,
572 of_fwnode_handle(reg_np),
573 "s5m8767,pmic-ext-control",
574 GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
575 "s5m8767");
576 if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
577 rdata->ext_control_gpiod = NULL;
578 else if (IS_ERR(rdata->ext_control_gpiod))
579 return PTR_ERR(rdata->ext_control_gpiod);
580
581 rdata->id = i;
582 rdata->initdata = of_get_regulator_init_data(
583 &pdev->dev, reg_np,
584 ®ulators[i]);
585 rdata->reg_node = reg_np;
586 rdata++;
587 rmode->id = i;
588 if (of_property_read_u32(reg_np, "op_mode",
589 &rmode->mode)) {
590 dev_warn(iodev->dev,
591 "no op_mode property property at %pOF\n",
592 reg_np);
593
594 rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
595 }
596 rmode++;
597 }
598
599 of_node_put(regulators_np);
600
601 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-uses-gpio-dvs", NULL)) {
602 pdata->buck2_gpiodvs = true;
603
604 if (of_property_read_u32_array(pmic_np,
605 "s5m8767,pmic-buck2-dvs-voltage",
606 pdata->buck2_voltage, dvs_voltage_nr)) {
607 dev_err(iodev->dev, "buck2 voltages not specified\n");
608 return -EINVAL;
609 }
610 }
611
612 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-uses-gpio-dvs", NULL)) {
613 pdata->buck3_gpiodvs = true;
614
615 if (of_property_read_u32_array(pmic_np,
616 "s5m8767,pmic-buck3-dvs-voltage",
617 pdata->buck3_voltage, dvs_voltage_nr)) {
618 dev_err(iodev->dev, "buck3 voltages not specified\n");
619 return -EINVAL;
620 }
621 }
622
623 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-uses-gpio-dvs", NULL)) {
624 pdata->buck4_gpiodvs = true;
625
626 if (of_property_read_u32_array(pmic_np,
627 "s5m8767,pmic-buck4-dvs-voltage",
628 pdata->buck4_voltage, dvs_voltage_nr)) {
629 dev_err(iodev->dev, "buck4 voltages not specified\n");
630 return -EINVAL;
631 }
632 }
633
634 if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
635 pdata->buck4_gpiodvs) {
636 ret = s5m8767_pmic_dt_parse_dvs_gpio(iodev, pdata, pmic_np);
637 if (ret)
638 return -EINVAL;
639
640 if (of_property_read_u32(pmic_np,
641 "s5m8767,pmic-buck-default-dvs-idx",
642 &pdata->buck_default_idx)) {
643 pdata->buck_default_idx = 0;
644 } else {
645 if (pdata->buck_default_idx >= 8) {
646 pdata->buck_default_idx = 0;
647 dev_info(iodev->dev,
648 "invalid value for default dvs index, use 0\n");
649 }
650 }
651 }
652
653 ret = s5m8767_pmic_dt_parse_ds_gpio(iodev, pdata, pmic_np);
654 if (ret)
655 return -EINVAL;
656
657 if (of_get_property(pmic_np, "s5m8767,pmic-buck2-ramp-enable", NULL))
658 pdata->buck2_ramp_enable = true;
659
660 if (of_get_property(pmic_np, "s5m8767,pmic-buck3-ramp-enable", NULL))
661 pdata->buck3_ramp_enable = true;
662
663 if (of_get_property(pmic_np, "s5m8767,pmic-buck4-ramp-enable", NULL))
664 pdata->buck4_ramp_enable = true;
665
666 if (pdata->buck2_ramp_enable || pdata->buck3_ramp_enable
667 || pdata->buck4_ramp_enable) {
668 if (of_property_read_u32(pmic_np, "s5m8767,pmic-buck-ramp-delay",
669 &pdata->buck_ramp_delay))
670 pdata->buck_ramp_delay = 0;
671 }
672
673 return 0;
674 }
675 #else
676 static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
677 struct sec_platform_data *pdata)
678 {
679 return 0;
680 }
681 #endif /* CONFIG_OF */
682
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53274 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index
2019-10-04 23:10 [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Dmitry Torokhov
` (2 preceding siblings ...)
2019-10-04 23:10 ` [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
@ 2019-10-05 19:01 ` Linus Walleij
2019-10-05 19:01 ` Linus Walleij
3 siblings, 1 reply; 16+ messages in thread
From: Linus Walleij @ 2019-10-05 19:01 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Mark Brown, linux-kernel@vger.kernel.org,
Bartlomiej Zolnierkiewicz, Chanwoo Choi, Krzysztof Kozlowski,
Liam Girdwood, Sangbeom Kim, Support Opensource,
linux-samsung-soc
On Sat, Oct 5, 2019 at 1:10 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> This series swiches regulator drivers form using
> [devm_]gpiod_get_from_of_node() that is scheduled to be removed in favor
> of [devm_]fwnode_gpiod_get_index() that behaves more like standard
> [devm_]gpiod_get_index() and will potentially handle secondary software
> nodes in cases we need to augment platform firmware.
The series:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Too bad with the build robots being unable to parse the
pull deps. Now they hammer out complaints.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index
2019-10-05 19:01 ` [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Linus Walleij
@ 2019-10-05 19:01 ` Linus Walleij
0 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2019-10-05 19:01 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Mark Brown, linux-kernel@vger.kernel.org,
Bartlomiej Zolnierkiewicz, Chanwoo Choi, Krzysztof Kozlowski,
Liam Girdwood, Sangbeom Kim, Support Opensource,
linux-samsung-soc
On Sat, Oct 5, 2019 at 1:10 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> This series swiches regulator drivers form using
> [devm_]gpiod_get_from_of_node() that is scheduled to be removed in favor
> of [devm_]fwnode_gpiod_get_index() that behaves more like standard
> [devm_]gpiod_get_index() and will potentially handle secondary software
> nodes in cases we need to augment platform firmware.
The series:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Too bad with the build robots being unable to parse the
pull deps. Now they hammer out complaints.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 16+ messages in thread
* Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree
2019-10-04 23:10 ` [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
@ 2019-10-07 13:03 ` Mark Brown
2019-10-07 13:03 ` Mark Brown
1 sibling, 1 reply; 16+ messages in thread
From: Mark Brown @ 2019-10-07 13:03 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Linus Walleij, linux-kernel, linux-samsung-soc, Mark Brown,
Sangbeom Kim
The patch
regulator: s2mps11: switch to using devm_fwnode_gpiod_get
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.5
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From de2792b507675641885075bc99e283de861b1ce6 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Fri, 4 Oct 2019 16:10:14 -0700
Subject: [PATCH] regulator: s2mps11: switch to using devm_fwnode_gpiod_get
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20191004231017.130290-5-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/regulator/s2mps11.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 5bc00884cf51..4f2dc5ebffdc 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -844,10 +844,9 @@ static void s2mps14_pmic_dt_parse_ext_control_gpio(struct platform_device *pdev,
if (!rdata[reg].init_data || !rdata[reg].of_node)
continue;
- gpio[reg] = devm_gpiod_get_from_of_node(&pdev->dev,
- rdata[reg].of_node,
- "samsung,ext-control-gpios",
- 0,
+ gpio[reg] = devm_fwnode_gpiod_get(&pdev->dev,
+ of_fwnode_handle(rdata[reg].of_node),
+ "samsung,ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s2mps11-regulator");
if (PTR_ERR(gpio[reg]) == -ENOENT)
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree
2019-10-07 13:03 ` Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
@ 2019-10-07 13:03 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2019-10-07 13:03 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Linus Walleij, linux-kernel, linux-samsung-soc, Mark Brown,
Sangbeom Kim
The patch
regulator: s2mps11: switch to using devm_fwnode_gpiod_get
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.5
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From de2792b507675641885075bc99e283de861b1ce6 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Fri, 4 Oct 2019 16:10:14 -0700
Subject: [PATCH] regulator: s2mps11: switch to using devm_fwnode_gpiod_get
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20191004231017.130290-5-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/regulator/s2mps11.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 5bc00884cf51..4f2dc5ebffdc 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -844,10 +844,9 @@ static void s2mps14_pmic_dt_parse_ext_control_gpio(struct platform_device *pdev,
if (!rdata[reg].init_data || !rdata[reg].of_node)
continue;
- gpio[reg] = devm_gpiod_get_from_of_node(&pdev->dev,
- rdata[reg].of_node,
- "samsung,ext-control-gpios",
- 0,
+ gpio[reg] = devm_fwnode_gpiod_get(&pdev->dev,
+ of_fwnode_handle(rdata[reg].of_node),
+ "samsung,ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s2mps11-regulator");
if (PTR_ERR(gpio[reg]) == -ENOENT)
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
` (2 preceding siblings ...)
2019-10-05 6:59 ` kbuild test robot
@ 2019-10-07 13:03 ` Mark Brown
2019-10-07 13:03 ` Mark Brown
3 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2019-10-07 13:03 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Linus Walleij, linux-kernel, linux-samsung-soc, Mark Brown,
Sangbeom Kim
The patch
regulator: s5m8767: switch to using devm_fwnode_gpiod_get
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 5be0e549e18f8ad7efa81b3e054ca094b7782f55 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Fri, 4 Oct 2019 16:10:11 -0700
Subject: [PATCH] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20191004231017.130290-2-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/regulator/s5m8767.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 6ca27e9d5ef7..bdc07739e9a2 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -567,11 +567,10 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
continue;
}
- rdata->ext_control_gpiod = devm_gpiod_get_from_of_node(
+ rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
&pdev->dev,
- reg_np,
- "s5m8767,pmic-ext-control-gpios",
- 0,
+ of_fwnode_handle(reg_np),
+ "s5m8767,pmic-ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s5m8767");
if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree
2019-10-07 13:03 ` Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
@ 2019-10-07 13:03 ` Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2019-10-07 13:03 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski, Liam Girdwood,
Linus Walleij, linux-kernel, linux-samsung-soc, Mark Brown,
Sangbeom Kim
The patch
regulator: s5m8767: switch to using devm_fwnode_gpiod_get
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From 5be0e549e18f8ad7efa81b3e054ca094b7782f55 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Fri, 4 Oct 2019 16:10:11 -0700
Subject: [PATCH] regulator: s5m8767: switch to using devm_fwnode_gpiod_get
devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.
Let's switch this driver over.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20191004231017.130290-2-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/regulator/s5m8767.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 6ca27e9d5ef7..bdc07739e9a2 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -567,11 +567,10 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
continue;
}
- rdata->ext_control_gpiod = devm_gpiod_get_from_of_node(
+ rdata->ext_control_gpiod = devm_fwnode_gpiod_get(
&pdev->dev,
- reg_np,
- "s5m8767,pmic-ext-control-gpios",
- 0,
+ of_fwnode_handle(reg_np),
+ "s5m8767,pmic-ext-control",
GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"s5m8767");
if (PTR_ERR(rdata->ext_control_gpiod) == -ENOENT)
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-10-07 13:04 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-04 23:10 [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
2019-10-04 23:10 ` [PATCH 1/7] regulator: s5m8767: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
2019-10-05 6:42 ` kbuild test robot
2019-10-05 6:42 ` kbuild test robot
2019-10-05 6:59 ` kbuild test robot
2019-10-05 6:59 ` kbuild test robot
2019-10-07 13:03 ` Applied "regulator: s5m8767: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-07 13:03 ` Mark Brown
2019-10-04 23:10 ` [PATCH 4/7] regulator: s2mps11: switch to using devm_fwnode_gpiod_get Dmitry Torokhov
2019-10-04 23:10 ` Dmitry Torokhov
2019-10-07 13:03 ` Applied "regulator: s2mps11: switch to using devm_fwnode_gpiod_get" to the regulator tree Mark Brown
2019-10-07 13:03 ` Mark Brown
2019-10-05 19:01 ` [PATCH 0/7] regulator: switch to using [devm_]fwnode_gpiod_get_index Linus Walleij
2019-10-05 19:01 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox