diff mbox series

[v3,54/73] pinctrl: intel: drop the wrappers around pinctrl_gpio_direction_input()

Message ID 20231017120431.68847-55-brgl@bgdev.pl
State New
Headers show
Series pinctrl: don't use GPIOLIB global numberspace in helpers | expand

Commit Message

Bartosz Golaszewski Oct. 17, 2023, 12:04 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

pinctrl_gpio_direction_input() now has the same signature as the
wrappers around it so we can drop them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/pinctrl/intel/pinctrl-intel.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Bartosz Golaszewski Oct. 17, 2023, 12:44 p.m. UTC | #1
On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > pinctrl_gpio_direction_input() now has the same signature as the
> > wrappers around it so we can drop them.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Now, for the sake of symmetry can you add (at least to the all
> Intel drivers you modified in this series) the following:
>

Good idea but this is v6.8 material, I don't want to extend this
series anymore at this point.

Bart

>
> int pinctrl_gpio_direction_output_with_value(struct gpio_chip *gc,
>                                              unsigned int offset, int value)
> {
>         gc->set(gc, offset, value);
>         return pinctrl_gpio_direction_output(gc, offset);
> }
>
>
> ?
>
> And respectively in this driver
>
>         .direction_output = pincttl_gpio_direction_output_with_value,
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Bartosz Golaszewski Oct. 17, 2023, 12:55 p.m. UTC | #2
On Tue, Oct 17, 2023 at 2:46 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote:
> > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > >
> > > > pinctrl_gpio_direction_input() now has the same signature as the
> > > > wrappers around it so we can drop them.
> > >
> > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > >
> > > Now, for the sake of symmetry can you add (at least to the all
> > > Intel drivers you modified in this series) the following:
> >
> > Good idea but this is v6.8 material, I don't want to extend this
> > series anymore at this point.
>
> Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out.
>

But then we'd have to postpone the renaming and we'd be stuck with
both variants in the tree. This is suboptimal. We'd also have this
huge series spanning two subsystems for 3 months during the v6.8
release cycle in the tree causing conflicts and other issues.

I'd prefer to merge this during the v6.7 merge window and then we can
keep on improving it without affecting both trees. Linus will be
taking those subsequent patches as usual.

Linus, what do you think?

Bart
Andy Shevchenko Oct. 17, 2023, 1:16 p.m. UTC | #3
On Tue, Oct 17, 2023 at 02:55:07PM +0200, Bartosz Golaszewski wrote:
> On Tue, Oct 17, 2023 at 2:46 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote:
> > > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > >
> > > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote:
> > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > > >
> > > > > pinctrl_gpio_direction_input() now has the same signature as the
> > > > > wrappers around it so we can drop them.
> > > >
> > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > >
> > > > Now, for the sake of symmetry can you add (at least to the all
> > > > Intel drivers you modified in this series) the following:
> > >
> > > Good idea but this is v6.8 material, I don't want to extend this
> > > series anymore at this point.
> >
> > Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out.
> 
> But then we'd have to postpone the renaming and we'd be stuck with
> both variants in the tree. This is suboptimal. We'd also have this
> huge series spanning two subsystems for 3 months during the v6.8
> release cycle in the tree causing conflicts and other issues.

I don't see how this is related. What I'm talking is only related to dropping
the wrappers in the drivers _after_ whatever you do with generic APIs.

> I'd prefer to merge this during the v6.7 merge window and then we can
> keep on improving it without affecting both trees. Linus will be
> taking those subsequent patches as usual.
> 
> Linus, what do you think?
Bartosz Golaszewski Oct. 17, 2023, 2:51 p.m. UTC | #4
On Tue, Oct 17, 2023 at 3:16 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Oct 17, 2023 at 02:55:07PM +0200, Bartosz Golaszewski wrote:
> > On Tue, Oct 17, 2023 at 2:46 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > On Tue, Oct 17, 2023 at 02:44:25PM +0200, Bartosz Golaszewski wrote:
> > > > On Tue, 17 Oct 2023 at 14:41, Andy Shevchenko
> > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > >
> > > > > On Tue, Oct 17, 2023 at 02:04:12PM +0200, Bartosz Golaszewski wrote:
> > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > > > >
> > > > > > pinctrl_gpio_direction_input() now has the same signature as the
> > > > > > wrappers around it so we can drop them.
> > > > >
> > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > >
> > > > > Now, for the sake of symmetry can you add (at least to the all
> > > > > Intel drivers you modified in this series) the following:
> > > >
> > > > Good idea but this is v6.8 material, I don't want to extend this
> > > > series anymore at this point.
> > >
> > > Then let's postpone at least Intel and Cypress patches after v6.8-rc1 is out.
> >
> > But then we'd have to postpone the renaming and we'd be stuck with
> > both variants in the tree. This is suboptimal. We'd also have this
> > huge series spanning two subsystems for 3 months during the v6.8
> > release cycle in the tree causing conflicts and other issues.
>
> I don't see how this is related. What I'm talking is only related to dropping
> the wrappers in the drivers _after_ whatever you do with generic APIs.

Ah, I misunderstood you. Ok, I'll drop them from the tree.

Bart
diff mbox series

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 0f8e27d16929..f772be70e56d 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -990,11 +990,6 @@  static int intel_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
 	return GPIO_LINE_DIRECTION_OUT;
 }
 
-static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
-{
-	return pinctrl_gpio_direction_input(chip, offset);
-}
-
 static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned int offset,
 				       int value)
 {
@@ -1007,7 +1002,7 @@  static const struct gpio_chip intel_gpio_chip = {
 	.request = gpiochip_generic_request,
 	.free = gpiochip_generic_free,
 	.get_direction = intel_gpio_get_direction,
-	.direction_input = intel_gpio_direction_input,
+	.direction_input = pinctrl_gpio_direction_input,
 	.direction_output = intel_gpio_direction_output,
 	.get = intel_gpio_get,
 	.set = intel_gpio_set,