[Patch v3] Fix audmuxv2 debugfs indexing.
Bill Pringlemeir
bpringle at sympatico.ca
Mon Nov 15 10:24:42 EST 2010
On 15 Nov 2010, bpringle at sympatico.ca wrote:
> Following is the simple patch which corrects improper file indexing of
> audmux port numbers. Ie, ssi6, ssi7. It also adds the ssi0 file.
> The directory looks like this,
> root at uclibc /sys/kernel/debug/audmux$ ls
> ssi0 ssi1 ssi2 ssi3 ssi4 ssi5
The attached incremental patch changes the audmux v2 file naming to
correspond to the names used within the file.
root at uclibc /sys/kernel/debug/audmux$ ls
SSI3 SSI4 SSI5 SSI6 imx-ssi.0 imx-ssi.1
root at uclibc /sys/kernel/debug/audmux$ cat imx-ssi.1
PDCR: 00008000
PTCR: a5000800
TxFS output from SSI5, TxClk output from SSI5
Port is symmetric
Data received from SSI5
The file 'imx-ssi.1' was 'ssi1'. Here, the imx-ssi.1 driver is
connected to audmux pin set 5. Perhaps 'audmux[3-5]' are better names
than SSI[3-5], if we are updating the naming scheme. I think the
upper case names shout hardware loud enough.
Signed-off-by: Bill Pringlemeir <bpringle at sympatico.ca>
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index 2a1021f..8157704 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -142,7 +142,6 @@ static const struct file_operations audmux_debugfs_fops = {
static void audmux_debugfs_init(void)
{
int i;
- char buf[20];
audmux_debugfs_root = debugfs_create_dir("audmux", NULL);
if (!audmux_debugfs_root) {
@@ -151,8 +150,8 @@ static void audmux_debugfs_init(void)
}
for (i = 0; i < 6; i++) {
- snprintf(buf, sizeof(buf), "ssi%d", i);
- if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
+ if (!debugfs_create_file(audmux_port_string(i), 0444,
+ audmux_debugfs_root,
(void *)i, &audmux_debugfs_fops))
pr_warning("Failed to create AUDMUX port %d debugfs file\n",
i);
More information about the linux-arm-kernel
mailing list