Skip to contentSkip to conversation

HID: mcp2221: add gpiolib dependency

PATCH Applied Arnd Bergmann 4 participants 4 messages Apr 28, 2020 – Apr 29, 2020 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: mcp2221: add gpiolib dependency

Without gpiolib, this driver fails to link:

arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp2221_probe':
hid-mcp2221.c:(.text+0x1b0): undefined reference to `devm_gpiochip_add_data'
arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp_gpio_get':
hid-mcp2221.c:(.text+0x30c): undefined reference to `gpiochip_get_data'

Fixes 328de1c519c5 ("HID: mcp2221: add GPIO functionality support")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -0
index 008bf44bc2c3..d54e7ae80de5 100644
@@ -1155,6 +1155,7 @@ config HID_ALPS
 config HID_MCP2221
 	tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support"
 	depends on USB_HID && I2C
+	depends on GPIOLIB
 	---help---
 	Provides I2C and SMBUS host adapter functionality over USB-HID
 	through MCP2221 device.
Signature · 1 line
2.26.0
Reviewed-by on v1 1/1
#1 lore raw

Thanks Arnd, How about one liner:
depends on USB_HID && I2C && GPIOLIB

Quoted 29 lines · Arnd Bergmann

Without gpiolib, this driver fails to link:

arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp2221_probe':
hid-mcp2221.c:(.text+0x1b0): undefined reference to `devm_gpiochip_add_data'
arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp_gpio_get':
hid-mcp2221.c:(.text+0x30c): undefined reference to `gpiochip_get_data'

Fixes 328de1c519c5 ("HID: mcp2221: add GPIO functionality support")
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -1
index 008bf44bc2c3..d54e7ae80de5 100644
@@ -1155,6 +1155,7 @@ config HID_ALPS
 config HID_MCP2221
        tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support"
        depends on USB_HID && I2C
+       depends on GPIOLIB
        ---help---
        Provides I2C and SMBUS host adapter functionality over USB-HID
        through MCP2221 device.
--

2.26.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

Without gpiolib, this driver fails to link:

arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp2221_probe':
hid-mcp2221.c:(.text+0x1b0): undefined reference to `devm_gpiochip_add_data'
arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp_gpio_get':
hid-mcp2221.c:(.text+0x30c): undefined reference to `gpiochip_get_data'

Fixes 328de1c519c5 ("HID: mcp2221: add GPIO functionality support")
Quoted 4 lines

config HID_MCP2221
tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support" depends on USB_HID && I2C
+ depends on GPIOLIB

These days we can even do select GPIOLIB, but I suppose that would make the driver selectable on platforms with no native GPIO support at all (like UM) so I suppose this is better.

Yours,
Linus Walleij

maintainer Applied
#3 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

Without gpiolib, this driver fails to link:

arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp2221_probe':
hid-mcp2221.c:(.text+0x1b0): undefined reference to `devm_gpiochip_add_data'
arm-linux-gnueabi-ld: drivers/hid/hid-mcp2221.o: in function `mcp_gpio_get':
hid-mcp2221.c:(.text+0x30c): undefined reference to `gpiochip_get_data'

Fixes 328de1c519c5 ("HID: mcp2221: add GPIO functionality support")

Applied, thanks Arnd.

Signature · 2 lines
Jiri Kosina
SUSE Labs