@@ -14,6 +14,7 @@
#ifndef __LINUX_OF_GPIO_H
#define __LINUX_OF_GPIO_H
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -28,10 +29,10 @@ struct device_node;
* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
*/
enum of_gpio_flags {
- OF_GPIO_ACTIVE_LOW = 0x1,
- OF_GPIO_SINGLE_ENDED = 0x2,
- OF_GPIO_OPEN_DRAIN = 0x4,
- OF_GPIO_TRANSITORY = 0x8,
+ OF_GPIO_ACTIVE_LOW = BIT(0),
+ OF_GPIO_SINGLE_ENDED = BIT(1),
+ OF_GPIO_OPEN_DRAIN = BIT(2),
+ OF_GPIO_TRANSITORY = BIT(3),
};
#ifdef CONFIG_OF_GPIO
Use the BIT macro for the of_gpio_flags enumeration. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com> --- include/linux/of_gpio.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)