Thread (1 message) 1 message, 1 author, 2012-11-17

[PATCH v2 1/3] power: Add simple poweroff-gpio driver

From: andrew@lunn.ch (Andrew Lunn)
Date: 2012-11-17 08:34:34
Also in: linux-devicetree

quoted
+ * Hold configuration here, cannot be more than one instance of the driver
+ * since pm_power_off itself is global.
+ */
+static int gpio_num = -1;
+static int gpio_active_low;
+
+static void gpio_poweroff_do_poweroff(void)
+{
+	BUG_ON(gpio_num == -1);
+
+	/* drive it active */
+	gpio_direction_output(gpio_num, !gpio_active_low);
+	mdelay(100);
+	/* rising edge or drive inactive */
+	gpio_set_value(gpio_num, gpio_active_low);
+	mdelay(100);
+	/* falling edge */
+	gpio_set_value(gpio_num, !gpio_active_low);
+
+	/* give it some time */
+	mdelay(100);
On the IB-NAS 6210 I need to increase this delay to a whopping 3000
milliseconds to suppress the warning (2000 is not enough).  Is it
acceptable to increase this to such a high value or do we need
another solution?
Hi Simon

It is interesting how slow these things are at turning off. I already
had to increase it once from 10ms for the DNSKW.

So i will increase it to 3000 in the next spin of the patches.

Thanks

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