diff options
| author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2019-12-05 15:37:05 +0000 |
|---|---|---|
| committer | Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> | 2020-10-16 12:42:11 +0100 |
| commit | 4c58ea4fc47b843a848d2a4456dc4ec9d52d3cff (patch) | |
| tree | c2e1de5cfc181a16fb0519670576c69d7196518b | |
| parent | 9363a09064fa32c8492c31bb286a3f118074a4db (diff) | |
| download | rcar-4c58ea4fc47b843a848d2a4456dc4ec9d52d3cff.tar.gz | |
DNI: Regulator: Debug
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
| -rw-r--r-- | drivers/regulator/core.c | 7 | ||||
| -rw-r--r-- | drivers/regulator/gpio-regulator.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 7ff507ec875a8..f508e4a50a6a6 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1747,6 +1747,8 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev, if (r) return r; + dev_err(dev, "1728 regulator_dev_lookup: We have a node, but there is no device"); + /* * We have a node, but there is no device. * assume it has not registered yet. @@ -1886,8 +1888,11 @@ struct regulator *_regulator_get(struct device *dev, const char *id, * If regulator_dev_lookup() fails with error other * than -ENODEV our job here is done, we simply return it. */ - if (ret != -ENODEV) + if (ret != -ENODEV) { + dev_warn(dev, + "__regulator_get returning %d\n", ret); return ERR_PTR(ret); + } if (!have_full_constraints()) { dev_warn(dev, diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 5927d4f3eabd7..ce2fe14cafc53 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -247,10 +247,15 @@ static int gpio_regulator_probe(struct platform_device *pdev) if (np) { config = of_get_gpio_regulator_config(dev, np, &drvdata->desc); - if (IS_ERR(config)) + + if (IS_ERR(config)) { + dev_err(dev, "OF_GET_GPIO_REGULATOR_CONFIG %d\n", PTR_ERR(config)); return PTR_ERR(config); + } } + dev_err(dev, "Probing GPIO Regulator\n"); + drvdata->desc.name = devm_kstrdup(dev, config->supply_name, GFP_KERNEL); if (drvdata->desc.name == NULL) { dev_err(dev, "Failed to allocate supply name\n"); @@ -261,6 +266,7 @@ static int gpio_regulator_probe(struct platform_device *pdev) GFP_KERNEL); if (!drvdata->gpiods) return -ENOMEM; + for (i = 0; i < config->ngpios; i++) { drvdata->gpiods[i] = devm_gpiod_get_index(dev, NULL, |
