linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] gpio: updates for v6.6
@ 2023-08-29 11:43 Bartosz Golaszewski
  2023-08-29 18:08 ` pr-tracker-bot
  2023-08-29 20:29 ` Linus Torvalds
  0 siblings, 2 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2023-08-29 11:43 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andy Shevchenko, Linus Walleij, linux-gpio, linux-kernel,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Linus,

Here's the pull-request from the GPIO subsystem for this merge window. We have
a lot of code refactoring using common helpers and ended up removing more lines
then we're adding this release cycle.

Everything has been in next for at least a couple days with most stuff having
spent weeks in there. Nothing really stands out, just small updates all over
the place. Details are in the signed tag.

Please pull,
Bartosz

The following changes since commit 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5:

  Linux 6.5-rc1 (2023-07-09 13:53:13 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-updates-for-v6.6

for you to fetch changes up to 3d0957b07e27abd3237b1fe0c7f06485ba80852f:

  gpio: pca953x: add support for TCA9538 (2023-08-25 13:16:54 +0200)

----------------------------------------------------------------
gpio updates for v6.6

Core GPIOLIB updates:
- wake-up poll() in user-space on device unbind
- improve fwnode usage
- interrupt domain handling improvements
- correctly handle the ngpios property in gpio-mmio

Driver cleanups:
- remove unneeded calls to platform_set_drvdata() all around the place
- remove unneeded of_match_ptr() expansions whenever a driver depends on
  CONFIG_OF
- remove redundant calls to dev_err_probe() from gpio-omap and gpio-davinci

Driver improvements:
- use autopointers and guards from cleanup.h in gpio-sim
- shrink code in gpio-sim using some common helpers
- convert the idio family of drivers to using gpio-regmap
- convert gpio-ws16c48 to using gpio-regmap
- use devres to simplify code in gpio-pisosr and gpio-mxc
- update gpio-sifive: support IRQ wake, improve interrupt handling, allow
  building as module
- make gpio-ge and gpio-bcm-kona OF-independent (plus some minor tweaks)
- add support for new models in gpio-pca953x and gpio-ds4520
- add runtime PM support to gpio-mxc
- fix a build warning in gpio-mxs
- add support for adding pin ranges to gpio-mlxbf3
- add counter/timer support to gpio-104-dio-48e
- switch to dynamic GPIO base allocation in gpio-vf610
- minor oneliners here and there

Device-tree bindings updates:
- enable the gpio-line-names property in snps,dw-apb and STMPE GPIO
- document new models in fsl-imx-gpio, ds4520 and pca95xx
- convert the bindings for brcm,kona-gpio to YAML

----------------------------------------------------------------
Alexander Stein (1):
      dt-bindings: gpio: Add gpio-line-names to STMPE GPIO

Alexandru Ardelean (1):
      gpio: 74xx-mmio: remove unneeded platform_set_drvdata() call

Andrei Coardos (16):
      gpio: bcm-kona: remove unneeded platform_set_drvdata() call
      gpio: exar: remove unneeded platform_set_drvdata() call
      gpio: logicvc: remove unneeded platform_set_drvdata() call
      gpio: eic-sprd: remove unneeded platform_set_drvdata() call
      gpio: lp3943: remove unneeded platform_set_drvdata() call
      gpio: max77620: remove unneeded platform_set_drvdata() call
      gpio: palmas: remove unnecessary call to platform_set_drvdata()
      gpio: pmic-eic-sprd: remove unnecessary call to platform_set_drvdata()
      gpio: rc5t583: remove unneeded call to platform_set_drvdata()
      gpio: sama5d2-piobu: remove unneeded call to platform_set_drvdata()
      gpio: sch: remove unneeded call to platform_set_drvdata()
      gpio: syscon: remove unneeded call to platform_set_drvdata()
      gpio: timberdale: remove unneeded call to platform_set_drvdata()
      gpio: tqmx86: remove unneeded call to platform_set_drvdata()
      gpio: vx855: remove unneeded call to platform_set_drvdata()
      gpio: zevio: remove unneeded call to platform_set_drvdata()

Andrew Davis (1):
      gpio: pisosr: Use devm_gpiochip_add_data() to simplify remove path

Andy Shevchenko (16):
      gpiolib: of: Don't use GPIO chip fwnode in of_gpiochip_*()
      gpiolib: acpi: Don't use GPIO chip fwnode in acpi_gpiochip_find()
      gpiolib: Do not alter GPIO chip fwnode member
      gpiolib: Make gpiochip_hierarchy_add_domain() return domain
      gpiolib: Factor out gpiochip_simple_create_domain()
      gpiolib: Do not assign error pointer to the GPIO IRQ chip domain
      gpiolib: Split out gpiochip_irqchip_add_allocated_domain() helper
      gpiolib: Replace open coded gpiochip_irqchip_add_allocated_domain()
      gpio: bcm-kona: Make driver OF-independent
      gpio: bcm-kona: Drop unused pdev member in private data structure
      gpio: ge: Add missing header
      gpio: ge: Fix English spelling and grammar
      gpio: ge: Make driver OF-independent
      gpio: ge: Utilise temporary variable for struct device
      gpio: ge: Replace GPLv2 boilerplate with SPDX
      gpio: ge: Enable COMPILE_TEST for the driver

Asmaa Mnebhi (2):
      gpio: mmio: handle "ngpios" properly in bgpio_init()
      gpio: mlxbf3: Support add_pin_ranges()

Bartosz Golaszewski (15):
      gpiolib: add missing include
      gpio: sim: fix a typo in comment
      gpiolib: order includes alphabetically in gpiolib.h
      gpio: sim: use sysfs_streq() and avoid an strdup()
      gpio: sim: simplify gpio_sim_device_config_live_store()
      gpio: sim: replace memmove() + strstrip() with skip_spaces() + strim()
      gpio: sim: simplify code with cleanup helpers
      gpio: pca9570: fix kerneldoc
      gpiolib: rename the gpio_device notifier
      gpio: cdev: open-code to_gpio_chardev_data()
      gpiolib: add a second blocking notifier to struct gpio_device
      gpio: cdev: wake up chardev poll() on device unbind
      gpio: cdev: wake up linereq poll() on device unbind
      gpio: cdev: wake up lineevent poll() on device unbind
      gpiolib: provide and use gpiod_line_state_notify()

Biju Das (2):
      gpio: pcf857x: Extend match data support for OF tables
      gpio: pca953x: Use i2c_get_match_data()

Geert Uytterhoeven (1):
      gpio: mxc: Improve PM configuration

Haibo Chen (1):
      gpio: vf610: switch to dynamic allocat GPIO base

Krzysztof Kozlowski (3):
      dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
      gpio: mxs: fix Wvoid-pointer-to-enum-cast warning
      gpio: mlxbf3: use capital "OR" for multiple licenses in SPDX

Li Zetao (1):
      gpio: mxc: Use helper function devm_clk_get_optional_enabled()

Liam Beguin (2):
      dt-bindings: gpio: pca95xx: document new tca9538 chip
      gpio: pca953x: add support for TCA9538

Okan Sahin (2):
      dt-bindings: gpio: ds4520: Add ADI DS4520
      gpio: ds4520: Add ADI DS4520 GPIO Expander Support

Peng Fan (1):
      dt-bindings: gpio: fsl-imx-gpio: support i.MX8QM/DXL

Rajeshwar R Shinde (1):
      gpio: imx-scu: Use ARRAY_SIZE for array length

Rob Herring (1):
      gpio: Explicitly include correct DT includes

Ruan Jinjie (3):
      gpio: omap: Remove redundant dev_err_probe() and zero value handle code
      gpio: davinci: Remove redundant dev_err_probe()
      gpio: ftgpio010: Do not check for 0 return after calling platform_get_irq()

Samuel Holland (5):
      gpio: sifive: Support IRQ wake
      gpio: sifive: Directly use the device's fwnode
      gpio: sifive: Look up IRQs only once during probe
      gpio: sifive: Get the parent IRQ's domain from its irq_data
      gpio: sifive: Allow building the driver as a module

Shenwei Wang (2):
      gpio: mxc: add runtime pm support
      gpio: mxc: release the parent IRQ in runtime suspend

Stanislav Jakubek (1):
      dt-bindings: gpio: brcm,kona-gpio: convert to YAML

William Breathitt Gray (7):
      gpio: 104-dio-48e: Add Counter/Timer support
      gpio: idio-16: Migrate to the regmap API
      gpio: 104-idio-16: Migrate to the regmap API
      gpio: pci-idio-16: Migrate to the regmap API
      gpio: idio-16: Remove unused legacy interface
      gpio: pcie-idio-24: Migrate to the regmap API
      gpio: ws16c48: Migrate to the regmap API

Zhu Wang (9):
      gpio: tps65218: remove redundant of_match_ptr()
      gpio: max732x: remove redundant CONFIG_OF and of_match_ptr()
      gpio: altera-a10sr: remove redundant of_match_ptr
      gpio: clps711x: remove redundant of_match_ptr()
      gpio: ixp4xx: remove redundant of_match_ptr()
      gpio: lpc32xx: remove redundant CONFIG_OF and of_match_ptr()
      gpio: max3191x: remove redundant of_match_ptr()
      gpio: raspberrypi-exp: remove redundant of_match_ptr()
      gpio: xra1403: remove redundant of_match_ptr()

 .../devicetree/bindings/gpio/adi,ds4520-gpio.yaml  |  51 ++
 .../devicetree/bindings/gpio/brcm,kona-gpio.txt    |  52 --
 .../devicetree/bindings/gpio/brcm,kona-gpio.yaml   | 100 +++
 .../devicetree/bindings/gpio/fsl-imx-gpio.yaml     |   2 +
 .../devicetree/bindings/gpio/gpio-pca95xx.yaml     |   1 +
 .../devicetree/bindings/gpio/snps,dw-apb-gpio.yaml |   4 +
 .../devicetree/bindings/gpio/st,stmpe-gpio.yaml    |   4 +
 MAINTAINERS                                        |   2 +-
 drivers/gpio/Kconfig                               |  31 +-
 drivers/gpio/Makefile                              |   1 +
 drivers/gpio/gpio-104-dio-48e.c                    | 127 +++-
 drivers/gpio/gpio-104-idio-16.c                    | 286 ++-------
 drivers/gpio/gpio-74xx-mmio.c                      |   2 -
 drivers/gpio/gpio-altera-a10sr.c                   |   3 +-
 drivers/gpio/gpio-ath79.c                          |   3 +-
 drivers/gpio/gpio-bcm-kona.c                       |  24 +-
 drivers/gpio/gpio-brcmstb.c                        |   4 +-
 drivers/gpio/gpio-clps711x.c                       |   4 +-
 drivers/gpio/gpio-creg-snps.c                      |   2 +-
 drivers/gpio/gpio-davinci.c                        |   2 +-
 drivers/gpio/gpio-ds4520.c                         |  80 +++
 drivers/gpio/gpio-eic-sprd.c                       |   3 +-
 drivers/gpio/gpio-exar.c                           |   2 -
 drivers/gpio/gpio-ftgpio010.c                      |   4 +-
 drivers/gpio/gpio-ge.c                             |  66 +-
 drivers/gpio/gpio-grgpio.c                         |   2 +-
 drivers/gpio/gpio-hlwd.c                           |   2 +-
 drivers/gpio/gpio-idio-16.c                        | 254 ++++----
 drivers/gpio/gpio-idio-16.h                        |  79 +--
 drivers/gpio/gpio-imx-scu.c                        |   3 +-
 drivers/gpio/gpio-ixp4xx.c                         |   2 +-
 drivers/gpio/gpio-logicvc.c                        |   3 -
 drivers/gpio/gpio-lp3943.c                         |   2 -
 drivers/gpio/gpio-lpc32xx.c                        |   4 +-
 drivers/gpio/gpio-max3191x.c                       |   4 +-
 drivers/gpio/gpio-max732x.c                        |   6 +-
 drivers/gpio/gpio-max77620.c                       |   2 -
 drivers/gpio/gpio-mb86s7x.c                        |   2 +-
 drivers/gpio/gpio-mlxbf3.c                         |  26 +-
 drivers/gpio/gpio-mmio.c                           |   9 +-
 drivers/gpio/gpio-mpc5200.c                        |   2 +-
 drivers/gpio/gpio-mpc8xxx.c                        |   4 +-
 drivers/gpio/gpio-msc313.c                         |   1 -
 drivers/gpio/gpio-mxc.c                            | 118 +++-
 drivers/gpio/gpio-mxs.c                            |   3 +-
 drivers/gpio/gpio-omap.c                           |   8 +-
 drivers/gpio/gpio-palmas.c                         |   2 -
 drivers/gpio/gpio-pca953x.c                        |  20 +-
 drivers/gpio/gpio-pca9570.c                        |   2 +-
 drivers/gpio/gpio-pcf857x.c                        |  29 +-
 drivers/gpio/gpio-pci-idio-16.c                    | 294 ++-------
 drivers/gpio/gpio-pcie-idio-24.c                   | 677 ++++++++-------------
 drivers/gpio/gpio-pisosr.c                         |  28 +-
 drivers/gpio/gpio-pmic-eic-sprd.c                  |   3 +-
 drivers/gpio/gpio-pxa.c                            |   1 -
 drivers/gpio/gpio-raspberrypi-exp.c                |   4 +-
 drivers/gpio/gpio-rc5t583.c                        |   2 -
 drivers/gpio/gpio-rcar.c                           |   1 -
 drivers/gpio/gpio-rockchip.c                       |   2 +-
 drivers/gpio/gpio-sama5d2-piobu.c                  |   1 -
 drivers/gpio/gpio-sch.c                            |   2 -
 drivers/gpio/gpio-sifive.c                         |  48 +-
 drivers/gpio/gpio-sim.c                            | 285 +++------
 drivers/gpio/gpio-sprd.c                           |   2 +-
 drivers/gpio/gpio-stp-xway.c                       |   3 +-
 drivers/gpio/gpio-syscon.c                         |   3 -
 drivers/gpio/gpio-tegra.c                          |   2 +-
 drivers/gpio/gpio-tegra186.c                       |   2 +-
 drivers/gpio/gpio-timberdale.c                     |   2 -
 drivers/gpio/gpio-tps65218.c                       |   2 +-
 drivers/gpio/gpio-tps6586x.c                       |   2 +-
 drivers/gpio/gpio-tps65910.c                       |   2 +-
 drivers/gpio/gpio-tqmx86.c                         |   2 -
 drivers/gpio/gpio-ts4800.c                         |   3 +-
 drivers/gpio/gpio-ts4900.c                         |   2 +-
 drivers/gpio/gpio-uniphier.c                       |   1 -
 drivers/gpio/gpio-vf610.c                          |   4 +-
 drivers/gpio/gpio-vx855.c                          |   2 -
 drivers/gpio/gpio-wcd934x.c                        |   3 +-
 drivers/gpio/gpio-ws16c48.c                        | 552 ++++++-----------
 drivers/gpio/gpio-xilinx.c                         |   4 +-
 drivers/gpio/gpio-xra1403.c                        |   6 +-
 drivers/gpio/gpio-zevio.c                          |   2 -
 drivers/gpio/gpiolib-acpi.c                        |   2 +-
 drivers/gpio/gpiolib-cdev.c                        | 107 +++-
 drivers/gpio/gpiolib-of.c                          |   6 +-
 drivers/gpio/gpiolib.c                             | 203 +++---
 drivers/gpio/gpiolib.h                             |  20 +-
 88 files changed, 1668 insertions(+), 2068 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/adi,ds4520-gpio.yaml
 delete mode 100644 Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/brcm,kona-gpio.yaml
 create mode 100644 drivers/gpio/gpio-ds4520.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] gpio: updates for v6.6
  2023-08-29 11:43 [GIT PULL] gpio: updates for v6.6 Bartosz Golaszewski
@ 2023-08-29 18:08 ` pr-tracker-bot
  2023-08-29 20:29 ` Linus Torvalds
  1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2023-08-29 18:08 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Torvalds, Andy Shevchenko, Linus Walleij, linux-gpio,
	linux-kernel, Bartosz Golaszewski

The pull request you sent on Tue, 29 Aug 2023 13:43:01 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-updates-for-v6.6

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f97e18a3f2fb78a4ed0d25e427535d9f853b9e9e

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] gpio: updates for v6.6
  2023-08-29 11:43 [GIT PULL] gpio: updates for v6.6 Bartosz Golaszewski
  2023-08-29 18:08 ` pr-tracker-bot
@ 2023-08-29 20:29 ` Linus Torvalds
  2023-08-30 11:48   ` Bartosz Golaszewski
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2023-08-29 20:29 UTC (permalink / raw)
  To: Bartosz Golaszewski, Peter Zijlstra
  Cc: Andy Shevchenko, Linus Walleij, linux-gpio, linux-kernel,
	Bartosz Golaszewski

On Tue, 29 Aug 2023 at 04:43, Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> Driver improvements:
> - use autopointers and guards from cleanup.h in gpio-sim

So I've pulled this, but I'm not entirely convinced some of this was a cleanup.

That gpio_sim_config_make_device_group() change is "interesting". Doing

        return &no_free_ptr(dev)->group;

looks a bit crazy. My first reaction to it was 'that can't be right".
It _is_ right, but I'm not convinced that getting rid of one kfree()
call in the error path above it is worth that kind of semantic
complexity.

I guess we'll get more used to this - and it will look a bit less
crazy in the process - but I did want to just note that I'm not
entirely convinced we should encourage things like this.

              Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] gpio: updates for v6.6
  2023-08-29 20:29 ` Linus Torvalds
@ 2023-08-30 11:48   ` Bartosz Golaszewski
  0 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2023-08-30 11:48 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Peter Zijlstra, Andy Shevchenko, Linus Walleij, linux-gpio,
	linux-kernel, Bartosz Golaszewski

On Tue, Aug 29, 2023 at 10:29 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, 29 Aug 2023 at 04:43, Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > Driver improvements:
> > - use autopointers and guards from cleanup.h in gpio-sim
>
> So I've pulled this, but I'm not entirely convinced some of this was a cleanup.
>
> That gpio_sim_config_make_device_group() change is "interesting". Doing
>
>         return &no_free_ptr(dev)->group;
>
> looks a bit crazy. My first reaction to it was 'that can't be right".
> It _is_ right, but I'm not convinced that getting rid of one kfree()
> call in the error path above it is worth that kind of semantic
> complexity.
>
> I guess we'll get more used to this - and it will look a bit less
> crazy in the process - but I did want to just note that I'm not
> entirely convinced we should encourage things like this.
>
>               Linus

I on the other hand absolutely love SBRM in C. I have been using
autopointers a lot in user-space when coding in GLib/GObject and it
quickly becomes second nature with no_free_ptr() not being much
different from g_steal_pointer(). It's an even better pattern when
used with reference counted objects where the cleanup function just
drops the reference so you can do a less "crazy" return
object_ref(obj);

Maybe this particular example doesn't save a lot of code but I think
it's worth using SBRM consistently across a given file, otherwise
mixing both styles will lead to an unreadable mess.

Bartosz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-30 18:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29 11:43 [GIT PULL] gpio: updates for v6.6 Bartosz Golaszewski
2023-08-29 18:08 ` pr-tracker-bot
2023-08-29 20:29 ` Linus Torvalds
2023-08-30 11:48   ` Bartosz Golaszewski

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).