lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v9 07/20] gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL
On Wed, Sep 23, 2020 at 1:12 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>

[snip!]

>
> > + /* Bias requires explicit direction. */
> > + if ((flags & GPIO_V2_LINE_BIAS_FLAGS) &&
> > + !(flags & GPIO_V2_LINE_DIRECTION_FLAGS))
> > + return -EINVAL;
>
> Okay, since this is strict we probably may relax it in the future if
> it will be a use case.
> ...
>
> > + /* Only one bias flag can be set. */
>
> Ditto. (Some controllers allow to set both simultaneously, though I
> can't imagine good use case for that)
>

This is an abstraction layer. Only because some controllers allow
this, doesn't mean we should reflect this in our abstraction layer -
especially if we know well that this has no purpose.

Bartosz

\
 
 \ /
  Last update: 2020-09-24 16:30    [W:0.188 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site