]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tpm: st33zp24: switch to using gpiod API
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 1 Oct 2022 05:51:41 +0000 (22:51 -0700)
committerJarkko Sakkinen <jarkko@kernel.org>
Thu, 8 Dec 2022 16:20:46 +0000 (16:20 +0000)
commit3f8019093775cc338c8e895bc9a41f4922766de6
tree0244c84e45fe0ae7d7a222a92f39fe0272223ea1
parent04593028d7c1156df9aa69841980529d7f20f9fe
tpm: st33zp24: switch to using gpiod API

Switch the driver from legacy gpio API (that uses flat GPIO numbering)
to the newer gpiod API (which used descriptors and respects line
polarities specified in ACPI or device tree).

Because gpio handling code for SPI and I2C variants duplicates each
other it is moved into the core code for the driver.

Also, it seems that the driver never assigned tpm_dev->io_lpcpd in the
past, so gpio-based power management was most likely not working ever.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/st33zp24/i2c.c
drivers/char/tpm/st33zp24/spi.c
drivers/char/tpm/st33zp24/st33zp24.c
drivers/char/tpm/st33zp24/st33zp24.h