[PATCH 1/5] OMAP2/3: mcbsp: Check McBSP port number in CLKR/FSR mux callback

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

 



CLKR/FSR mux is only possible on port 1.
Make sure that we only change the mux if the call is made with the
correct mcbsp device.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
---
 arch/arm/mach-omap2/mcbsp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 829f4c7..269765c 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -38,8 +38,13 @@
 static int omap2_mcbsp1_mux_rx_clk(struct device *dev, const char *signal,
 				   const char *src)
 {
+	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
 	u32 v;
 
+	/* Only McBSP1 have 6 pin configuration (CLKR/FSR source selectable) */
+	if (mcbsp->id != 0)
+		return -EINVAL;
+
 	v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
 
 	if (!strcmp(signal, "clkr")) {
-- 
1.7.8.1

--
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