Hi, Linus On 10/22/2015 04:32 PM, Linus Walleij wrote: > A new chardev that is to be used for userspace GPIO access is [...] > diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h > new file mode 100644 > index 000000000000..3188a87bdaa0 > --- /dev/null > +++ b/include/uapi/linux/gpio.h > @@ -0,0 +1,28 @@ > +/* > + * <linux/gpio.h> - userspace ABI for the GPIO character devices > + * > + * Copyright (C) 2015 Linus Walleij > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 as published by > + * the Free Software Foundation. > + */ > +#ifndef _UAPI_GPIO_H_ > +#define _UAPI_GPIO_H_ > + > +#include <linux/ioctl.h> > +#include <linux/types.h> > + > +/** > + * struct gpiochip_info - Information about a certain GPIO chip > + * @name: the name of this GPIO chip > + * @lines: number of GPIO lines on this chip > + */ > +struct gpiochip_info { > + char name[32]; > + __u32 lines; > +}; > + > +#define GPIO_GET_CHIPINFO_IOCTL _IOR('o', 0x01, struct gpiochip_info) I am trying to use this interface to do my gpio mockup test. I need to list all the gpiochips attach to one gpio driver(aka gpio-mockup, there may be more than one gpio drivers in the system). And then test some of the pin of each gpio_chip. >From the api(ioctl GPIO_GET_CHIPINFO_IOCTL: gpiochip_info), it seems that I could list all the gpiochips or list only one gpiochip. But I could not list gpiochip belongs to one gpio driver. Do I understand correctly? Will we add a new api to do it? Regards Bamvor > + > +#endif /* _UAPI_GPIO_H_ */ > -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html