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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -40,14 +40,11 @@ enum ad7266_mode { · 39 unmodified lines | |||
| 40 | * @range: Reference voltage range the device is configured for | 40 | * @range: Reference voltage range the device is configured for |
| 41 | * @mode: Sample mode the device is configured for | 41 | * @mode: Sample mode the device is configured for |
| 42 | * @fixed_addr: Whether the address pins are hard-wired | 42 | * @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 | */ |
| 46 | struct ad7266_platform_data { | 44 | struct 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 | #endif | 50 | #endif |