gpio: Add support for GPIO names for several ISA_BUS_API drivers
Subsystems (6)
cover gpio: Add support for GPIO names for several ISA_BUS_API drivers
This patchset sets the gpio_chip names option of several ISA_BUS_API GPIO drivers with an array of GPIO line names that match their respective manual documentation. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on their device.
William Breathitt Gray (5):
gpio: 104-dio-48e: Add support for GPIO names
gpio: 104-idi-48: Add support for GPIO names
gpio: 104-idio-16: Add support for GPIO names
gpio: gpio-mm: Add support for GPIO names
gpio: ws16c48: Add support for GPIO names
drivers/gpio/gpio-104-dio-48e.c | 23 ++++++++++++++++++++++- drivers/gpio/gpio-104-idi-48.c | 15 ++++++++++++++- drivers/gpio/gpio-104-idio-16.c | 11 ++++++++++- drivers/gpio/gpio-gpio-mm.c | 15 ++++++++++++++- drivers/gpio/gpio-ws16c48.c | 19 ++++++++++++++++++- 5 files changed, 78 insertions(+), 5 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/5 gpio: 104-dio-48e: Add support for GPIO names
This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the ACCES 104-DIO-48E. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device.
--- drivers/gpio/gpio-104-dio-48e.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
drivers/gpio/gpio-104-dio-48e.c +22 -1
@@ -338,6 +338,26 @@ static irqreturn_t dio48e_irq_handler(int irq, void *dev_id)return IRQ_HANDLED ; } +#define DIO48E_NGPIO 48 +static const char *dio48e_names[DIO48E_NGPIO ] = { +"PPI Group 0 Port A 0" ,"PPI Group 0 Port A 1" ,"PPI Group 0 Port A 2" , +"PPI Group 0 Port A 3" ,"PPI Group 0 Port A 4" ,"PPI Group 0 Port A 5" , +"PPI Group 0 Port A 6" ,"PPI Group 0 Port A 7" ,"PPI Group 0 Port B 0" , +"PPI Group 0 Port B 1" ,"PPI Group 0 Port B 2" ,"PPI Group 0 Port B 3" , +"PPI Group 0 Port B 4" ,"PPI Group 0 Port B 5" ,"PPI Group 0 Port B 6" , +"PPI Group 0 Port B 7" ,"PPI Group 0 Port C 0" ,"PPI Group 0 Port C 1" , +"PPI Group 0 Port C 2" ,"PPI Group 0 Port C 3" ,"PPI Group 0 Port C 4" , +"PPI Group 0 Port C 5" ,"PPI Group 0 Port C 6" ,"PPI Group 0 Port C 7" , +"PPI Group 1 Port A 0" ,"PPI Group 1 Port A 1" ,"PPI Group 1 Port A 2" , +"PPI Group 1 Port A 3" ,"PPI Group 1 Port A 4" ,"PPI Group 1 Port A 5" , +"PPI Group 1 Port A 6" ,"PPI Group 1 Port A 7" ,"PPI Group 1 Port B 0" , +"PPI Group 1 Port B 1" ,"PPI Group 1 Port B 2" ,"PPI Group 1 Port B 3" , +"PPI Group 1 Port B 4" ,"PPI Group 1 Port B 5" ,"PPI Group 1 Port B 6" , +"PPI Group 1 Port B 7" ,"PPI Group 1 Port C 0" ,"PPI Group 1 Port C 1" , +"PPI Group 1 Port C 2" ,"PPI Group 1 Port C 3" ,"PPI Group 1 Port C 4" , +"PPI Group 1 Port C 5" ,"PPI Group 1 Port C 6" ,"PPI Group 1 Port C 7" +}; +static int dio48e_probe (struct device *dev,unsigned int id) {struct dio48e_gpio *dio48egpio;
@@ -358,7 +378,8 @@ static int dio48e_probe(struct device *dev, unsigned int id) dio48egpio->chip.parent = dev; dio48egpio->chip.owner =THIS_MODULE ; dio48egpio->chip.base =-1 ; - dio48egpio->chip.ngpio =48 ; + dio48egpio->chip.ngpio =DIO48E_NGPIO ; + dio48egpio->chip.names = dio48e_names; dio48egpio->chip.get_direction = dio48e_gpio_get_direction; dio48egpio->chip.direction_input = dio48e_gpio_direction_input; dio48egpio->chip.direction_output = dio48e_gpio_direction_output;
Signature · 1 line
2.11.0
PATCH 2/5 gpio: 104-idi-48: Add support for GPIO names
In reply to William Breathitt GrayThis patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the ACCES 104-IDI-48. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device.
--- drivers/gpio/gpio-104-idi-48.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpio/gpio-104-idi-48.c +14 -1
@@ -217,6 +217,18 @@ static irqreturn_t idi_48_irq_handler(int irq, void *dev_id)return IRQ_HANDLED ; } +#define IDI48_NGPIO 48 +static const char *idi48_names[IDI48_NGPIO ] = { +"Bit 0 A" ,"Bit 1 A" ,"Bit 2 A" ,"Bit 3 A" ,"Bit 4 A" ,"Bit 5 A" , +"Bit 6 A" ,"Bit 7 A" ,"Bit 8 A" ,"Bit 9 A" ,"Bit 10 A" ,"Bit 11 A" , +"Bit 12 A" ,"Bit 13 A" ,"Bit 14 A" ,"Bit 15 A" ,"Bit 16 A" ,"Bit 17 A" , +"Bit 18 A" ,"Bit 19 A" ,"Bit 20 A" ,"Bit 21 A" ,"Bit 22 A" ,"Bit 23 A" , +"Bit 0 B" ,"Bit 1 B" ,"Bit 2 B" ,"Bit 3 B" ,"Bit 4 B" ,"Bit 5 B" , +"Bit 6 B" ,"Bit 7 B" ,"Bit 8 B" ,"Bit 9 B" ,"Bit 10 B" ,"Bit 11 B" , +"Bit 12 B" ,"Bit 13 B" ,"Bit 14 B" ,"Bit 15 B" ,"Bit 16 B" ,"Bit 17 B" , +"Bit 18 B" ,"Bit 19 B" ,"Bit 20 B" ,"Bit 21 B" ,"Bit 22 B" ,"Bit 23 B" +}; +static int idi_48_probe (struct device *dev,unsigned int id) {struct idi_48_gpio *idi48gpio;
@@ -237,7 +249,8 @@ static int idi_48_probe(struct device *dev, unsigned int id) idi48gpio->chip.parent = dev; idi48gpio->chip.owner =THIS_MODULE ; idi48gpio->chip.base =-1 ; - idi48gpio->chip.ngpio =48 ; + idi48gpio->chip.ngpio =IDI48_NGPIO ; + idi48gpio->chip.names = idi48_names; idi48gpio->chip.get_direction = idi_48_gpio_get_direction; idi48gpio->chip.direction_input = idi_48_gpio_direction_input; idi48gpio->chip.get = idi_48_gpio_get;
Signature · 1 line
2.11.0
PATCH 3/5 gpio: 104-idio-16: Add support for GPIO names
In reply to William Breathitt GrayThis patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the ACCES 104-IDIO-16. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device.
--- drivers/gpio/gpio-104-idio-16.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpio/gpio-104-idio-16.c +10 -1
@@ -210,6 +210,14 @@ static irqreturn_t idio_16_irq_handler(int irq, void *dev_id)return IRQ_HANDLED ; } +#define IDIO_16_NGPIO 32 +static const char *idio_16_names[IDIO_16_NGPIO ] = { +"OUT0" ,"OUT1" ,"OUT2" ,"OUT3" ,"OUT4" ,"OUT5" ,"OUT6" ,"OUT7" , +"OUT8" ,"OUT9" ,"OUT10" ,"OUT11" ,"OUT12" ,"OUT13" ,"OUT14" ,"OUT15" , +"IIN0" ,"IIN1" ,"IIN2" ,"IIN3" ,"IIN4" ,"IIN5" ,"IIN6" ,"IIN7" , +"IIN8" ,"IIN9" ,"IIN10" ,"IIN11" ,"IIN12" ,"IIN13" ,"IIN14" ,"IIN15" +}; +static int idio_16_probe (struct device *dev,unsigned int id) {struct idio_16_gpio *idio16gpio;
@@ -230,7 +238,8 @@ static int idio_16_probe(struct device *dev, unsigned int id) idio16gpio->chip.parent = dev; idio16gpio->chip.owner =THIS_MODULE ; idio16gpio->chip.base =-1 ; - idio16gpio->chip.ngpio =32 ; + idio16gpio->chip.ngpio =IDIO_16_NGPIO ; + idio16gpio->chip.names = idio_16_names; idio16gpio->chip.get_direction = idio_16_gpio_get_direction; idio16gpio->chip.direction_input = idio_16_gpio_direction_input; idio16gpio->chip.direction_output = idio_16_gpio_direction_output;
Signature · 1 line
2.11.0
PATCH 4/5 gpio: gpio-mm: Add support for GPIO names
In reply to William Breathitt GrayThis patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the Diamond Systems GPIO-MM. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device.
--- drivers/gpio/gpio-gpio-mm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpio/gpio-gpio-mm.c +14 -1
@@ -230,6 +230,18 @@ static void gpiomm_gpio_set_multiple(struct gpio_chip *chip, } } +#define GPIOMM_NGPIO 48 +static const char *gpiomm_names[GPIOMM_NGPIO ] = { +"Port 1A0" ,"Port 1A1" ,"Port 1A2" ,"Port 1A3" ,"Port 1A4" ,"Port 1A5" , +"Port 1A6" ,"Port 1A7" ,"Port 1B0" ,"Port 1B1" ,"Port 1B2" ,"Port 1B3" , +"Port 1B4" ,"Port 1B5" ,"Port 1B6" ,"Port 1B7" ,"Port 1C0" ,"Port 1C1" , +"Port 1C2" ,"Port 1C3" ,"Port 1C4" ,"Port 1C5" ,"Port 1C6" ,"Port 1C7" , +"Port 2A0" ,"Port 2A1" ,"Port 2A2" ,"Port 2A3" ,"Port 2A4" ,"Port 2A5" , +"Port 2A6" ,"Port 2A7" ,"Port 2B0" ,"Port 2B1" ,"Port 2B2" ,"Port 2B3" , +"Port 2B4" ,"Port 2B5" ,"Port 2B6" ,"Port 2B7" ,"Port 2C0" ,"Port 2C1" , +"Port 2C2" ,"Port 2C3" ,"Port 2C4" ,"Port 2C5" ,"Port 2C6" ,"Port 2C7" , +}; +static int gpiomm_probe (struct device *dev,unsigned int id) {struct gpiomm_gpio *gpiommgpio;
@@ -250,7 +262,8 @@ static int gpiomm_probe(struct device *dev, unsigned int id) gpiommgpio->chip.parent = dev; gpiommgpio->chip.owner =THIS_MODULE ; gpiommgpio->chip.base =-1 ; - gpiommgpio->chip.ngpio =48 ; + gpiommgpio->chip.ngpio =GPIOMM_NGPIO ; + gpiommgpio->chip.names = gpiomm_names; gpiommgpio->chip.get_direction = gpiomm_gpio_get_direction; gpiommgpio->chip.direction_input = gpiomm_gpio_direction_input; gpiommgpio->chip.direction_output = gpiomm_gpio_direction_output;
Signature · 1 line
2.11.0
PATCH 5/5 gpio: ws16c48: Add support for GPIO names
In reply to William Breathitt GrayThis patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the WinSystems WS16C48. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device.
--- drivers/gpio/gpio-ws16c48.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/gpio/gpio-ws16c48.c +18 -1
@@ -341,6 +341,22 @@ static irqreturn_t ws16c48_irq_handler(int irq, void *dev_id)return IRQ_HANDLED ; } +#define WS16C48_NGPIO 48 +static const char *ws14c48_names[WS16C48_NGPIO ] = { +"Port 0 Bit 0" ,"Port 0 Bit 1" ,"Port 0 Bit 2" ,"Port 0 Bit 3" , +"Port 0 Bit 4" ,"Port 0 Bit 5" ,"Port 0 Bit 6" ,"Port 0 Bit 7" , +"Port 1 Bit 0" ,"Port 1 Bit 1" ,"Port 1 Bit 2" ,"Port 1 Bit 3" , +"Port 1 Bit 4" ,"Port 1 Bit 5" ,"Port 1 Bit 6" ,"Port 1 Bit 7" , +"Port 2 Bit 0" ,"Port 2 Bit 1" ,"Port 2 Bit 2" ,"Port 2 Bit 3" , +"Port 2 Bit 4" ,"Port 2 Bit 5" ,"Port 2 Bit 6" ,"Port 2 Bit 7" , +"Port 3 Bit 0" ,"Port 3 Bit 1" ,"Port 3 Bit 2" ,"Port 3 Bit 3" , +"Port 3 Bit 4" ,"Port 3 Bit 5" ,"Port 3 Bit 6" ,"Port 3 Bit 7" , +"Port 4 Bit 0" ,"Port 4 Bit 1" ,"Port 4 Bit 2" ,"Port 4 Bit 3" , +"Port 4 Bit 4" ,"Port 4 Bit 5" ,"Port 4 Bit 6" ,"Port 4 Bit 7" , +"Port 5 Bit 0" ,"Port 5 Bit 1" ,"Port 5 Bit 2" ,"Port 5 Bit 3" , +"Port 5 Bit 4" ,"Port 5 Bit 5" ,"Port 5 Bit 6" ,"Port 5 Bit 7" +}; +static int ws16c48_probe (struct device *dev,unsigned int id) {struct ws16c48_gpio *ws16c48gpio;
@@ -361,7 +377,8 @@ static int ws16c48_probe(struct device *dev, unsigned int id) ws16c48gpio->chip.parent = dev; ws16c48gpio->chip.owner =THIS_MODULE ; ws16c48gpio->chip.base =-1 ; - ws16c48gpio->chip.ngpio =48 ; + ws16c48gpio->chip.ngpio =WS16C48_NGPIO ; + ws16c48gpio->chip.names = ws16c48_names; ws16c48gpio->chip.get_direction = ws16c48_gpio_get_direction; ws16c48gpio->chip.direction_input = ws16c48_gpio_direction_input; ws16c48gpio->chip.direction_output = ws16c48_gpio_direction_output;
Signature · 1 line
2.11.0
kbuild test robot
build botRe: [PATCH 5/5] gpio: ws16c48: Add support for GPIO names
reproduce:
Hi William,
[auto build test ERROR on gpio/for-next]
[also build test ERROR on next-20170130]
[cannot apply to v4.10-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/William-Breathitt-Gray/gpio-Add-support-for-GPIO-names-for-several-ISA_BUS_API-drivers/20170131-013038 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next config: i386-randconfig-x003-201705 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/gpio/gpio-ws16c48.c: In function 'ws16c48_probe':
>> drivers/gpio/gpio-ws16c48.c:381:28: error: 'ws16c48_names' undeclared (first use in this function)
ws16c48gpio->chip.names = ws16c48_names;
^~~~~~~~~~~~~
drivers/gpio/gpio-ws16c48.c:381:28: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/gpio/gpio-ws16c48.c:345:20: warning: 'ws14c48_names' defined but not used [-Wunused-variable]
static const char *ws14c48_names[WS16C48_NGPIO] = {
^~~~~~~~~~~~~vim +/ws16c48_names +381 drivers/gpio/gpio-ws16c48.c
375
376 ws16c48gpio->chip.label = name;
377 ws16c48gpio->chip.parent = dev;
378 ws16c48gpio->chip.owner = THIS_MODULE;
379 ws16c48gpio->chip.base = -1;
380 ws16c48gpio->chip.ngpio = WS16C48_NGPIO;
> 381 ws16c48gpio->chip.names = ws16c48_names;
382 ws16c48gpio->chip.get_direction = ws16c48_gpio_get_direction;
383 ws16c48gpio->chip.direction_input = ws16c48_gpio_direction_input;
384 ws16c48gpio->chip.direction_output = ws16c48_gpio_direction_output;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation