mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH] media: cec: meson: ao-cec-g12a: name the CEC core regmap to avoid debugfs clash
@ 2026-05-29  6:00 Yi Ding
  2026-05-29  7:31 ` Neil Armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Ding @ 2026-05-29  6:00 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab
  Cc: Kevin Hilman, Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-amlogic, linux-arm-kernel, linux-kernel, Yi Ding

The driver registers two regmaps on the same platform device: an MMIO
regmap for the AO CEC registers, and an indirect regmap (using
reg_read()/reg_write() callbacks) for the CEC controller core registers.
Neither regmap_config sets a .name, so both default their debugfs
directory to the device name and collide:

  debugfs: 'ff800280.cec' already exists in 'regmap'

Because of the clash the second regmap's debugfs directory fails to
register, so its registers can no longer be inspected via debugfs.

Give the indirect CEC core regmap a distinct name. The two debugfs
directories then become "<dev>.cec" and "<dev>.cec-core". This only
affects debugfs naming; register access is unchanged.

Tested on an ODROID-N2 (Amlogic S922X): the warning is gone and both
/sys/kernel/debug/regmap/ff800280.cec and ff800280.cec-core are present.

Fixes: b7778c46683c ("media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver")
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Yi Ding <yi.s.ding@gmail.com>
---
 drivers/media/cec/platform/meson/ao-cec-g12a.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c
index 41f5b8669..2c914f000 100644
--- a/drivers/media/cec/platform/meson/ao-cec-g12a.c
+++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c
@@ -405,6 +405,7 @@ static int meson_ao_cec_g12a_write(void *context, unsigned int addr,
 }
 
 static const struct regmap_config meson_ao_cec_g12a_cec_regmap_conf = {
+	.name = "core",
 	.reg_bits = 8,
 	.val_bits = 8,
 	.reg_read = meson_ao_cec_g12a_read,
-- 
2.47.3


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: cec: meson: ao-cec-g12a: name the CEC core regmap to avoid debugfs clash
  2026-05-29  6:00 [PATCH] media: cec: meson: ao-cec-g12a: name the CEC core regmap to avoid debugfs clash Yi Ding
@ 2026-05-29  7:31 ` Neil Armstrong
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Armstrong @ 2026-05-29  7:31 UTC (permalink / raw)
  To: Yi Ding, Hans Verkuil, Mauro Carvalho Chehab
  Cc: Kevin Hilman, Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-amlogic, linux-arm-kernel, linux-kernel

On 5/29/26 08:00, Yi Ding wrote:
> The driver registers two regmaps on the same platform device: an MMIO
> regmap for the AO CEC registers, and an indirect regmap (using
> reg_read()/reg_write() callbacks) for the CEC controller core registers.
> Neither regmap_config sets a .name, so both default their debugfs
> directory to the device name and collide:
> 
>    debugfs: 'ff800280.cec' already exists in 'regmap'
> 
> Because of the clash the second regmap's debugfs directory fails to
> register, so its registers can no longer be inspected via debugfs.
> 
> Give the indirect CEC core regmap a distinct name. The two debugfs
> directories then become "<dev>.cec" and "<dev>.cec-core". This only
> affects debugfs naming; register access is unchanged.
> 
> Tested on an ODROID-N2 (Amlogic S922X): the warning is gone and both
> /sys/kernel/debug/regmap/ff800280.cec and ff800280.cec-core are present.
> 
> Fixes: b7778c46683c ("media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver")
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Yi Ding <yi.s.ding@gmail.com>
> ---
>   drivers/media/cec/platform/meson/ao-cec-g12a.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c
> index 41f5b8669..2c914f000 100644
> --- a/drivers/media/cec/platform/meson/ao-cec-g12a.c
> +++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c
> @@ -405,6 +405,7 @@ static int meson_ao_cec_g12a_write(void *context, unsigned int addr,
>   }
>   
>   static const struct regmap_config meson_ao_cec_g12a_cec_regmap_conf = {
> +	.name = "core",
>   	.reg_bits = 8,
>   	.val_bits = 8,
>   	.reg_read = meson_ao_cec_g12a_read,

Good catch


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-29  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-29  6:00 [PATCH] media: cec: meson: ao-cec-g12a: name the CEC core regmap to avoid debugfs clash Yi Ding
2026-05-29  7:31 ` Neil Armstrong

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