From e876f4df6d240bd2e319b1e63be95a625f049a97 Mon Sep 17 00:00:00 2001 From: Lorenzo Miori Date: Tue, 10 Sep 2013 22:48:34 +0200 Subject: Samsung YP-R1 target port This is the basic port to the new target Samsung YP-R1, which runs on a similar platform as YP-R0. Port is usable, although there are still some optimizations that have to be done. Change-Id: If83a8e386369e413581753780c159026d9e41f04 --- firmware/target/hosted/samsungypr/gpio_ypr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'firmware/target/hosted/samsungypr/gpio_ypr.c') diff --git a/firmware/target/hosted/samsungypr/gpio_ypr.c b/firmware/target/hosted/samsungypr/gpio_ypr.c index 40855fba41..1782d4cfe4 100644 --- a/firmware/target/hosted/samsungypr/gpio_ypr.c +++ b/firmware/target/hosted/samsungypr/gpio_ypr.c @@ -6,7 +6,7 @@ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * - * Module wrapper for GPIO, using /dev/r0GPIO (r0Gpio.ko) of Samsung YP-R0 + * Module wrapper for GPIO, using kernel module of Samsung YP-R0/YP-R1 * * Copyright (c) 2011 Lorenzo Miori * @@ -26,23 +26,23 @@ #include /* includes common ioctl device definitions */ #include -static int r0_gpio_dev = 0; +static int gpio_dev = 0; void gpio_init(void) { - r0_gpio_dev = open("/dev/r0GPIO", O_RDONLY); - if (r0_gpio_dev < 0) - printf("/dev/r0GPIO open error!"); + gpio_dev = open(GPIO_DEVICE, O_RDONLY); + if (gpio_dev < 0) + printf("GPIO device open error!"); } void gpio_close(void) { - if (r0_gpio_dev >= 0) - close(r0_gpio_dev); + if (gpio_dev >= 0) + close(gpio_dev); } int gpio_control(int request, int num, int mode, int val) { struct gpio_info r = { .num = num, .mode = mode, .val = val, }; - return ioctl(r0_gpio_dev, request, &r); + return ioctl(gpio_dev, request, &r); } -- cgit v1.2.3