Thread (32 messages) 32 messages, 5 authors, 2011-02-17
STALE5596d
Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v2 [diff vs current]
  4. v2 current

[PATCH v2 7/7] ARM: mxs/mx28evk: add mmc device

From: Shawn Guo <hidden>
Date: 2011-02-15 23:11:46
Also in: linux-mmc

On Mon, Feb 14, 2011 at 11:26:46AM +0100, Wolfram Sang wrote:
Shawn,
quoted
+/* mmc */
+static void __init mx28evk_mmc_slot_poweron(int gpio)
+{
+	int ret;
+
+	ret = gpio_request(gpio, "mmc-slot-power");
+	if (ret) {
+		pr_err("Failed to request gpio mmc-slot-power: %d\n", ret);
+		return;
+	}
+
+	ret = gpio_direction_output(gpio, 0);
+	if (ret) {
+		pr_err("Failed to drive gpio mmc-slot-power: %d\n", ret);
+		return;
+	}
+}
Minor nit: You could use gpio_request_one(), and doing so maybe even get rid of
this function and simply do it the init-function. The advantage would be, that
you can name the two GPIOs independently.
OK. Will take it.

Thanks,
Shawn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help