linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>, Oleksii_Moisieiev@epam.com
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	sudeep.holla@arm.com, cristian.marussi@arm.com,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org
Subject: Re: [RFC v2 4/5] gpio: add pinctrl based generic gpio driver
Date: Thu, 12 Oct 2023 10:08:17 +0900	[thread overview]
Message-ID: <ZSdHAYsmh/mzISKC@octopus> (raw)
In-Reply-To: <CACRpkdZ+QkZp7_se7vN7i_Nx_c3woT_OzVnj3YHju3mZS+Ku8A@mail.gmail.com>

Hi Linus and Oleksii,

On Tue, Oct 10, 2023 at 02:00:40PM +0200, Linus Walleij wrote:
> On Thu, Oct 5, 2023 at 4:59???AM AKASHI Takahiro
> <takahiro.akashi@linaro.org> wrote:
> 
> 
> > Some pin controllers provide not only a method to set up lines but
> > also gpio function. With this commit, a new generic gpio driver will
> > be provided. It is implemented purely by using pinctrl interfaces.
> > One of such pin controllers is Arm's SCMI.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> > RFC v2 (Oct 5, 2023)
> 
> RFC v2 looks very good to me, definitely something that can be merged
> as a starting point once the hardware has been tested.

Thank you for your support.
I think the easiest and best way to test the code is that Oleskii will try
my patch on his platform, r-car, on which I believe that SCMI FW for pin
controller is already available since he tested his pinctrl driver.

@Oleskii, can you please take a time for the test?
(I will assist you in case of any error.)

> > +static int pin_control_gpio_direction_input(struct gpio_chip *chip,
> > +                                           unsigned int offset)
> > +{
> > +       return pinctrl_gpio_direction_input(chip->gpiodev->base + offset);
> > +}
> > +
> > +static int pin_control_gpio_direction_output(struct gpio_chip *chip,
> > +                                            unsigned int offset, int val)
> > +{
> > +       return pinctrl_gpio_direction_output(chip->gpiodev->base + offset);
> > +}
> 
> IIRC Bartosz is working on a patch set getting rid of this kludge having to
> call with base + offset in every driver, replacing it with generic calls that
> you can just assign in the gpio_chip.
> 
> When this gets applied these changes will likely be in place so you will
> get rid of this too.

I will try to keep eyes on Bartosz's patch.

Thanks,
-Takahiro Akashi


> Yours,
> Linus Walleij

  reply	other threads:[~2023-10-12  1:08 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  2:58 [RFC v2 0/5] gpio: add pinctrl based generic gpio driver AKASHI Takahiro
2023-10-05  2:58 ` [RFC v2 1/5] pinctrl: define PIN_CONFIG_INPUT AKASHI Takahiro
2023-10-10 11:53   ` Linus Walleij
2023-10-05  2:58 ` [RFC v2 2/5] pinctrl: always export pin_config_get_for_pin() AKASHI Takahiro
2023-10-10 11:54   ` Linus Walleij
2023-10-05  2:58 ` [RFC v2 3/5] pinctrl: add pinctrl_gpio_get_config() AKASHI Takahiro
2023-10-05  2:58 ` [RFC v2 4/5] gpio: add pinctrl based generic gpio driver AKASHI Takahiro
2023-10-10 12:00   ` Linus Walleij
2023-10-12  1:08     ` AKASHI Takahiro [this message]
2023-10-05  2:58 ` [RFC v2 5/5] dt-bindings: gpio: Add bindings for " AKASHI Takahiro
2023-10-05 19:48   ` Krzysztof Kozlowski
2023-10-12  1:15     ` AKASHI Takahiro
2023-10-12  7:27       ` Krzysztof Kozlowski
2023-10-06 13:18   ` Rob Herring
2023-10-06 13:23   ` Rob Herring
2023-10-09  7:49     ` Linus Walleij
2023-10-09  9:08       ` Cristian Marussi
2023-10-09 13:13         ` Linus Walleij
2023-10-09 15:08           ` Cristian Marussi
2023-10-10  5:14             ` AKASHI Takahiro
2023-10-10  5:25       ` AKASHI Takahiro
2023-10-12  7:25         ` Linus Walleij
2023-10-17  2:32           ` AKASHI Takahiro
2023-10-23  8:12             ` Linus Walleij
2023-10-24  7:12               ` AKASHI Takahiro
2023-10-24  9:40                 ` Linus Walleij
2023-10-24 10:55                   ` Cristian Marussi
2023-10-24 13:01                     ` Linus Walleij
2023-10-24 11:09                   ` AKASHI Takahiro
2023-10-24 13:12                     ` Linus Walleij
2023-10-24 13:42                       ` AKASHI Takahiro
2023-11-05 22:15                         ` Linus Walleij
2023-10-19 21:27 ` [RFC v2 0/5] gpio: add " andy.shevchenko
2023-10-20  0:21   ` AKASHI Takahiro

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=ZSdHAYsmh/mzISKC@octopus \
    --to=takahiro.akashi@linaro.org \
    --cc=Oleksii_Moisieiev@epam.com \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sudeep.holla@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).