mirror of
https://bitbucket.org/gwenhael/cubietruck-slackware.git
synced 2024-12-25 21:58:38 +01:00
GPIO Patch to create device according to linux/documentation/gpio.txt
This commit is contained in:
parent
836140fa52
commit
c1ca9f36ef
1 changed files with 17 additions and 0 deletions
17
patch/gpio.patch
Normal file
17
patch/gpio.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- a/drivers/gpio/gpio-sunxi.c
|
||||
+++ b/drivers/gpio/gpio-sunxi.c
|
||||
@@ -182,11 +182,9 @@ static int sunxi_gpio_request(struct gpio_chip *chip, unsigned offset)
|
||||
if ((offset > chip->ngpio - 1) || (offset < 0))
|
||||
return -EINVAL;
|
||||
|
||||
- /* Set sysfs exported gpio name (example "gpio254_ph20") */
|
||||
- sprintf((char *)(chip->names[offset]), "gpio%d_p%c%d",
|
||||
- offset+chip->base,
|
||||
- 'a'+sgpio->data[offset].info.port-1,
|
||||
- sgpio->data[offset].info.port_num);
|
||||
+ /* Set sysfs exported gpio name (example "gpio254") */
|
||||
+ sprintf((char *)(chip->names[offset]), "gpio%d",
|
||||
+ offset+chip->base);
|
||||
|
||||
sgpio->data[offset].gpio_handler = gpio_request_ex("gpio_para",
|
||||
sgpio->data[offset].pin_name);
|
Loading…
Reference in a new issue