gpiolib: output basic details and consolidate gpio device drivers
PATCH 1/2 gpiolib: output basic details and consolidate gpio device drivers
This patch adds a kernel message, containing GPIO range and device name on successful device registration.
Signed-off-by Hartmut Knaack <[email protected]>
-------------------------------------------------------------
drivers/gpio/gpiolib.c +4 -0
@@ -1088,6 +1088,10 @@ unlock: status =gpiochip_export (chip);if (status) goto fail; + +pr_info ("gpiochip_add: registered GPIOs %d to %d on device: %s\n" , + chip->base, chip->base + chip->ngpio -1 , + chip->label ? :"generic" );return 0 ; fail:
Quoted 4 lines · Hartmut Knaack
This patch adds a kernel message, containing GPIO range and device name on successful device registration.
Signed-off-by Hartmut Knaack <[email protected]>-------------------------------------------------------------
For next time; the divider between commit text and patch must be exactly 3 '-' characters long, no more, no less. Otherwise the tools don't handle it properly.
drivers/gpio/gpiolib.c unlock: · line 1091
Quoted 9 lines
drivers/gpio/gpiolib.c +1
-0@@ -1088,6 +1088,10 @@ unlock: status =gpiochip_export (chip);if (status) goto fail; +
Whitespace error.
Otherwise looks good. I'm picking it up and squashing it together with the second patch.
Quoted 7 lines
drivers/gpio/gpiolib.c +3
-0+pr_info ("gpiochip_add: registered GPIOs %d to %d on device: %s\n" , + chip->base, chip->base + chip->ngpio -1 , + chip->label ? :"generic" );return 0 ; fail: