After 9b947a13e7f6 ("regmap: use debugfs even when no device"), we are
allowing regmap to create debugfs without a valid device. Some of them
would end up using "dummy*" as debugfs name.
This series try to set names in some regmap_config to avoid that.
Changes in v3:
Modify commit message.
Jeffy Chen (4):
mfd: syscon: Set name of regmap_config
rtc: at91sam9: Pass pdev->dev to regmap_init_mmio()
clk: lpc32xx: Set name of regmap_config
ARM: rockchip: Set name of regmap_config
arch/arm/mach-rockchip/platsmp.c | 1 +
drivers/clk/nxp/clk-lpc32xx.c | 1 +
drivers/mfd/syscon.c | 1 +
drivers/rtc/rtc-at91sam9.c | 2 +-
4 files changed, 4 insertions(+), 1 deletion(-)
--
2.11.0
We are now allowing to register debugfs without a valid device, and not
having a valid name will end up using "dummy*" to create debugfs dir.
Signed-off-by: Jeffy Chen <[email protected]>
---
Changes in v3: None
drivers/clk/nxp/clk-lpc32xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/nxp/clk-lpc32xx.c b/drivers/clk/nxp/clk-lpc32xx.c
index f5d815f577e0..a2a0a7f3bc57 100644
--- a/drivers/clk/nxp/clk-lpc32xx.c
+++ b/drivers/clk/nxp/clk-lpc32xx.c
@@ -67,6 +67,7 @@
#define LPC32XX_USB_CLK_STS 0xF8
static struct regmap_config lpc32xx_scb_regmap_config = {
+ .name = "lpc32xx-scb",
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
--
2.11.0
Otherwise it would use "dummy*" to create regmap debugfs dir.
Signed-off-by: Jeffy Chen <[email protected]>
---
Changes in v3: None
drivers/rtc/rtc-at91sam9.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 7418a763ce52..0d6a17a77841 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -402,7 +402,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
if (IS_ERR(gpbr))
return PTR_ERR(gpbr);
- rtc->gpbr = regmap_init_mmio(NULL, gpbr,
+ rtc->gpbr = regmap_init_mmio(&pdev->dev, gpbr,
&gpbr_regmap_config);
} else {
struct of_phandle_args args;
--
2.11.0
We are now allowing to register debugfs without a valid device, and not
having a valid name will end up using "dummy*" to create debugfs dir.
Signed-off-by: Jeffy Chen <[email protected]>
---
Changes in v3:
Modify commit message.
drivers/mfd/syscon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index fc9ba0ea4e44..b6d05cd934e6 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -110,6 +110,7 @@ static struct syscon *of_syscon_register(struct device_node *np)
syscon_config.reg_stride = reg_io_width;
syscon_config.val_bits = reg_io_width * 8;
syscon_config.max_register = resource_size(&res) - reg_io_width;
+ syscon_config.name = of_node_full_name(np);
regmap = regmap_init_mmio(NULL, base, &syscon_config);
if (IS_ERR(regmap)) {
--
2.11.0
We are now allowing to register debugfs without a valid device, and not
having a valid name will end up using "dummy*" to create debugfs dir.
Signed-off-by: Jeffy Chen <[email protected]>
---
Changes in v3: None
arch/arm/mach-rockchip/platsmp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index ecec340ca345..51984a40b097 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -208,6 +208,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
}
static const struct regmap_config rockchip_pmu_regmap_config = {
+ .name = "rockchip-pmu",
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
--
2.11.0
On 08/03/2018 at 18:21:52 +0800, Jeffy Chen wrote:
> Otherwise it would use "dummy*" to create regmap debugfs dir.
>
> Signed-off-by: Jeffy Chen <[email protected]>
> ---
>
> Changes in v3: None
>
> drivers/rtc/rtc-at91sam9.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
> index 7418a763ce52..0d6a17a77841 100644
> --- a/drivers/rtc/rtc-at91sam9.c
> +++ b/drivers/rtc/rtc-at91sam9.c
> @@ -402,7 +402,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
> if (IS_ERR(gpbr))
> return PTR_ERR(gpbr);
>
> - rtc->gpbr = regmap_init_mmio(NULL, gpbr,
> + rtc->gpbr = regmap_init_mmio(&pdev->dev, gpbr,
> &gpbr_regmap_config);
This would be misleading as the gpbr is not directly related to the rtc.
--
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Hi Alexandre,
On 03/09/2018 04:49 AM, Alexandre Belloni wrote:
> On 08/03/2018 at 18:21:52 +0800, Jeffy Chen wrote:
>> Otherwise it would use "dummy*" to create regmap debugfs dir.
>>
>> Signed-off-by: Jeffy Chen <[email protected]>
>> ---
>>
>> Changes in v3: None
>>
>> drivers/rtc/rtc-at91sam9.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
>> index 7418a763ce52..0d6a17a77841 100644
>> --- a/drivers/rtc/rtc-at91sam9.c
>> +++ b/drivers/rtc/rtc-at91sam9.c
>> @@ -402,7 +402,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
>> if (IS_ERR(gpbr))
>> return PTR_ERR(gpbr);
>>
>> - rtc->gpbr = regmap_init_mmio(NULL, gpbr,
>> + rtc->gpbr = regmap_init_mmio(&pdev->dev, gpbr,
>> &gpbr_regmap_config);
>
> This would be misleading as the gpbr is not directly related to the rtc.
ok, will fix that, thanks.
>