Re: [RFC/PATCHv2 2/4] arm: omap: gpio: implement set_debounce method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Mar 31, 2010 at 06:21:58PM +0200, ext Mark Brown wrote:
On Wed, Mar 31, 2010 at 06:35:10PM +0300, Felipe Balbi wrote:
+	if (debounce) {
+		val |= l;
+		if (cpu_is_omap34xx() || cpu_is_omap44xx())
+			clk_enable(bank->dbck);
+	} else {
+		val &= ~l;
+		if (cpu_is_omap34xx() || cpu_is_omap44xx())
+			clk_disable(bank->dbck);
+	}

Will these do the right thing with the clocks for noop transitions or
tweaks to the debounce time?  I'm not familiar with the OMAP clock
framework, it could handle this.

good catch. We need to be a bit smarter here. I'll leave that for tomorrow. already 19:30 :-p

maybe adding a flag to gpio_bank that gets set when we first enable the debounce clock and then we:

if (debounce) {
	if (!bank->dbck_enabled && (cpu_is_omap34xx() || cpu_is_omap44xx())) {
		clk_enable(bank->dbck);
		bank->dbck_enabled = true;
	}
} else {
	if (bank->dbck_enabled && (cpu_is_omap34xx() || cpu_is_omap44xx())) {
		clk_enable(bank->dbck);
		bank->dbck_enabled = false;
	}
}

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux