GPIO: Moved some defines to a header file v1
Subsystems (3)
PATCH 4/6 GPIO: Moved some defines to a header file v1
LED module has dependency on some gpio macros therefore they are moved to a header file.
This patch is functionally tested on Samsung SMDKV6410.
Signed-off-by David Dajun Chen <[email protected]>
Signed-off-by Ashish Jangam <[email protected]>
--- drivers/gpio/gpio-da9052.c | 26 ++------------------- include/linux/mfd/da9052/gpio.h | 46 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 include/linux/mfd/da9052/gpio.h
drivers/gpio/gpio-da9052.c +3 -23
@@ -24,26 +24,6 @@#include <linux/mfd/da9052/pdata.h> #include <linux/mfd/da9052/gpio.h> -#define DA9052_INPUT 1 -#define DA9052_OUTPUT_OPENDRAIN 2 -#define DA9052_OUTPUT_PUSHPULL 3 - -#define DA9052_SUPPLY_VDD_IO1 0 - -#define DA9052_DEBOUNCING_OFF 0 -#define DA9052_DEBOUNCING_ON 1 - -#define DA9052_OUTPUT_LOWLEVEL 0 - -#define DA9052_ACTIVE_LOW 0 -#define DA9052_ACTIVE_HIGH 1 - -#define DA9052_GPIO_MAX_PORTS_PER_REGISTER 8 -#define DA9052_GPIO_SHIFT_COUNT (no) (no%8) -#define DA9052_GPIO_MASK_UPPER_NIBBLE 0xF0 -#define DA9052_GPIO_MASK_LOWER_NIBBLE 0x0F -#define DA9052_GPIO_NIBBLE_SHIFT 4 -struct da9052_gpio {struct da9052 *da9052;struct gpio_chip gp;
@@ -201,9 +181,9 @@ static struct gpio_chip reference_gp __devinitdata = { .direction_input = da9052_gpio_direction_input, .direction_output = da9052_gpio_direction_output, .to_irq = da9052_gpio_to_irq, - .can_sleep = 1; - .ngpio = 16; - .base = -1; + .can_sleep = 1, + .ngpio = 16, + .base = -1, };static int __devinit da9052_gpio_probe (struct platform_device *pdev)
include/linux/mfd/da9052/gpio.h new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
1.7.1