zephyr/drivers/gpio
Jeroen Broersen cf837dd371 drivers: gpio: stm32: keep track of clock enabling per pin
The driver enables the clock of a gpio-port if any of the
pins use the port. This is done by calling pm_device_runtime_get
when a pin is used and pm_device_runtime_put when the pin is not
used anymore.
These calls needs to be balanced. But if a single pin was configured
as GPIO_DISCONNECTED multiple times, every time pm_device_runtime_put
was called.
This caused the clock of the port to be stopped and therefore also
other pins on the same port stopped working.

This commit fixes this by keeping track of which pin on a port
has requested the clock and only call pm_device_runtime_get or
pm_device_runtime_put when the clock-request for the specific pin
changes.

Fixes #77698

Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
2024-09-23 13:20:23 -05:00
..
CMakeLists.txt drivers: gpio: add pca_series gpio expander driver 2024-09-11 09:38:04 +02:00
gpio_ad559x.c drivers: ad559x: add i2c bus support 2024-04-01 12:18:47 -05:00
gpio_adp5585.c drivers: mfd: add new driver "mfd_adp5585" 2024-05-08 16:09:08 -04:00
gpio_ads114s0x.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_altera_pio.c
gpio_ambiq.c drivers: gpio_ambiq: Fixed uninitialized return variable 2024-09-23 10:01:40 +02:00
gpio_andes_atcgpio100.c drivers: gpio: atcgpio100: remove redundant include 2024-01-19 15:13:53 +00:00
gpio_axp192.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_b91.c drivers: gpio: b91: add missing PLIC header 2024-01-15 09:58:03 +01:00
gpio_bcm2711.c
gpio_bd8lb600fs.c drivers: gpio: split up driver for BD8LB600FS into a GPIO and MFD 2024-03-15 09:00:26 +01:00
gpio_brcmstb.c drivers: gpio: add brcmstb gpio driver 2024-04-25 18:06:43 -04:00
gpio_cc13xx_cc26xx.c
gpio_cc32xx.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_cmsdk_ahb.c
gpio_creg_gpio.c
gpio_cy8c95xx.c
gpio_davinci.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_dw_registers.h
gpio_dw.c drivers: gpio: dw: Address warning of unused gpio_dw_isr 2024-03-24 12:49:23 +01:00
gpio_dw.h
gpio_efinix_sapphire.c drivers: gpio: correct spelling 2024-01-13 00:24:04 +00:00
gpio_emul_sdl_bottom.c
gpio_emul_sdl_bottom.h
gpio_emul_sdl.c
gpio_emul.c
gpio_ene_kb1200.c drivers: gpio: initial device driver for ENE KB1200 2024-03-15 09:39:48 +00:00
gpio_eos_s3.c drivers: gpio: Add default for switch statement 2024-02-25 22:26:00 -05:00
gpio_esp32.c espressif: clean up unused code 2024-09-09 13:55:39 -04:00
gpio_fxl6408.c
gpio_gd32.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_gecko.c drivers: gpio: gecko: Use SIZEOF_FIELD() macro 2024-06-07 21:43:07 +02:00
gpio_grgpio2.c drivers/gpio: Add support for GRLIB GRGPIO2 2024-07-29 14:27:15 +02:00
gpio_grgpio.h drivers/gpio: Add support for GRLIB GRGPIO2 2024-07-29 14:27:15 +02:00
gpio_handlers.c build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
gpio_hogs.c everywhere: replace double words 2024-06-22 05:40:22 -04:00
gpio_ifx_cat1.c boards: arm: Introduce Infineon CYW920829M2EVK-02 board 2024-05-24 18:05:11 -04:00
gpio_imx.c gpio: imx: Added IRQ lock for RMW operations 2024-05-23 11:51:51 -04:00
gpio_intel.c drivers: gpio: gpio_intel: add acpi base resource enumeration 2024-04-22 06:50:38 -07:00
gpio_iproc.c drivers: gpio: add Broadcom iProc GPIO controller driver 2024-05-28 09:59:20 +02:00
gpio_ite_it8xxx2_v2.c ITE: drivers/gpio: Fix untrusted loop bound 2024-02-19 19:59:27 +01:00
gpio_ite_it8xxx2.c style: drivers: comply with MISRA C:2012 Rule 15.6 2024-09-11 07:40:35 -04:00
gpio_kscan_ite_it8xxx2.c
gpio_litex.c
gpio_lmp90xxx.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_lpc11u6x.c
gpio_max32.c drivers: gpio: gpio_max32: Fix high-impedance setting 2024-08-14 12:33:16 -04:00
gpio_mchp_mss.c drivers: gpio: mchp_mss: remove redundant include 2024-01-19 15:13:53 +00:00
gpio_mchp_xec_v2.c drivers: gpio: mec172x: Add message to warn about pins not in GPIO mode 2024-04-05 23:47:32 +03:00
gpio_mchp_xec.c
gpio_mcp23sxx.c drivers: mcp23xxx: add support for open-drain chip variants 2024-08-09 09:55:30 +02:00
gpio_mcp23xxx.c drivers: mcp23xxx: add support for open-drain chip variants 2024-08-09 09:55:30 +02:00
gpio_mcp23xxx.h drivers: mcp23xxx: add support for open-drain chip variants 2024-08-09 09:55:30 +02:00
gpio_mcp230xx.c drivers: mcp23xxx: add support for open-drain chip variants 2024-08-09 09:55:30 +02:00
gpio_mcux_igpio.c drivers: mcux_igpio: improve pin-gaps handling 2024-09-20 15:18:49 -05:00
gpio_mcux_lpc.c dts: nxp,lpc-gpio: Fix binding to group ports 2024-06-14 11:13:05 +02:00
gpio_mcux_rgpio.c drivers: mcux_rgpio: improve pin-gaps handling 2024-09-20 15:18:49 -05:00
gpio_mcux.c drivers: gpio_mcux: update gpio_mcux driver for MCXA156 2024-09-10 12:39:18 -04:00
gpio_mmio32.c
gpio_nct38xx_alert.c
gpio_nct38xx_port.c
gpio_nct38xx.c
gpio_nct38xx.h
gpio_neorv32.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_npcx.c
gpio_npm1300.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_npm6001.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_nrfx.c modules: hal_nordic: nrfx: update API version to 3.2.0 2024-01-08 11:19:37 +01:00
gpio_numaker.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_numicro.c drivers: gpio: Add default for switch statement 2024-02-25 22:26:00 -05:00
gpio_nxp_s32.c drivers: intc: nxp: convert wkpu to native driver 2024-08-02 15:14:33 -05:00
gpio_pca95xx.c style: drivers: comply with MISRA C:2012 Rule 15.6 2024-08-20 10:33:51 +02:00
gpio_pca953x.c drivers: gpio: pca953x: check return values from I2C API functions 2024-01-03 10:21:28 +01:00
gpio_pca_series.c drivers: gpio: pca_series: handle byteorder 2024-09-11 09:38:04 +02:00
gpio_pcal64xxa.c drivers: gpio: implement possible manual reset of PCAL64XXA 2024-09-11 09:35:37 +02:00
gpio_pcf857x.c drivers: gpio: PCF857x: Modify PCF8574 driver 2024-01-16 15:19:14 +00:00
gpio_psoc6.c drivers: gpio: Add default for switch statement 2024-02-25 22:26:00 -05:00
gpio_rcar.c drivers: gpio: rcar: Add R-Car Gen4 support 2023-11-25 08:50:47 -05:00
gpio_renesas_ra_ioport.c drivers: gpio: renesas_ra_ioport: simplify pin configuration logic 2024-08-26 17:23:31 -04:00
gpio_renesas_ra.c drivers: gpio: Rename renesas ra driver 2024-01-29 11:32:46 +01:00
gpio_rpi_pico.c
gpio_rt1718s_port.c style: drivers: comply with MISRA C:2012 Rule 15.6 2024-09-11 07:40:35 -04:00
gpio_rt1718s.c
gpio_rt1718s.h style: drivers: comply with MISRA C:2012 Rule 15.6 2024-08-20 10:33:51 +02:00
gpio_rv32m1.c drivers: gpio: Add default for switch statement 2024-02-25 22:26:00 -05:00
gpio_rzt2m.c drivers/gpio/gpio_rzt2m: Handle trig == GPIO_INT_TRIG_WAKE 2024-06-25 10:25:04 -04:00
gpio_sam0.c
gpio_sam4l.c
gpio_sam.c
gpio_sc18im704.c
gpio_sedi.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_shell.c device_dt_metadata: handle dt_meta being NULL 2024-08-12 15:54:22 +02:00
gpio_si32.c drivers: gpio: Add initial SiM3U1xx support 2024-08-26 18:51:36 +02:00
gpio_sifive.c drivers: gpio: sifive: remove unnecessary check 2024-01-19 15:13:53 +00:00
gpio_smartbond.c gpio_smartbond: Fix port_set_masked_raw 2024-08-19 17:23:18 -04:00
gpio_sn74hc595.c
gpio_stellaris.c
gpio_stm32.c drivers: gpio: stm32: keep track of clock enabling per pin 2024-09-23 13:20:23 -05:00
gpio_stm32.h drivers: gpio: stm32: keep track of clock enabling per pin 2024-09-23 13:20:23 -05:00
gpio_stmpe1600.c
gpio_sx1509b.c
gpio_tca6424a.c
gpio_test.c
gpio_tle9104.c drivers: gpio: split up driver for TLE9104 into a MFD 2024-04-09 11:07:27 +02:00
gpio_xlnx_axi.c drivers: gpio: remove '&' when assigning gpio_xxx_init function 2024-05-29 07:32:17 +02:00
gpio_xlnx_ps_bank.c
gpio_xlnx_ps_bank.h
gpio_xlnx_ps.c
gpio_xlnx_ps.h
gpio_xmc4xxx.c
Kconfig drivers: gpio: add pca_series gpio expander driver 2024-09-11 09:38:04 +02:00
Kconfig.ad559x drivers: ad559x: add i2c bus support 2024-04-01 12:18:47 -05:00
Kconfig.adp5585 drivers: mfd: add new driver "mfd_adp5585" 2024-05-08 16:09:08 -04:00
Kconfig.ads114s0x
Kconfig.altera
Kconfig.ambiq drivers: gpio: add Ambiq GPIO driver 2023-12-01 16:25:47 +01:00
Kconfig.andes_atcgpio100
Kconfig.axp192
Kconfig.b91
Kconfig.bcm2711
Kconfig.bd8lb600fs drivers: gpio: split up driver for BD8LB600FS into a GPIO and MFD 2024-03-15 09:00:26 +01:00
Kconfig.brcmstb drivers: gpio: add brcmstb gpio driver 2024-04-25 18:06:43 -04:00
Kconfig.cc13xx_cc26xx
Kconfig.cc32xx
Kconfig.cmsdk_ahb
Kconfig.creg_gpio
Kconfig.cy8c95xx
Kconfig.davinci
Kconfig.dw
Kconfig.efinix_sapphire
Kconfig.emul drivers/gpio emul: Fix reference to example overlay 2024-03-20 15:43:05 +01:00
Kconfig.emul_sdl
Kconfig.ene drivers: gpio: initial device driver for ENE KB1200 2024-03-15 09:39:48 +00:00
Kconfig.eos_s3
Kconfig.esp32
Kconfig.fxl6408
Kconfig.gd32
Kconfig.gecko
Kconfig.grgpio drivers/gpio: Add support for GRLIB GRGPIO2 2024-07-29 14:27:15 +02:00
Kconfig.ifx_cat1
Kconfig.imx
Kconfig.intel
Kconfig.iproc drivers: gpio: add Broadcom iProc GPIO controller driver 2024-05-28 09:59:20 +02:00
Kconfig.it8xxx2
Kconfig.litex
Kconfig.lmp90xxx
Kconfig.lpc11u6x
Kconfig.max32 drivers: Add MAX32690 gpio driver 2024-05-29 07:30:12 +02:00
Kconfig.mchp_mss
Kconfig.mcp23xxx drivers: add bindings for all existing mcp23xxx variants 2024-08-09 09:55:30 +02:00
Kconfig.mcux
Kconfig.mcux_igpio
Kconfig.mcux_lpc dts: nxp,lpc-gpio: Fix binding to group ports 2024-06-14 11:13:05 +02:00
Kconfig.mcux_rgpio driver: add new gpio driver "gpio_mcux_rgpio" 2024-01-16 20:50:11 -05:00
Kconfig.mmio32
Kconfig.nct38xx
Kconfig.neorv32
Kconfig.npcx
Kconfig.npm1300
Kconfig.npm6001
Kconfig.nrfx modules: hal_nordic: nrfx: update API version to 3.2.0 2024-01-08 11:19:37 +01:00
Kconfig.numaker
Kconfig.numicro
Kconfig.nxp_s32
Kconfig.pca95xx
Kconfig.pca953x
Kconfig.pca_series drivers: gpio: extend pca_series driver to pca953x and pca955x 2024-09-11 09:38:04 +02:00
Kconfig.pcal64xxa
Kconfig.pcf857x drivers: gpio: PCF857x: Modify PCF8574 driver 2024-01-16 15:19:14 +00:00
Kconfig.psoc6
Kconfig.rcar
Kconfig.renesas_ra drivers: gpio: Rename renesas ra driver 2024-01-29 11:32:46 +01:00
Kconfig.renesas_ra_ioport drivers: gpio: Update gpio driver for Renesas RA series 2024-08-19 09:59:27 -04:00
Kconfig.rpi_pico
Kconfig.rt1718s
Kconfig.rv32m1
Kconfig.rzt2m drivers: gpio: add rzt2m gpio driver 2023-11-15 11:41:35 +01:00
Kconfig.sam
Kconfig.sam0
Kconfig.sc18im704
Kconfig.sedi
Kconfig.si32 drivers: gpio: Add initial SiM3U1xx support 2024-08-26 18:51:36 +02:00
Kconfig.sifive
Kconfig.smartbond soc: smartbond: Move PM_DEVICE dependency to soc 2024-05-14 17:05:03 +02:00
Kconfig.sn74hc595
Kconfig.stellaris
Kconfig.stm32
Kconfig.stmpe1600
Kconfig.sx1509b
Kconfig.tca6424a
Kconfig.test
Kconfig.tle9104 drivers: gpio: split up driver for TLE9104 into a MFD 2024-04-09 11:07:27 +02:00
Kconfig.xec
Kconfig.xlnx
Kconfig.xlnx_ps
Kconfig.xmc4xxx