linux-stable/Documentation/driver-api
Linus Torvalds 69afef4af4 gpio updates for v6.9
Serialization rework:
 - use SRCU to serialize access to the global GPIO device list, to GPIO device
   structs themselves and to GPIO descriptors
 - make the GPIO subsystem resilient to the GPIO providers being unbound while
   the API calls are in progress
 - don't dereference the SRCU-protected chip pointer if the information we need
   can be obtained from the GPIO device structure
 - move some of the information contained in struct gpio_chip to struct
   gpio_device to further reduce the need to dereference the former
 - pass the GPIO device struct instead of the GPIO chip to sysfs callback to,
   again, reduce the need for accessing the latter
 - get GPIO descriptors from the GPIO device, not from the chip for the same
   reason
 - allow for mostly lockless operation of the GPIO driver API: assure
   consistency with SRCU and atomic operations
 - remove the global GPIO spinlock
 - remove the character device RW semaphore
 
 Core GPIOLIB:
 - constify pointers in GPIO API where applicable
 - unify the GPIO counting APIs for ACPI and OF
 - provide a macro for iterating over all GPIOs, not only the ones that are
   requested
 - remove leftover typedefs
 - pass the consumer device to GPIO core in devm_fwnode_gpiod_get_index() for
   improved logging
 - constify the GPIO bus type
 - don't warn about removing GPIO chips with descriptors still held by users as
   we can now handle this situation gracefully
 - remove unused logging helpers
 - unexport functions that are only used internally in the GPIO subsystem
 - set the device type (assign the relevant struct device_type) for GPIO devices
 
 New drivers:
 - add the ChromeOS EC GPIO driver
 
 Driver improvements:
 - allow building gpio-vf610 with COMPILE_TEST as well as disabling it in
   menuconfig (before it was always built for i.MX cofigs)
 - count the number of EICs using the device properties instead of hard-coding
   it in gpio-eic-sprd
 - improve the device naming, extend the debugfs output and add lockdep asserts
   to gpio-sim
 
 DT bindings:
 - document the 'label' property for gpio-pca9570
 - convert aspeed,ast2400-gpio bindings to DT schema
 - disallow unevaluated properties for gpio-mvebu
 - document a new model in renesas,rcar-gpio
 
 Documentation:
 - improve the character device kerneldocs in user-space headers
 - add proper documentation for the character device uAPI (both v1 and v2)
 - move the sysfs and gpio-mockup docs into the "obsolete" section
 - improve naming consistency for GPIO terms
 - clarify the line values description for sysfs
 - minor docs improvements
 - improve the driver API contract for setting GPIO direction
 - mark unsafe APIs as deprecated in kerneldocs and suggest replacements
 
 Other:
 - remove an obsolete test from selftests
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmXu1ecACgkQEacuoBRx
 13JR7w//R3TswZ1uC9qkRjat9eA2KZUaI2QChlS7V/yXVcDHynuTlO/ZQmnnMdYL
 ch7T2cjPcW0OCt0UhcjamUmYtWaxe1e5GU3E42EosWUsojEzgGs0iNKe0R4SHYzv
 whlkFqO8+8IctYhiMpAU1PzP9N4YBqypwgCrTqHIrYuhz3MbPQxtCMkr7g0LTo8u
 Z3K0D3Y0LuwISWNYYhA20Bwemn1fEHXJ9f3pTeNaGh2dGZek9k9xd0zWcCxwhaYD
 CBTBiZXf57TUTJ2u+JG+au1ghEmmvBPlMpza+fazypbcvsiQxdGvv5QH1bTwyt4B
 woGq+biLLvlwfJ8BT7+09uni7gUyNL3wWkixlx/8Slkyti4xWqgZQ3WnhwN8yS4Y
 DbkTtzH/PIsjr1dZw6rnGoXi80lBEaok7LeI0QhybopTXQI+CnIbE/RBhzly8Mf8
 1cAVFjrF2gPuaTuheakRBw4LOhegf4a485fadJVEUeEpeF7/p9rDQWAbgohYUnCE
 gHPwkTOJuOZp+BlsTOyspnqxWnDVMtCnmi+q1o7JvEgXqAtzU7+1gz/wDpfsHgHQ
 oze6V2JvD2R3JkHmdqcIzq5yNwk1rOguOY3saNiwSk95JY+A8vhAe/gVykklKDXX
 oX/DPwlVd/0OR+0HCQ3r0pXK8BSRQ9qm/nUZNnLB+Rts9K1peIU=
 =LX+L
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "The biggest feature is the locking overhaul. Up until now the
  synchronization in the GPIO subsystem was broken. There was a single
  spinlock "protecting" multiple data structures but doing it wrong (as
  evidenced by several places where it would be released when a sleeping
  function was called and then reacquired without checking the protected
  state).

  We tried to use an RW semaphore before but the main issue with GPIO is
  that we have drivers implementing the interfaces in both sleeping and
  non-sleeping ways as well as user-facing interfaces that can be called
  both from process as well as atomic contexts. Both ends converge in
  the same code paths that can use neither spinlocks nor mutexes. The
  only reasonable way out is to use SRCU and go mostly lockless. To that
  end: we add several SRCU structs in relevant places and use them to
  assure consistency between API calls together with atomic reads and
  writes of GPIO descriptor flags where it makes sense.

  This code has spent several weeks in next and has received several
  fixes in the first week or two after which it stabilized nicely. The
  GPIO subsystem is now resilient to providers being suddenly unbound.
  We managed to also remove the existing character device RW semaphore
  and the obsolete global spinlock.

  Other than the locking rework we have one new driver (for Chromebook
  EC), much appreciated documentation improvements from Kent and the
  regular driver improvements, DT-bindings updates and GPIOLIB core
  tweaks.

  Serialization rework:
   - use SRCU to serialize access to the global GPIO device list, to
     GPIO device structs themselves and to GPIO descriptors
   - make the GPIO subsystem resilient to the GPIO providers being
     unbound while the API calls are in progress
   - don't dereference the SRCU-protected chip pointer if the
     information we need can be obtained from the GPIO device structure
   - move some of the information contained in struct gpio_chip to
     struct gpio_device to further reduce the need to dereference the
     former
   - pass the GPIO device struct instead of the GPIO chip to sysfs
     callback to, again, reduce the need for accessing the latter
   - get GPIO descriptors from the GPIO device, not from the chip for
     the same reason
   - allow for mostly lockless operation of the GPIO driver API: assure
     consistency with SRCU and atomic operations
   - remove the global GPIO spinlock
   - remove the character device RW semaphore

  Core GPIOLIB:
   - constify pointers in GPIO API where applicable
   - unify the GPIO counting APIs for ACPI and OF
   - provide a macro for iterating over all GPIOs, not only the ones
     that are requested
   - remove leftover typedefs
   - pass the consumer device to GPIO core in
     devm_fwnode_gpiod_get_index() for improved logging
   - constify the GPIO bus type
   - don't warn about removing GPIO chips with descriptors still held by
     users as we can now handle this situation gracefully
   - remove unused logging helpers
   - unexport functions that are only used internally in the GPIO
     subsystem
   - set the device type (assign the relevant struct device_type) for
     GPIO devices

  New drivers:
   - add the ChromeOS EC GPIO driver

  Driver improvements:
   - allow building gpio-vf610 with COMPILE_TEST as well as disabling it
     in menuconfig (before it was always built for i.MX cofigs)
   - count the number of EICs using the device properties instead of
     hard-coding it in gpio-eic-sprd
   - improve the device naming, extend the debugfs output and add
     lockdep asserts to gpio-sim

  DT bindings:
   - document the 'label' property for gpio-pca9570
   - convert aspeed,ast2400-gpio bindings to DT schema
   - disallow unevaluated properties for gpio-mvebu
   - document a new model in renesas,rcar-gpio

  Documentation:
   - improve the character device kerneldocs in user-space headers
   - add proper documentation for the character device uAPI (both v1 and v2)
   - move the sysfs and gpio-mockup docs into the "obsolete" section
   - improve naming consistency for GPIO terms
   - clarify the line values description for sysfs
   - minor docs improvements
   - improve the driver API contract for setting GPIO direction
   - mark unsafe APIs as deprecated in kerneldocs and suggest
     replacements

  Other:
   - remove an obsolete test from selftests"

* tag 'gpio-updates-for-v6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (79 commits)
  gpio: sysfs: repair export returning -EPERM on 1st attempt
  selftest: gpio: remove obsolete gpio-mockup test
  gpiolib: Deduplicate cleanup for-loop in gpiochip_add_data_with_key()
  dt-bindings: gpio: aspeed,ast2400-gpio: Convert to DT schema
  gpio: acpi: Make acpi_gpio_count() take firmware node as a parameter
  gpio: of: Make of_gpio_get_count() take firmware node as a parameter
  gpiolib: Pass consumer device through to core in devm_fwnode_gpiod_get_index()
  gpio: sim: use for_each_hwgpio()
  gpio: provide for_each_hwgpio()
  gpio: don't warn about removing GPIO chips with active users anymore
  gpio: sim: delimit the fwnode name with a ":" when generating labels
  gpio: sim: add lockdep asserts
  gpio: Add ChromeOS EC GPIO driver
  gpio: constify of_phandle_args in of_find_gpio_device_by_xlate()
  gpio: fix memory leak in gpiod_request_commit()
  gpio: constify opaque pointer "data" in gpio_device_find()
  gpio: cdev: fix a NULL-pointer dereference with DEBUG enabled
  gpio: uapi: clarify default_values being logical
  gpio: sysfs: fix inverted pointer logic
  gpio: don't let lockdep complain about inherently dangerous RCU usage
  ...
2024-03-13 11:14:55 -07:00
..
80211 wifi: mac80211: rename ieee80211_tx_status() to ieee80211_tx_status_skb() 2023-10-23 12:26:51 +02:00
acpi
backlight
crypto crypto: iaa - Add IAA Compression Accelerator Documentation 2023-12-15 17:52:53 +08:00
cxl Documentation: cxl: remove dangling kernel-doc reference 2022-08-05 08:41:02 -07:00
dmaengine Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
driver-model spi: Updates for v6.9 2024-03-13 11:07:37 -07:00
early-userspace
firmware Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
fpga
gpio Documentation: gpio: consistently use logical line value terminology 2024-02-14 10:34:08 +01:00
hte hte: Re-phrase tegra API document 2023-04-26 15:43:19 -07:00
i3c i3c: Fix typo "Provisional ID" to "Provisioned ID" 2023-10-10 12:11:13 +02:00
iio
md Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
media media updates for v6.8-rc1 2024-01-12 14:29:48 -08:00
mei docs: driver-api: properly format ToC headings 2023-11-17 13:05:26 -07:00
memory-devices
mmc
mtd docs: mtd: spi-nor: drop obsolete info 2023-11-24 22:11:19 +02:00
nfc Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
nvdimm Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
pci pci-v6.8-changes 2024-01-17 16:23:17 -08:00
phy phy: Add devm_of_phy_optional_get() helper 2023-02-03 10:52:49 +05:30
pldmfw Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
pm
rapidio
serial Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
soundwire
surface_aggregator lib: crc_ccitt_false() is identical to crc_itu_t() 2023-12-29 12:22:26 -08:00
thermal thermal: int340x: processor_thermal: Support power floor notifications 2023-10-12 21:09:48 +02:00
tty tty: fix kernel-doc for functions in tty.h 2023-10-03 14:31:15 +02:00
usb docs: driver-api: usb: update dma info 2023-10-05 09:35:12 +02:00
virtio docs: driver-api: virtio: commentize spec version checking 2023-02-20 19:26:57 -05:00
xilinx
aperture.rst
auxiliary_bus.rst
basics.rst docs: time: make separate section for time and timers 2023-07-14 13:47:07 -06:00
clk.rst docs: clk: add documentation to log which clocks have been disabled 2023-04-20 17:53:38 -06:00
component.rst
connector.rst
console.rst
devfreq.rst
device-io.rst arch/*/io.h: remove ioremap_uc in some architectures 2023-11-23 10:32:52 +01:00
device_link.rst
dma-buf.rst doc: uapi: Add document describing dma-buf semantics 2023-08-21 18:20:05 +02:00
dpll.rst dpll: move all dpll<>netdev helpers to dpll code 2024-03-05 18:36:42 -08:00
edac.rst EDAC/amd64: Document heterogeneous system enumeration 2023-06-05 12:27:15 +02:00
eisa.rst Documentation: eisa: Fix typo 2022-11-15 14:52:38 -07:00
firewire.rst
frame-buffer.rst
generic-counter.rst
hsi.rst Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
i2c.rst
index.rst docs: rework the driver-api top-level page 2024-01-30 13:47:53 -07:00
infiniband.rst
infrastructure.rst docs: add more driver-model infrastructure interfaces 2023-07-14 13:18:50 -06:00
input.rst
interconnect.rst interconnect: Add debugfs test client 2023-08-22 21:04:50 +03:00
io-mapping.rst Documentation: driver-api: correct spelling 2023-02-02 11:05:16 -07:00
io_ordering.rst
ioctl.rst
ipmb.rst
ipmi.rst
isa.rst Remove duplicate words inside documentation 2022-09-27 13:21:43 -06:00
libata.rst ata: libata: remove deprecated EH callbacks 2023-08-02 17:45:42 +09:00
mailbox.rst
men-chameleon-bus.rst
message-based.rst
misc_devices.rst
miscellaneous.rst docs/driver-api/miscellaneous: Remove kernel-doc of serial_core.c 2022-11-09 14:56:05 +01:00
mtdnand.rst
ntb.rst ntb.rst: Fix copy and paste error 2023-07-08 11:05:05 -04:00
nvmem.rst docs: nvmem: remove function parameters (fixes hyperlink generation) 2023-12-08 15:35:35 -07:00
parport-lowlevel.rst
pin-control.rst It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
pps.rst Documentation: driver-api: pps: Update PPS generator documentation 2023-10-26 11:38:03 -06:00
ptp.rst docs: ptp.rst: Add information about NVIDIA Mellanox devices 2023-06-20 09:02:32 +01:00
pwm.rst pwm: Provide pwmchip_alloc() function and a devm variant of it 2024-02-15 12:59:15 +01:00
regulator.rst
reset.rst
rfkill.rst
s390-drivers.rst docs: move s390 under arch 2023-07-24 12:12:24 +02:00
scsi.rst
slimbus.rst
sm501.rst
spi.rst spi: Update reference to struct spi_controller 2022-11-01 18:30:09 +00:00
switchtec.rst
sync_file.rst
target.rst
tee.rst Documentation: Destage TEE subsystem documentation 2023-12-08 15:45:10 -07:00
uio-howto.rst
vfio-mediated-device.rst vfio-mdev: remove an non-existing driver from vfio-mediated-device 2023-01-23 11:26:29 -07:00
vfio-pci-device-specific-driver-acceptance.rst
vfio.rst docs: vfio: Add vfio device cdev description 2023-07-25 10:20:54 -06:00
vme.rst
w1.rst
wbrf.rst Documentation/driver-api: Add document about WBRF mechanism 2023-12-11 11:33:23 +01:00
wmi.rst platform/x86: wmi: Add documentation 2023-05-09 11:54:42 +02:00
xillybus.rst
zorro.rst