Re: [PATCH v2] ARM: dts: am335x-pocketbeagle: set default mux for gpio pins
From: Tony Lindgren
Date: Wed Jul 01 2020 - 10:48:51 EST
* Drew Fustini <drew@xxxxxxxxxxxxxxx> [200630 21:43]:
> On Tue, Jun 30, 2020 at 02:34:23PM -0700, Tony Lindgren wrote:
> > * Drew Fustini <drew@xxxxxxxxxxxxxxx> [200630 21:32]:
> > > On Tue, Jun 30, 2020 at 11:20:37AM -0700, Tony Lindgren wrote:
> > ...
> > > > > > Needing to change the dts does not sound good to me.. But maybe you mean
> > > > > > this is needed until the gpio-omap and pinctrl-single patches are merged?
> > > > >
> > > > > I agree that I would like for userspace to be able to do run-time
> > > > > changes. However, I think something would need to be added to the
> > > > > pinconf support in pinctrl-single for that to be possible. There are
> > > > > bias properties but non for receiver enable.
> > > > >
> > > > > Does it seem sensible to add that?
> > > >
> > > > Well let's see with Linus W says. To me it seems this might be a good
> > > > reason to allow a sysfs interface to change the pinctrl if we don't
> > > > have it yet? With the proper gpio line naming it should be quite simple
> > > > to use too :)
> > >
> > > I think if pinctrl-single allowed mux to be set through debugfs that
> > > could be one solution to the use case of users prototyping with a
> > > beaglebone. Maybe that could be acceptable?
> >
> > I think this should not depend on debugfs though, it should be a
> > generic interface.
>
> Ok, thanks. I'm trying to imagine a solution as there no existing
> pinctrl uAPI. gpiod uAPI has gained some pinctrl functionality with
> the work that Kent Gibson has been doing beyond just bias flags.
OK. Yeah sounds like in this case toggling pinctrl receiver enable
should happen automatically with gpio changes.
> Do you think trying to plumb this through gpio-omap is a reasonable
> approach?
I think any sysfs interface to update pinctrl settings should be
generic to the pinctrl framework. But maybe making it work via gpio
use would do the trick.
Regards,
Tony