Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: rotary-encoder - update docs according to the latest API changes

The old device property API is about to be removed, so
explaing how to use complete software nodes instead.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210304090948.27014-1-heikki.krogerus@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Heikki Krogerus and committed by
Dmitry Torokhov
6484e758 5b0e6fd8

+6 -2
+6 -2
Documentation/input/devices/rotary-encoder.rst
··· 107 107 }, 108 108 }; 109 109 110 - static const struct property_entry rotary_encoder_properties[] __initconst = { 110 + static const struct property_entry rotary_encoder_properties[] = { 111 111 PROPERTY_ENTRY_U32("rotary-encoder,steps-per-period", 24), 112 112 PROPERTY_ENTRY_U32("linux,axis", ABS_X), 113 113 PROPERTY_ENTRY_U32("rotary-encoder,relative_axis", 0), 114 114 { }, 115 + }; 116 + 117 + static const struct software_node rotary_encoder_node = { 118 + .properties = rotary_encoder_properties, 115 119 }; 116 120 117 121 static struct platform_device rotary_encoder_device = { ··· 126 122 ... 127 123 128 124 gpiod_add_lookup_table(&rotary_encoder_gpios); 129 - device_add_properties(&rotary_encoder_device, rotary_encoder_properties); 125 + device_add_software_node(&rotary_encoder_device.dev, &rotary_encoder_node); 130 126 platform_device_register(&rotary_encoder_device); 131 127 132 128 ...