Message ID | 20190706203105.7810-1-robdclark@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | drm/bridge: ti-sn65dsi86: use dev name for debugfs | expand |
On Sat 06 Jul 13:31 PDT 2019, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > This should be more future-proof if we ever encounter a device with two > of these bridges. > > Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > index c8fb45e7b06d..9f4ff88d4a10 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -204,7 +204,7 @@ DEFINE_SHOW_ATTRIBUTE(status); > > static void ti_sn_debugfs_init(struct ti_sn_bridge *pdata) > { > - pdata->debugfs = debugfs_create_dir("ti_sn65dsi86", NULL); > + pdata->debugfs = debugfs_create_dir(dev_name(pdata->dev), NULL); > > debugfs_create_file("status", 0600, pdata->debugfs, pdata, > &status_fops); > -- > 2.20.1 >
Hi Rob, Thank you for the patch. On Sat, Jul 06, 2019 at 01:31:02PM -0700, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > This should be more future-proof if we ever encounter a device with two > of these bridges. > > Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Rob Clark <robdclark@chromium.org> > --- > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > index c8fb45e7b06d..9f4ff88d4a10 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -204,7 +204,7 @@ DEFINE_SHOW_ATTRIBUTE(status); > > static void ti_sn_debugfs_init(struct ti_sn_bridge *pdata) > { > - pdata->debugfs = debugfs_create_dir("ti_sn65dsi86", NULL); > + pdata->debugfs = debugfs_create_dir(dev_name(pdata->dev), NULL); That should work, but won't it become quite confusing for users ? I wonder if the directory name shouldn't be prefixed with the driver name. Something like "ti_sn65dsi86:%s", dev_name(pdata->dev). > debugfs_create_file("status", 0600, pdata->debugfs, pdata, > &status_fops);
On Thu, Jul 11, 2019 at 9:49 AM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > > Hi Rob, > > Thank you for the patch. > > On Sat, Jul 06, 2019 at 01:31:02PM -0700, Rob Clark wrote: > > From: Rob Clark <robdclark@chromium.org> > > > > This should be more future-proof if we ever encounter a device with two > > of these bridges. > > > > Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > Signed-off-by: Rob Clark <robdclark@chromium.org> > > --- > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > > index c8fb45e7b06d..9f4ff88d4a10 100644 > > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > > @@ -204,7 +204,7 @@ DEFINE_SHOW_ATTRIBUTE(status); > > > > static void ti_sn_debugfs_init(struct ti_sn_bridge *pdata) > > { > > - pdata->debugfs = debugfs_create_dir("ti_sn65dsi86", NULL); > > + pdata->debugfs = debugfs_create_dir(dev_name(pdata->dev), NULL); > > That should work, but won't it become quite confusing for users ? I > wonder if the directory name shouldn't be prefixed with the driver name. > Something like "ti_sn65dsi86:%s", dev_name(pdata->dev). *maybe*, if they are badly named in dt? In the end the target audience is really to help developers and people bringing up a new board, so maybe my way encourages them to use sensible names in dt ;-) BR, -R > > > debugfs_create_file("status", 0600, pdata->debugfs, pdata, > > &status_fops); > > -- > Regards, > > Laurent Pinchart
On 06.07.2019 22:31, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > This should be more future-proof if we ever encounter a device with two > of these bridges. > > Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Rob Clark <robdclark@chromium.org> Queued to drm-misc-next. Regards Andrzej
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index c8fb45e7b06d..9f4ff88d4a10 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -204,7 +204,7 @@ DEFINE_SHOW_ATTRIBUTE(status); static void ti_sn_debugfs_init(struct ti_sn_bridge *pdata) { - pdata->debugfs = debugfs_create_dir("ti_sn65dsi86", NULL); + pdata->debugfs = debugfs_create_dir(dev_name(pdata->dev), NULL); debugfs_create_file("status", 0600, pdata->debugfs, pdata, &status_fops);