summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2ba27e2)
Recent Linux maps GPIOs from 1023 downwards so do not limit the number
to 1000.
This should fix #183.
Change-Id: I6d4f493b670be9ed9b82759f0fb686a9faddbbf5
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/4502
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
/*
* Helper func to determine if gpio number valid
*
/*
* Helper func to determine if gpio number valid
*
- * Assume here that there will be less than 1000 gpios on a system
+ * Assume here that there will be less than 10000 gpios on a system
*/
static int is_gpio_valid(int gpio)
{
*/
static int is_gpio_valid(int gpio)
{
- return gpio >= 0 && gpio < 1000;
+ return gpio >= 0 && gpio < 10000;
*/
static void unexport_sysfs_gpio(int gpio)
{
*/
static void unexport_sysfs_gpio(int gpio)
{
if (!is_gpio_valid(gpio))
return;
if (!is_gpio_valid(gpio))
return;
static int setup_sysfs_gpio(int gpio, int is_output, int init_high)
{
char buf[40];
static int setup_sysfs_gpio(int gpio, int is_output, int init_high)
{
char buf[40];
int ret;
if (!is_gpio_valid(gpio))
int ret;
if (!is_gpio_valid(gpio))