All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v6 03/13] pinctrl: Add sysfs support
Date: Tue, 7 Mar 2023 16:15:25 +0100	[thread overview]
Message-ID: <ZAdVDaxoSuwd57hP@kroah.com> (raw)
In-Reply-To: <OS0PR01MB5922171F49133EB3793BCDBF86B79@OS0PR01MB5922.jpnprd01.prod.outlook.com>

On Tue, Mar 07, 2023 at 02:43:54PM +0000, Biju Das wrote:
> Hi Linus Walleij,
> 
> Thanks for the feedback.
> 
> > Subject: Re: [PATCH v6 03/13] pinctrl: Add sysfs support
> > 
> > On Mon, Mar 6, 2023 at 10:00 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > 
> > > Add a simple sysfs interface to the generic pinctrl framework for
> > > configuring pins for output disable operation.
> > >
> > > /sys/class/pinctrl/
> > >   `-- output-disable/
> > >       |-- configure    (w/o) ask the kernel to configure a pin group
> > >                              for output disable operation.
> > >
> > >   echo "<group-name function-name 0 1>" > configure
> > >
> > > The existing "pinmux-functions" debugfs file lists the pin functions
> > > registered for the pin controller. For example:
> > >
> > >   function 0: usb0, groups = [ usb0 ]
> > >   function 1: usb1, groups = [ usb1 ]
> > >   function 2: gpt4-pins, groups = [ gpt4-pins ]
> > >   function 3: scif0, groups = [ scif0 ]
> > >   function 4: scif2, groups = [ scif2 ]
> > >   function 5: spi1, groups = [ spi1 ]
> > >
> > > To configure gpt4-pins for output disable activation by user:
> > >
> > >   echo "gpt4-pins gpt4-pins 0 1" > configure
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > 
> > 
> > You have to run things like this by Greg K-H (adde on To)
> > 
> > > +static struct class pinctrl_class = {
> > > +       .name = "pinctrl",
> > > +       .owner = THIS_MODULE,
> > > +       .dev_groups = pinctrl_groups,
> > > +};
> > 
> > Why are you adding a new device class?
> > 
> > IIRC Greg don't like them, we should probably just deal with the devices
> > directly on the bus where they are, which also implies some topology search
> > etc which is a feature.
> 
> I am ok for both, 
> 
> I thought adding new device class will be more generic and 
> people can use simple sysfs[1] like pwm for output disable operation
> rather than the SoC specific operation[2].
> 
> [1]
> /sys/class/pinctrl/output-disable/configure

That's fine, but you don't need a class for it, use configfs for
configuring things like this, that is what it is there for.

thanks,

greg k-h

  reply	other threads:[~2023-03-07 15:19 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06  9:00 [PATCH v6 00/13] Add pinctrl sysfs and RZ/G2L POEG support Biju Das
2023-03-06  9:00 ` [PATCH v6 01/13] pinctrl: core: Add pinctrl_get_device() Biju Das
2023-03-06 23:33   ` andy.shevchenko
2023-03-07  8:13     ` Biju Das
2023-03-09 12:54       ` Andy Shevchenko
2023-03-09 13:26         ` Biju Das
2023-03-09 13:44           ` Andy Shevchenko
2023-03-09 14:19             ` Biju Das
2023-03-13 20:42               ` Biju Das
2023-03-13 22:05               ` Linus Walleij
2023-03-14  8:27                 ` Biju Das
2023-03-14  8:42                   ` Linus Walleij
2023-03-28  7:08                     ` Biju Das
2023-03-14  9:33                   ` Geert Uytterhoeven
2023-03-14 11:33                     ` Biju Das
2023-03-15  8:00                       ` Geert Uytterhoeven
2023-03-09 13:05       ` Linus Walleij
2023-03-09 13:18         ` Biju Das
2023-03-06  9:00 ` [PATCH v6 02/13] pinctrl: Add poutdisops variable to struct pinctrl_desc Biju Das
2023-03-06  9:00 ` [PATCH v6 03/13] pinctrl: Add sysfs support Biju Das
2023-03-06 23:38   ` andy.shevchenko
2023-03-07  8:54     ` Biju Das
2023-03-07 13:41   ` Linus Walleij
2023-03-07 14:43     ` Biju Das
2023-03-07 15:15       ` Greg KH [this message]
2023-03-28  7:07         ` Biju Das
2023-03-07 14:46     ` Greg KH
2023-03-06  9:00 ` [PATCH v6 04/13] pinctrl: renesas: rzg2l: Add pin output disable support Biju Das
2023-03-06  9:00 ` [PATCH v6 05/13] soc: renesas: Kconfig: Enable pin output disable for RZ/G2L SoC Biju Das
2023-03-06  9:00 ` [PATCH v6 06/13] drivers: pinctrl: renesas: Add RZ/G2L POEG driver support Biju Das
2023-03-06 23:35   ` andy.shevchenko
2023-03-07  8:53     ` Biju Das
2023-03-07  9:58       ` Andy Shevchenko
2023-03-07 10:10         ` Biju Das
2023-03-07 12:30           ` Andy Shevchenko
2023-03-07 12:39             ` Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 07/13] pwm: rzg2l-gpt: Add support for output disable request from gpt Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 08/13] pinctrl: renesas: rzg2l-poeg: Add support for GPT Output-Disable Request Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 09/13] pwm: rzg2l-gpt: Add support for output disable when both output low Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 10/13] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT when both outputs are low Biju Das
2023-03-06 23:39   ` andy.shevchenko
2023-03-07  8:57     ` Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 11/13] pwm: rzg2l-gpt: Add support for output disable on dead time error Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 12/13] pinctrl: renesas: rzg2l-poeg: output-disable request from GPT " Biju Das
2023-03-06  9:00 ` [DO NOT APPLY PATCH v6 13/13] tools/poeg: Add test app for poeg Biju Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAdVDaxoSuwd57hP@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.