RE: [RFC PATCH] Board support for the the GPIO keys
From: Gadiyar, Anand <hidden>
Date: 2010-08-19 11:47:11
Also in:
linux-omap
From: Gadiyar, Anand <hidden>
Date: 2010-08-19 11:47:11
Also in:
linux-omap
Datta, Shubhrajyoti wrote:
Subject: [RFC PATCH] Board support for the the GPIO keys
Please tag $SUBJECT with something like "omap: 4430sdp: "
Board support for the GPIO keys. The proximity sensor is connected to GPIO and is registered as a GPIO key. Signed-off-by: Shubhrajyoti D <redacted>
...
+static void omap_sfh7741prox_init(void)
+{
+ int error;
+
+ error = gpio_request(OMAP4_SFH7741_ENABLE_GPIO, "sfh7741");
+ if (error < 0) {
+ pr_err("failed to request GPIO %d, error %d\n",
+ OMAP4_SFH7741_ENABLE_GPIO, error);
+ return;
+ }
+
+ error = gpio_direction_output(OMAP4_SFH7741_ENABLE_GPIO , 1);
+ if (error < 0) {
+ pr_err("%s: GPIO configuration failed: GPIO %d,error %d\n",\
+ __func__, OMAP4_SFH7741_ENABLE_GPIO, error);That trailing '\' is unnecessary.