lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfbEE0t2g=uzux5=dhgAHwv15OKpVr+xrF19VskO7HnTw@mail.gmail.com>
Date:   Fri, 18 Dec 2020 18:00:49 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Drew Fustini <drew@...gleboard.org>
Cc:     "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Tony Lindgren <tony@...mide.com>
Subject: Re: [RFC PATCH] pinctrl: add helper to expose pinctrl state in debugfs

On Wed, Dec 16, 2020 at 12:42 AM Drew Fustini <drew@...gleboard.org> wrote:
> On Tue, Dec 15, 2020 at 09:39:18PM +0200, Andy Shevchenko wrote:
> > On Tue, Dec 15, 2020 at 9:36 PM Andy Shevchenko
> > <andy.shevchenko@...il.com> wrote:
> > > On Mon, Dec 14, 2020 at 11:44 PM Drew Fustini <drew@...gleboard.org> wrote:
> > > > On Mon, Dec 14, 2020 at 07:55:12PM +0200, Andy Shevchenko wrote:
> >
> > ...
> >
> > > > With regards to parent directory, I did discover there is
> > > > debugfs_lookup(), so I can get the dentry for "pinctrl" and create new
> > > > subdirectory inside of it.  This is the structure now:
> > > >
> > > > /sys/kernel/debug/pinctrl/pinctrl_state/ocp:P2_35_pinmux/state
> > > > /sys/kernel/debug/pinctrl/pinctrl_state/ocp:P2_34_pinmux/state
> > > > /sys/kernel/debug/pinctrl/pinctrl_state/ocp:P2_33_pinmux/state
> > > > /sys/kernel/debug/pinctrl/pinctrl_state/ocp:P2_32_pinmux/state
> > > > etc..
> >
> > Missed part to comment.
> >
> > I was talking about
> >
> > /sys/kernel/debug/pinctrl/<$PINCTRL>/mux/<$PIN> (maybe folder, maybe node)
>
> Thanks for the example.
>
> What would the value be "<$PINCTRL>"?  The name of the driver?

The name of the device instance. This is already done in the pin control code.

> The "ocp:Px_yy_pinmux" directory name comes from dev_name(dev). Is that
> the name you were referencing in "<$PIN>"?

No, the <$PIN> is an actual pin on this controller. However, I think
we probably don't need this, just supply it as tuple of the parameters
to be set: like
echo $PIN $STATE > .../<$PINCTRL>/mux or alike.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ