Re: [PATCH v2 03/18] gpiolib: make cdev a build option
From: Kent Gibson
Date: Mon Jul 27 2020 - 01:57:42 EST
On Mon, Jul 27, 2020 at 09:46:01AM +0800, Kent Gibson wrote:
> On Mon, Jul 27, 2020 at 12:25:53AM +0200, Linus Walleij wrote:
> > On Sat, Jul 25, 2020 at 6:21 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> > > +config GPIO_CDEV
> > > + bool "/dev/gpiochipN (character device interface)"
> > > + default y
> > I don't want to make it too easy to do this, as I see it as a standard
> > kernel feature.
> > Can we add:
> > depends on EXPERT
> > as with other standard kernel features?
> Fair enough.
> But what of the GPIO_CDEV_V1 option to disable uAPI V1 added in patch 04,
> and that depends on GPIO_CDEV?
> That is equivalent to GPIO_SYSFS, which is not dependent on EXPERT,
> so I'll need to restructure the dependencies so it doesn't
> inherit the EXPERT dependency.
> Unless you also want it to be dependent on EXPERT.
I've gone with this:
+ prompt "Character device (/dev/gpiochipN) support" if EXPERT
+ default y
so the entry is always present in menuconfig, and GPIO_CDEV_V1 can still
depend on it, but GPIO_CDEV can only be disabled if EXPERT is set.
> Hmmm, and maybe patch 04 should be later in the series - after V2 is
> fully implemented and V1 is deprecated - around patch 11.
Just ignore me - the earlier code patches need the define else the V1
will be compiled out.