Skip to contentSkip to conversation

gpiolib: output basic details and consolidate gpio device drivers

PATCH In review Hartmut Knaack 2 participants 2 messages Nov 5, 2011 – Nov 6, 2011 GPIO

lore
Share & tools
lore
#0 lore raw

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.

-------------------------------------------------------------

drivers/gpio/gpiolib.c +4 -0
index a971e3d..d919ac6 100644
@@ -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:
#1 lore raw
Quoted 4 lines · Hartmut Knaack

This patch adds a kernel message, containing GPIO range and device name on successful device registration.

-------------------------------------------------------------

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
index a971e3d..d919ac6 100644
@@ -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: