diff options
Diffstat (limited to 'arch/blackfin/kernel/bfin_gpio.c')
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index a174596cc009..e35e20f00d9b 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -1289,44 +1289,50 @@ __initcall(gpio_register_proc); | |||
1289 | #endif | 1289 | #endif |
1290 | 1290 | ||
1291 | #ifdef CONFIG_GPIOLIB | 1291 | #ifdef CONFIG_GPIOLIB |
1292 | int bfin_gpiolib_direction_input(struct gpio_chip *chip, unsigned gpio) | 1292 | static int bfin_gpiolib_direction_input(struct gpio_chip *chip, unsigned gpio) |
1293 | { | 1293 | { |
1294 | return bfin_gpio_direction_input(gpio); | 1294 | return bfin_gpio_direction_input(gpio); |
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | int bfin_gpiolib_direction_output(struct gpio_chip *chip, unsigned gpio, int level) | 1297 | static int bfin_gpiolib_direction_output(struct gpio_chip *chip, unsigned gpio, int level) |
1298 | { | 1298 | { |
1299 | return bfin_gpio_direction_output(gpio, level); | 1299 | return bfin_gpio_direction_output(gpio, level); |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | int bfin_gpiolib_get_value(struct gpio_chip *chip, unsigned gpio) | 1302 | static int bfin_gpiolib_get_value(struct gpio_chip *chip, unsigned gpio) |
1303 | { | 1303 | { |
1304 | return bfin_gpio_get_value(gpio); | 1304 | return bfin_gpio_get_value(gpio); |
1305 | } | 1305 | } |
1306 | 1306 | ||
1307 | void bfin_gpiolib_set_value(struct gpio_chip *chip, unsigned gpio, int value) | 1307 | static void bfin_gpiolib_set_value(struct gpio_chip *chip, unsigned gpio, int value) |
1308 | { | 1308 | { |
1309 | return bfin_gpio_set_value(gpio, value); | 1309 | return bfin_gpio_set_value(gpio, value); |
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | int bfin_gpiolib_gpio_request(struct gpio_chip *chip, unsigned gpio) | 1312 | static int bfin_gpiolib_gpio_request(struct gpio_chip *chip, unsigned gpio) |
1313 | { | 1313 | { |
1314 | return bfin_gpio_request(gpio, chip->label); | 1314 | return bfin_gpio_request(gpio, chip->label); |
1315 | } | 1315 | } |
1316 | 1316 | ||
1317 | void bfin_gpiolib_gpio_free(struct gpio_chip *chip, unsigned gpio) | 1317 | static void bfin_gpiolib_gpio_free(struct gpio_chip *chip, unsigned gpio) |
1318 | { | 1318 | { |
1319 | return bfin_gpio_free(gpio); | 1319 | return bfin_gpio_free(gpio); |
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | static int bfin_gpiolib_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) | ||
1323 | { | ||
1324 | return gpio + GPIO_IRQ_BASE; | ||
1325 | } | ||
1326 | |||
1322 | static struct gpio_chip bfin_chip = { | 1327 | static struct gpio_chip bfin_chip = { |
1323 | .label = "Blackfin-GPIOlib", | 1328 | .label = "BFIN-GPIO", |
1324 | .direction_input = bfin_gpiolib_direction_input, | 1329 | .direction_input = bfin_gpiolib_direction_input, |
1325 | .get = bfin_gpiolib_get_value, | 1330 | .get = bfin_gpiolib_get_value, |
1326 | .direction_output = bfin_gpiolib_direction_output, | 1331 | .direction_output = bfin_gpiolib_direction_output, |
1327 | .set = bfin_gpiolib_set_value, | 1332 | .set = bfin_gpiolib_set_value, |
1328 | .request = bfin_gpiolib_gpio_request, | 1333 | .request = bfin_gpiolib_gpio_request, |
1329 | .free = bfin_gpiolib_gpio_free, | 1334 | .free = bfin_gpiolib_gpio_free, |
1335 | .to_irq = bfin_gpiolib_gpio_to_irq, | ||
1330 | .base = 0, | 1336 | .base = 0, |
1331 | .ngpio = MAX_BLACKFIN_GPIOS, | 1337 | .ngpio = MAX_BLACKFIN_GPIOS, |
1332 | }; | 1338 | }; |