Thread (8 messages) flat view 8 messages, 2 authors, 2013-08-14
DORMANTno replies

[PATCH 2/2] arm: mach-imx: anatop: add two APIs for USB driver

From: Shawn Guo <hidden>
Date: 2013-08-14 06:32:38

On Wed, Aug 14, 2013 at 11:50:07AM +0800, Peter Chen wrote:
quoted
quoted
+void imx_anatop_usb1_disconnect_line(bool enable)
+{
+	if (enable)
+		regmap_write(anatop, ANADIG_USB1_LOOPBACK,
+			BM_ANADIG_USB1_LOOPBACK_UTMI_DIG_TST1 |
+				BM_ANADIG_USB1_LOOPBACK_TSTI_TX_EN);
+	else
+		regmap_write(anatop, ANADIG_USB1_LOOPBACK, 0);
+}
+EXPORT_SYMBOL(imx_anatop_usb1_disconnect_line);
+
+void imx_anatop_set_stop_mode_config(bool enable)
+{
+	regmap_write(anatop, ANADIG_ANA_MISC0 +
+		(enable ? REG_SET : REG_CLR),
+			BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG);
+}
+EXPORT_SYMBOL(imx_anatop_set_stop_mode_config);
+
Where do you want to call these two functions from?
From USB driver, the usb driver is possible built as module.
I do not think it's appropriate have device driver directly call into
platform level functions.

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