lkml.org 
[lkml]   [2022]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/3] Documentation: gpio: Add a section on what to return in ->get() callback
On Wed, Nov 30, 2022 at 05:14:38PM +0100, Hans de Goede wrote:
> On 11/30/22 17:12, Hans de Goede wrote:
> > On 11/30/22 16:55, Andy Shevchenko wrote:

...

> > IHMO the rules for get() should simply be:
> >
> > 1. Device has an input buffer:
> > Return input-buffer value for the pin.
> >
> > 2. Devices does not have an input buffer:
> > Return last set output-buffer value
>
> Quick correction device should be pin here, because it
> if there is an input buffer or not can differ per pin.
> So IHMO the rules for get() should simply be:
>
> 1. pin has an input buffer:
> return input-buffer value for the pin.
>
> 2. pin does not have an input buffer:
> return the value last set for the pin's output-buffer

"pin" misleads here. The "pin" can be in native function which may have not be
even connected to GPIO buffers. There are different hardware topologies.

So, no, not a "pin".

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-11-30 17:24    [W:0.045 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site