Message ID | 20250125125320.37285-6-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Kieran Bingham |
Headers | show |
Series | drm/bridge: Use per-client debugfs entry | expand |
Hi Wolfram, On Sat, 25 Jan 2025 at 13:53, Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > The I2C core now offers a debugfs-directory per client. Use it and > remove the custom handling. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Thanks for your patch! I gave it a try on Gray Hawk Single. Old location: /sys/kernel/debug/1-002c `-- status New location: /sys/kernel/debug/i2c/i2c-1/1-002c `-- status Contents of the status file without a display connected: STATUS REGISTERS: [0xf0] = 0x00000000 [0xf1] = 0x0000000b [0xf2] = 0x00000000 [0xf3] = 0x00000000 [0xf4] = 0x00000009 [0xf5] = 0x00000020 [0xf6] = 0x00000000 [0xf7] = 0x00000000 [0xf8] = 0x00000002 Contents of the status file with a 1920x1080 display connected: STATUS REGISTERS: [0xf0] = 0x00000000 [0xf1] = 0x00000000 [0xf2] = 0x00000000 [0xf3] = 0x00000000 [0xf4] = 0x00000001 [0xf5] = 0x00000000 [0xf6] = 0x00000002 [0xf7] = 0x00000000 [0xf8] = 0x00000001 Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
> I gave it a try on Gray Hawk Single.
Oh, we have such a board? Nice! That would help a lot.
Hi Wolfram, On Tue, 28 Jan 2025 at 11:05, Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > > I gave it a try on Gray Hawk Single. > > Oh, we have such a board? Nice! That would help a lot. We have several! ;-) $ git grep ti,sn65dsi86 -- arch/*/boot/dts/renesas arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi: compatible = "ti,sn65dsi86"; arch/arm64/boot/dts/renesas/r8a779g0-white-hawk.dts: compatible = "ti,sn65dsi86"; arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts: compatible = "ti,sn65dsi86"; arch/arm64/boot/dts/renesas/white-hawk-cpu-common.dtsi: compatible = "ti,sn65dsi86"; Gr{oetje,eeting}s, Geert
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index e4d9006b59f1..57a3f592c057 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -427,33 +427,6 @@ static int status_show(struct seq_file *s, void *data) DEFINE_SHOW_ATTRIBUTE(status); -static void ti_sn65dsi86_debugfs_remove(void *data) -{ - debugfs_remove_recursive(data); -} - -static void ti_sn65dsi86_debugfs_init(struct ti_sn65dsi86 *pdata) -{ - struct device *dev = pdata->dev; - struct dentry *debugfs; - int ret; - - debugfs = debugfs_create_dir(dev_name(dev), NULL); - - /* - * We might get an error back if debugfs wasn't enabled in the kernel - * so let's just silently return upon failure. - */ - if (IS_ERR_OR_NULL(debugfs)) - return; - - ret = devm_add_action_or_reset(dev, ti_sn65dsi86_debugfs_remove, debugfs); - if (ret) - return; - - debugfs_create_file("status", 0600, debugfs, pdata, &status_fops); -} - /* ----------------------------------------------------------------------------- * Auxiliary Devices (*not* AUX) */ @@ -1936,7 +1909,7 @@ static int ti_sn65dsi86_probe(struct i2c_client *client) if (ret) return ret; - ti_sn65dsi86_debugfs_init(pdata); + debugfs_create_file("status", 0600, client->debugfs, pdata, &status_fops); /* * Break ourselves up into a collection of aux devices. The only real
The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 29 +-------------------------- 1 file changed, 1 insertion(+), 28 deletions(-)