History

iio: ad7266: Convert to use GPIO descriptors

The AD7266 have no in-tree users making use of the platform data mechanism to pass address GPIO lines when not using a fixed address, so we can easily convert this to use GPIO descriptors instead of the platform data integers currently passed. Lowercase the labels "ad0".."ad2" as this will make a better fit for platform descriptions like device tree that prefer lowercase names such as "ad0-gpios" rather than "AD0-gpios". Board files and other static users of this device can pass the same GPIO descriptors using machine descriptor tables if need be.

Linus Walleij committed 6 years ago

Commit 5750eba1 parent b747e352 files · +12 −20Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/platform_data/ad7266.h+0−3
@@ -40,14 +40,11 @@ enum ad7266_mode { · 39 unmodified lines
40 * @range: Reference voltage range the device is configured for40 * @range: Reference voltage range the device is configured for
41 * @mode: Sample mode the device is configured for41 * @mode: Sample mode the device is configured for
42 * @fixed_addr: Whether the address pins are hard-wired42 * @fixed_addr: Whether the address pins are hard-wired
43 * @addr_gpios: GPIOs used for controlling the address pins, only used if
44 * fixed_addr is set to false.
45 */43 */
46struct ad7266_platform_data {44struct ad7266_platform_data {
47 enum ad7266_range range;45 enum ad7266_range range;
48 enum ad7266_mode mode;46 enum ad7266_mode mode;
49 bool fixed_addr;47 bool fixed_addr;
50 unsigned int addr_gpios[3];
51};48};
52 49
53#endif50#endif