diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-22 11:01:17 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-22 11:01:17 -0800 |
commit | 17bbc46fc9d5128756dc9f36063836eaede06b0b (patch) | |
tree | 915ed1db2033a65fee3a2c9c0f105b67cd19af88 /Documentation/driver-api | |
parent | 13e574b4941ee1931f8c70f33c3011f74e5fbd30 (diff) | |
parent | 4827aae061337251bb91801b316157a78b845ec7 (diff) | |
download | lwn-17bbc46fc9d5128756dc9f36063836eaede06b0b.tar.gz lwn-17bbc46fc9d5128756dc9f36063836eaede06b0b.zip |
Merge tag 'gpio-updates-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski:
"A rather small update, there are no new drivers, just improvements and
refactoring in existing ones.
Thanks to migrating of several drivers to using generalized APIs and
dropping of OF interfaces in favor of using software nodes we're
actually removing more code than we're adding.
Core GPIOLIB:
- drop several OF interfaces after moving a significant part of the
code to using software nodes
- remove more interfaces referring to the global GPIO numberspace
that we're getting rid of
- improvements in the gpio-regmap library
- add helper for GPIO device reference counting
- remove unused APIs
- minor tweaks like sorting headers alphabetically
Extended support in existing drivers:
- add support for Tegra 234 PMC to gpio-tegra186
Driver improvements:
- migrate the 104-dio/idi family of drivers to using the regmap-irq
API
- migrate gpio-i8255 and gpio-mm to the GPIO regmap API
- clean-ups in gpio-pca953x
- remove duplicate assignments of of_gpio_n_cells in gpio-davinci,
gpio-ge, gpio-xilinx, gpio-zevio and gpio-wcd934x
- improvements to gpio-pcf857x: implement get/set_multiple callbacks,
use generic device properties instead of OF + minor tweaks
- fix OF-related header includes and Kconfig dependencies in
gpio-zevio
- dynamically allocate the GPIO base in gpio-omap
- use a dedicated printf specifier for printing fwnode info in
gpio-sim
- use dev_name() for the GPIO chip label in gpio-vf610
- other minor tweaks and fixes
Documentation:
- remove mentions of legacy API from comments in various places
- convert the DT binding documents to YAML schema for Fujitsu
MB86S7x, Unisoc GPIO and Unisoc EIC
- document the Unisoc UMS512 controller in DT bindings"
* tag 'gpio-updates-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (54 commits)
gpio: sim: Use %pfwP specifier instead of calling fwnode API directly
gpio: tegra186: remove unneeded loop in tegra186_gpio_init_route_mapping()
gpiolib: of: Move enum of_gpio_flags to its only user
gpio: mvebu: Use IS_REACHABLE instead of IS_ENABLED for CONFIG_PWM
gpio: zevio: Add missing header
gpio: Get rid of gpio_to_chip()
gpio: pcf857x: Drop unneeded explicit casting
gpio: pcf857x: Make use of device properties
gpio: pcf857x: Get rid of legacy platform data
gpio: rockchip: Do not mention legacy API in the code
gpio: wcd934x: Remove duplicate assignment of of_gpio_n_cells
gpio: zevio: Use proper headers and drop OF_GPIO dependency
gpio: zevio: Remove duplicate assignment of of_gpio_n_cells
gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells
dt-bindings: gpio: Add compatible string for Unisoc UMS512
dt-bindings: gpio: Convert Unisoc EIC controller binding to yaml
dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml
gpio: ge: Remove duplicate assignment of of_gpio_n_cells
gpio: davinci: Remove duplicate assignment of of_gpio_n_cells
gpio: omap: use dynamic allocation of base
...
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r-- | Documentation/driver-api/gpio/legacy.rst | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/Documentation/driver-api/gpio/legacy.rst b/Documentation/driver-api/gpio/legacy.rst index e17910cc3271..a0559d93efd1 100644 --- a/Documentation/driver-api/gpio/legacy.rst +++ b/Documentation/driver-api/gpio/legacy.rst @@ -387,9 +387,6 @@ map between them using calls like:: /* map GPIO numbers to IRQ numbers */ int gpio_to_irq(unsigned gpio); - /* map IRQ numbers to GPIO numbers (avoid using this) */ - int irq_to_gpio(unsigned irq); - Those return either the corresponding number in the other namespace, or else a negative errno code if the mapping can't be done. (For example, some GPIOs can't be used as IRQs.) It is an unchecked error to use a GPIO @@ -405,11 +402,6 @@ devices, by the board-specific initialization code. Note that IRQ trigger options are part of the IRQ interface, e.g. IRQF_TRIGGER_FALLING, as are system wakeup capabilities. -Non-error values returned from irq_to_gpio() would most commonly be used -with gpio_get_value(), for example to initialize or update driver state -when the IRQ is edge-triggered. Note that some platforms don't support -this reverse mapping, so you should avoid using it. - Emulating Open Drain Signals ---------------------------- @@ -735,10 +727,6 @@ requested using gpio_request():: /* reverse gpio_export() */ void gpio_unexport(); - /* create a sysfs link to an exported GPIO node */ - int gpio_export_link(struct device *dev, const char *name, - unsigned gpio) - After a kernel driver requests a GPIO, it may only be made available in the sysfs interface by gpio_export(). The driver can control whether the signal direction may change. This helps drivers prevent userspace code @@ -748,11 +736,6 @@ This explicit exporting can help with debugging (by making some kinds of experiments easier), or can provide an always-there interface that's suitable for documenting as part of a board support package. -After the GPIO has been exported, gpio_export_link() allows creating -symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can -use this to provide the interface under their own device in sysfs with -a descriptive name. - API Reference ============= |