mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Jeffy Chen <jeffy.chen@rock-chips.com>
Subject: Re: [PATCH] mfd: syscon: Fix syscon name for device tree
Date: Mon, 7 Jan 2019 16:15:43 -0800	[thread overview]
Message-ID: <20190108001543.GJ5544@atomide.com> (raw)
In-Reply-To: <20190108000558.54914-1-tony@atomide.com>

* Tony Lindgren <tony@atomide.com> [190108 00:06]:
> I'm now seeing the following error on omap5 during boot:
> 
> (NULL device *): Failed to create dummy-scm_conf@0 debugfs directory
> 
> This is because we have two separate scm_conf syscon regions in the
> dts. Let's fix the issue by setting a proper name if syscon is
> configured via device tree.
> 
> See also related fix for commit 500f9ff518cf ("mfd: syscon: Set name
> of regmap_config").
> 
> Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/mfd/syscon.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -241,6 +241,8 @@ static int syscon_probe(struct platform_device *pdev)
>  	syscon_config.max_register = res->end - res->start - 3;
>  	if (pdata)
>  		syscon_config.name = pdata->label;
> +	else
> +		syscon_config.name = dev_name(dev);
>  	syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config);
>  	if (IS_ERR(syscon->regmap)) {
>  		dev_err(dev, "regmap init failed\n");

Hmm this fixes the error, but I'm still seeing only one
entry for /sys/kernel/debug/regmap/dummy-scm_conf@0.

Anybody got better ideas for setting the default name,
maybe dev->of_node->name if it exists?

Regards,

Tony

  reply	other threads:[~2019-01-08  0:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08  0:05 Tony Lindgren
2019-01-08  0:15 ` Tony Lindgren [this message]
2019-01-08  3:16   ` JeffyChen
2019-01-08 15:38     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190108001543.GJ5544@atomide.com \
    --to=tony@atomide.com \
    --cc=jeffy.chen@rock-chips.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome