linux/Documentation/driver-api
Geert Uytterhoeven d944f0b115 docs: driver-model: device: Add DEVICE_ATTR_{RO,RW} examples
bus.rst, driver.rst, and hwmon-kernel-api.rst refer to the
DEVICE_ATTR_* macros for devices, but device.rst does not mention them.

Add a paragraph about these helper macros, and use them in the examples.
Retain the old description, as it is still useful for less common values
of mode.  Change the names of the example "show" and "store" methods, to
match the expectations of the DEVICE_ATTR_* macros.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210303133845.3939403-2-geert+renesas@glider.be
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-03-08 17:06:56 -07:00
..
80211 docs: net: 80211: reduce docs build time 2020-10-08 10:41:49 +02:00
acpi Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
backlight docs: lp855x-driver.rst: add it to the driver-api book 2019-07-15 11:03:02 -03:00
cxl cxl/mem: Add basic IOCTL interface 2021-02-16 20:36:38 -08:00
dmaengine dmaengine: doc: client: Update for dmaengine_get_dma_device() usage 2020-12-11 21:20:08 +05:30
driver-model docs: driver-model: device: Add DEVICE_ATTR_{RO,RW} examples 2021-03-08 17:06:56 -07:00
early-userspace Replace HTTP links with HTTPS ones: Documentation/driver-api 2020-06-26 11:09:04 -06:00
firmware docs: driver-api: firmware: fallback-mechanisms: Fix rendering of bullet point 2020-09-08 13:32:06 +02:00
fpga docs: fpga: replace :c:member: macros 2020-10-15 07:49:43 +02:00
gpio It has been a relatively quiet cycle in docsland. 2021-02-22 10:57:46 -08:00
i3c docs: driver-api: i3c: Replace HTTP links with HTTPS ones 2020-07-13 09:32:36 -06:00
iio docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
md docs: add SPDX tags to new index files 2019-07-15 11:03:03 -03:00
media media: Remove the legacy v4l2-clk API 2021-02-06 09:39:44 +01:00
mei docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
memory-devices Replace HTTP links with HTTPS ones: Documentation/driver-api 2020-06-26 11:09:04 -06:00
mmc Replace HTTP links with HTTPS ones: Documentation/driver-api 2020-06-26 11:09:04 -06:00
mtd MTD core: 2020-12-16 14:58:35 -08:00
nfc docs: add SPDX tags to new index files 2019-07-15 11:03:03 -03:00
nvdimm docs: add some new files to their respective index.rst files 2020-09-10 10:48:20 -06:00
pci Documentation: Kill all references to mmiowb() 2019-04-08 12:00:45 +01:00
phy docs: phy: Drop duplicate 'be made' 2019-07-26 08:15:26 -06:00
pldmfw Add pldmfw library for PLDM firmware update 2020-07-28 17:07:06 -07:00
pm docs: devices.rst: fix a C reference markup 2020-10-15 07:49:44 +02:00
rapidio Replace HTTP links with HTTPS ones: Documentation/driver-api 2020-06-26 11:09:04 -06:00
serial tty: vt: Replace HTTP links with HTTPS ones 2020-07-21 20:04:54 +02:00
soundwire docs: soundwire: fix some identation at stream.rst 2020-09-10 10:49:29 -06:00
surface_aggregator platform/surface: Add Surface ACPI Notify driver 2021-01-07 00:06:39 +01:00
thermal It has been a relatively quiet cycle in docsland. 2021-02-22 10:57:46 -08:00
usb usb: docs: document altmode register/unregister functions 2020-10-15 07:49:48 +02:00
xilinx docs: driver-api: add xilinx driver API documentation 2019-07-15 11:03:02 -03:00
auxiliary_bus.rst devlink: Extend devlink port documentation for subfunctions 2021-01-22 11:32:11 -08:00
basics.rst docs: basics.rst: avoid duplicated C function declaration 2020-10-15 07:49:45 +02:00
clk.rst docs: clk: fix struct syntax 2019-06-07 11:35:15 -06:00
component.rst
connector.rst net/connector: Add const qualifier to cb_id 2020-12-16 11:06:49 -08:00
console.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
dcdbas.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
devfreq.rst docs: Add initial documentation for devfreq 2019-11-19 13:16:53 -07:00
device_link.rst docs: device_link.rst: remove duplicated kernel-doc include 2020-10-15 07:49:42 +02:00
device-io.rst Driver-API: Documentation: Replace deprecated :c:func: Usage 2020-07-13 09:56:03 -06:00
dma-buf.rst dma-buf: Fix kerneldoc formatting 2020-12-15 10:57:29 +01:00
edac.rst
eisa.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
firewire.rst
frame-buffer.rst
generic-counter.rst Documentation/driver-api: generic-counter: drop doubled word 2020-07-07 20:24:07 +01:00
hsi.rst
i2c.rst
index.rst Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
infiniband.rst RDMA/core: Remove FMR pool API 2020-06-02 20:32:53 -03:00
infrastructure.rst docs: infrastructure.rst: exclude device_link_state from device.h 2020-10-15 07:49:46 +02:00
input.rst Input: remove input_polled_dev implementation 2020-12-02 12:35:14 -08:00
interconnect.rst interconnect: Add interconnect_graph file to debugfs 2019-12-16 09:49:54 +02:00
io_ordering.rst Documentation: Add io_ordering.rst to driver-api manual 2020-03-10 11:33:19 -06:00
io-mapping.rst io-mapping: Provide iomap_local variant 2020-11-24 14:42:09 +01:00
ioctl.rst docs: move core-api/ioctl.rst to driver-api/ 2020-03-10 11:21:08 -06:00
ipmb.rst drivers: ipmi: Support raw i2c packet in IPMB 2019-12-11 13:21:36 -06:00
ipmi.rst Minor cleanups to the IPMI driver for 5.9 2020-08-08 09:32:18 -07:00
isa.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
isapnp.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
libata.rst docs: libata.rst: fix a wrong usage of :c:type: tag 2020-10-15 07:49:44 +02:00
lightnvm-pblk.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
mailbox.rst docs: move mailbox.txt to driver-api and rename it 2020-06-26 11:33:38 -06:00
men-chameleon-bus.rst Documentation: document dma device use for mcb 2021-01-11 13:26:13 -07:00
message-based.rst
misc_devices.rst
miscellaneous.rst
mtdnand.rst docs: mtd: Avoid htmldocs warnings 2020-12-10 22:37:32 +01:00
ntb.rst Documentation/driver-api: ntb: drop doubled word 2020-07-13 11:18:17 -06:00
nvmem.rst nvmem: core: add nvmem_device_find 2019-10-07 09:47:37 -07:00
parport-lowlevel.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
pinctl.rst docs/pinctrl: fix compile errors in example code 2019-07-29 00:20:09 +02:00
pps.rst docs: driver-api: add remaining converted dirs to it 2019-07-15 11:03:03 -03:00
ptp.rst docs: ptp.rst: add support for Renesas (IDT) ClockMatrix 2020-07-17 10:25:21 -07:00
pwm.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
regulator.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
reset.rst docs: add a reset controller chapter to the driver API docs 2020-12-08 10:48:04 -07:00
rfkill.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
s390-drivers.rst docs: s390: convert docs to ReST and rename to *.rst 2019-06-11 09:48:14 +02:00
scsi.rst
slimbus.rst
sm501.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
spi.rst
switchtec.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
sync_file.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
target.rst docs: scsi: target.rst: remove iSCSI transport class kernel-doc markup 2020-10-15 07:49:42 +02:00
uio-howto.rst Documentation/driver-api: uio-howto: drop doubled word 2020-07-10 14:58:01 +02:00
vfio-mediated-device.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
vfio.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
vme.rst
w1.rst docs: driver-api: address duplicate label warning 2020-04-07 13:41:34 -06:00
xillybus.rst Documentation/driver-api: xillybus: drop doubled word 2020-07-10 14:58:01 +02:00
zorro.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00