Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132645104
D30287.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
553 B
Referenced Files
None
Subscribers
None
D30287.diff
View Options
diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c
--- a/sys/arm64/rockchip/rk_gpio.c
+++ b/sys/arm64/rockchip/rk_gpio.c
@@ -209,14 +209,17 @@
rk_gpio_pin_getname(device_t dev, uint32_t pin, char *name)
{
struct rk_gpio_softc *sc;
+ uint32_t bank;
sc = device_get_softc(dev);
if (pin >= 32)
return (EINVAL);
+ bank = pin / 8;
+ pin = pin - (bank * 8);
RK_GPIO_LOCK(sc);
- snprintf(name, GPIOMAXNAME, "gpio%d", pin);
+ snprintf(name, GPIOMAXNAME, "P%c%d", bank + 'A', pin);
RK_GPIO_UNLOCK(sc);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 19, 5:22 PM (15 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23934285
Default Alt Text
D30287.diff (553 B)
Attached To
Mode
D30287: arm64: rockchip: gpio: Give friendlier name to gpio
Attached
Detach File
Event Timeline
Log In to Comment