lkml.org 
[lkml]   [2020]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/18] gpiolib: cdev: support GPIO_GET_LINE_IOCTL and GPIOLINE_GET_VALUES_IOCTL
On Sun, Aug 02, 2020 at 11:31:58AM +0800, Kent Gibson wrote:
> On Fri, Jul 31, 2020 at 06:05:10PM +0200, Bartosz Golaszewski wrote:
> > On Sun, Jul 26, 2020 at 3:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> > >
> >
> > > >
> > > > > + dev_dbg(&gdev->dev, "registered chardev handle for line %d\n",
> > > > > + offset);
> > > >
> > > > Perhaps tracepoint / event?
> > > >
> > >
> > > Again, a cut-and-paste from V1, and I have no experience with
> > > tracepoints or events, so I have no opinion on that.
> > >
> > > So, yeah - perhaps?
> > >
> >
> > I think it's a good idea to add some proper instrumentation this time
> > other than much less reliable logs. Can you take a look at
> > include/trace/events/gpio.h? Adding new GPIO trace events should be
> > pretty straightforward by copy-pasti... drawing inspiration from
> > existing ones.
> >
>
> You only want tracepoints to replace those dev_dbg()s, so when a line
> is requested? What about the release? Any other points?
>

Had a closer look and it seems to me that the correct place to add such
tracepoints would be gpiod_request() and gpiod_free(), so they catch all
requests, not just the cdev ones. And that moves it outside the scope
of this patch.

I personally don't have any use for the dev_dbg()s here and am happy to
remove them - they were only there to match the behaviour of
linehandle_create as closely as possible.

Cheers,
Kent.

\
 
 \ /
  Last update: 2020-08-02 11:34    [W:0.178 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site