* [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
@ 2023-03-24 16:10 Richard Fitzgerald
2023-03-25 3:01 ` kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: Richard Fitzgerald @ 2023-03-24 16:10 UTC (permalink / raw)
To: broonie
Cc: patches, linux-kernel, alsa-devel, Simon Trimmer, Richard Fitzgerald
From: Simon Trimmer <simont@opensource.cirrus.com>
The file named 'controls' in the DSP's debugfs root contains a
formatted table describing the controls defined within the loaded DSP
firmware, it is of the form
name: len region:offset addr fwname algid ctltype flags en dirty
Where flags is represented as a character for each flag if set, or '-',
enabled is whether the control is enabled or disabled and dirty is
whether the control value is set in the cache but not the hardware.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
drivers/firmware/cirrus/cs_dsp.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 513136a924cf..faa6402c344d 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -14,6 +14,7 @@
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -457,6 +458,33 @@ static const struct {
},
};
+static int cs_dsp_coeff_base_reg(struct cs_dsp_coeff_ctl *ctl, unsigned int *reg,
+ unsigned int off);
+
+static int cs_dsp_debugfs_read_controls_show(struct seq_file *s, void *ignored)
+{
+ struct cs_dsp *dsp = s->private;
+ struct cs_dsp_coeff_ctl *ctl;
+ unsigned int reg;
+
+ list_for_each_entry(ctl, &dsp->ctl_list, list) {
+ cs_dsp_coeff_base_reg(ctl, ®, 0);
+ seq_printf(s, "%22.*s: %#8lx %s:%08x %#8x %s %#8x %#4x %c%c%c%c %s %s\n",
+ ctl->subname_len, ctl->subname, ctl->len,
+ cs_dsp_mem_region_name(ctl->alg_region.type),
+ ctl->offset, reg, ctl->fw_name, ctl->alg_region.alg, ctl->type,
+ ctl->flags & WMFW_CTL_FLAG_VOLATILE ? 'V' : '-',
+ ctl->flags & WMFW_CTL_FLAG_SYS ? 'S' : '-',
+ ctl->flags & WMFW_CTL_FLAG_READABLE ? 'R' : '-',
+ ctl->flags & WMFW_CTL_FLAG_WRITEABLE ? 'W' : '-',
+ ctl->enabled ? "enabled" : "disabled",
+ ctl->set ? "dirty" : "clean");
+ }
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(cs_dsp_debugfs_read_controls);
+
/**
* cs_dsp_init_debugfs() - Create and populate DSP representation in debugfs
* @dsp: pointer to DSP structure
@@ -479,6 +507,9 @@ void cs_dsp_init_debugfs(struct cs_dsp *dsp, struct dentry *debugfs_root)
debugfs_create_file(cs_dsp_debugfs_fops[i].name, 0444, root,
dsp, &cs_dsp_debugfs_fops[i].fops);
+ debugfs_create_file("controls", 0444, root, dsp,
+ &cs_dsp_debugfs_read_controls_fops);
+
dsp->debugfs_root = root;
}
EXPORT_SYMBOL_NS_GPL(cs_dsp_init_debugfs, FW_CS_DSP);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
2023-03-24 16:10 [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details Richard Fitzgerald
@ 2023-03-25 3:01 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-03-25 3:01 UTC (permalink / raw)
To: Richard Fitzgerald, broonie
Cc: oe-kbuild-all, patches, linux-kernel, alsa-devel, Simon Trimmer,
Richard Fitzgerald
Hi Richard,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc3 next-20230324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Richard-Fitzgerald/firmware-cs_dsp-Add-a-debugfs-entry-containing-control-details/20230325-001218
patch link: https://lore.kernel.org/r/20230324161010.938599-1-rf%40opensource.cirrus.com
patch subject: [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
config: mips-randconfig-r005-20230322 (https://download.01.org/0day-ci/archive/20230325/202303251059.g8YEWRGa-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/62afac6e0c35c0d7e44e0bd1e4b2af8380413164
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Richard-Fitzgerald/firmware-cs_dsp-Add-a-debugfs-entry-containing-control-details/20230325-001218
git checkout 62afac6e0c35c0d7e44e0bd1e4b2af8380413164
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/firmware/cirrus/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303251059.g8YEWRGa-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/firmware/cirrus/cs_dsp.c: In function 'cs_dsp_debugfs_read_controls_show':
>> drivers/firmware/cirrus/cs_dsp.c:471:44: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
471 | seq_printf(s, "%22.*s: %#8lx %s:%08x %#8x %s %#8x %#4x %c%c%c%c %s %s\n",
| ~~~~^
| |
| long unsigned int
| %#8x
472 | ctl->subname_len, ctl->subname, ctl->len,
| ~~~~~~~~
| |
| size_t {aka unsigned int}
vim +471 drivers/firmware/cirrus/cs_dsp.c
459
460 static int cs_dsp_coeff_base_reg(struct cs_dsp_coeff_ctl *ctl, unsigned int *reg,
461 unsigned int off);
462
463 static int cs_dsp_debugfs_read_controls_show(struct seq_file *s, void *ignored)
464 {
465 struct cs_dsp *dsp = s->private;
466 struct cs_dsp_coeff_ctl *ctl;
467 unsigned int reg;
468
469 list_for_each_entry(ctl, &dsp->ctl_list, list) {
470 cs_dsp_coeff_base_reg(ctl, ®, 0);
> 471 seq_printf(s, "%22.*s: %#8lx %s:%08x %#8x %s %#8x %#4x %c%c%c%c %s %s\n",
472 ctl->subname_len, ctl->subname, ctl->len,
473 cs_dsp_mem_region_name(ctl->alg_region.type),
474 ctl->offset, reg, ctl->fw_name, ctl->alg_region.alg, ctl->type,
475 ctl->flags & WMFW_CTL_FLAG_VOLATILE ? 'V' : '-',
476 ctl->flags & WMFW_CTL_FLAG_SYS ? 'S' : '-',
477 ctl->flags & WMFW_CTL_FLAG_READABLE ? 'R' : '-',
478 ctl->flags & WMFW_CTL_FLAG_WRITEABLE ? 'W' : '-',
479 ctl->enabled ? "enabled" : "disabled",
480 ctl->set ? "dirty" : "clean");
481 }
482
483 return 0;
484 }
485 DEFINE_SHOW_ATTRIBUTE(cs_dsp_debugfs_read_controls);
486
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
2023-03-24 16:10 Richard Fitzgerald via Alsa-devel
@ 2023-03-24 21:53 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-03-24 21:53 UTC (permalink / raw)
To: Richard Fitzgerald via Alsa-devel, broonie
Cc: llvm, oe-kbuild-all, patches, linux-kernel, alsa-devel,
Simon Trimmer, Richard Fitzgerald
Hi Richard,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc3 next-20230324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Richard-Fitzgerald-via-Alsa-devel/firmware-cs_dsp-Add-a-debugfs-entry-containing-control-details/20230325-001558
patch link: https://lore.kernel.org/r/167967423036.26.11080959777905296733%40mailman-core.alsa-project.org
patch subject: [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
config: powerpc-randconfig-r001-20230322 (https://download.01.org/0day-ci/archive/20230325/202303250526.oZMat3JD-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/2e31e4948e1f907f41ef4946c6f59426c2206b95
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Richard-Fitzgerald-via-Alsa-devel/firmware-cs_dsp-Add-a-debugfs-entry-containing-control-details/20230325-001558
git checkout 2e31e4948e1f907f41ef4946c6f59426c2206b95
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/firmware/cirrus/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303250526.oZMat3JD-lkp@intel.com/
All warnings (new ones prefixed by >>):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:637:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:77:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:577:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/firmware/cirrus/cs_dsp.c:21:
In file included from include/linux/firmware/cirrus/cs_dsp.h:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:640:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:637:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:79:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:578:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/firmware/cirrus/cs_dsp.c:21:
In file included from include/linux/firmware/cirrus/cs_dsp.h:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:640:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:637:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:579:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/firmware/cirrus/cs_dsp.c:21:
In file included from include/linux/firmware/cirrus/cs_dsp.h:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:640:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:637:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:83:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:580:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/firmware/cirrus/cs_dsp.c:21:
In file included from include/linux/firmware/cirrus/cs_dsp.h:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:640:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:637:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:85:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:581:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/firmware/cirrus/cs_dsp.c:21:
In file included from include/linux/firmware/cirrus/cs_dsp.h:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:640:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:637:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:87:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:582:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/firmware/cirrus/cs_dsp.c:472:39: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
ctl->subname_len, ctl->subname, ctl->len,
^~~~~~~~
7 warnings generated.
vim +472 drivers/firmware/cirrus/cs_dsp.c
459
460 static int cs_dsp_coeff_base_reg(struct cs_dsp_coeff_ctl *ctl, unsigned int *reg,
461 unsigned int off);
462
463 static int cs_dsp_debugfs_read_controls_show(struct seq_file *s, void *ignored)
464 {
465 struct cs_dsp *dsp = s->private;
466 struct cs_dsp_coeff_ctl *ctl;
467 unsigned int reg;
468
469 list_for_each_entry(ctl, &dsp->ctl_list, list) {
470 cs_dsp_coeff_base_reg(ctl, ®, 0);
471 seq_printf(s, "%22.*s: %#8lx %s:%08x %#8x %s %#8x %#4x %c%c%c%c %s %s\n",
> 472 ctl->subname_len, ctl->subname, ctl->len,
473 cs_dsp_mem_region_name(ctl->alg_region.type),
474 ctl->offset, reg, ctl->fw_name, ctl->alg_region.alg, ctl->type,
475 ctl->flags & WMFW_CTL_FLAG_VOLATILE ? 'V' : '-',
476 ctl->flags & WMFW_CTL_FLAG_SYS ? 'S' : '-',
477 ctl->flags & WMFW_CTL_FLAG_READABLE ? 'R' : '-',
478 ctl->flags & WMFW_CTL_FLAG_WRITEABLE ? 'W' : '-',
479 ctl->enabled ? "enabled" : "disabled",
480 ctl->set ? "dirty" : "clean");
481 }
482
483 return 0;
484 }
485 DEFINE_SHOW_ATTRIBUTE(cs_dsp_debugfs_read_controls);
486
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
@ 2023-03-24 16:10 Richard Fitzgerald via Alsa-devel
2023-03-24 21:53 ` kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-03-24 16:10 UTC (permalink / raw)
To: broonie
Cc: patches, linux-kernel, alsa-devel, Simon Trimmer, Richard Fitzgerald
[-- Attachment #0: Type: message/rfc822, Size: 7181 bytes --]
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Simon Trimmer <simont@opensource.cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details
Date: Fri, 24 Mar 2023 16:10:10 +0000
Message-ID: <20230324161010.938599-1-rf@opensource.cirrus.com>
From: Simon Trimmer <simont@opensource.cirrus.com>
The file named 'controls' in the DSP's debugfs root contains a
formatted table describing the controls defined within the loaded DSP
firmware, it is of the form
name: len region:offset addr fwname algid ctltype flags en dirty
Where flags is represented as a character for each flag if set, or '-',
enabled is whether the control is enabled or disabled and dirty is
whether the control value is set in the cache but not the hardware.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
drivers/firmware/cirrus/cs_dsp.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 513136a924cf..faa6402c344d 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -14,6 +14,7 @@
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -457,6 +458,33 @@ static const struct {
},
};
+static int cs_dsp_coeff_base_reg(struct cs_dsp_coeff_ctl *ctl, unsigned int *reg,
+ unsigned int off);
+
+static int cs_dsp_debugfs_read_controls_show(struct seq_file *s, void *ignored)
+{
+ struct cs_dsp *dsp = s->private;
+ struct cs_dsp_coeff_ctl *ctl;
+ unsigned int reg;
+
+ list_for_each_entry(ctl, &dsp->ctl_list, list) {
+ cs_dsp_coeff_base_reg(ctl, ®, 0);
+ seq_printf(s, "%22.*s: %#8lx %s:%08x %#8x %s %#8x %#4x %c%c%c%c %s %s\n",
+ ctl->subname_len, ctl->subname, ctl->len,
+ cs_dsp_mem_region_name(ctl->alg_region.type),
+ ctl->offset, reg, ctl->fw_name, ctl->alg_region.alg, ctl->type,
+ ctl->flags & WMFW_CTL_FLAG_VOLATILE ? 'V' : '-',
+ ctl->flags & WMFW_CTL_FLAG_SYS ? 'S' : '-',
+ ctl->flags & WMFW_CTL_FLAG_READABLE ? 'R' : '-',
+ ctl->flags & WMFW_CTL_FLAG_WRITEABLE ? 'W' : '-',
+ ctl->enabled ? "enabled" : "disabled",
+ ctl->set ? "dirty" : "clean");
+ }
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(cs_dsp_debugfs_read_controls);
+
/**
* cs_dsp_init_debugfs() - Create and populate DSP representation in debugfs
* @dsp: pointer to DSP structure
@@ -479,6 +507,9 @@ void cs_dsp_init_debugfs(struct cs_dsp *dsp, struct dentry *debugfs_root)
debugfs_create_file(cs_dsp_debugfs_fops[i].name, 0444, root,
dsp, &cs_dsp_debugfs_fops[i].fops);
+ debugfs_create_file("controls", 0444, root, dsp,
+ &cs_dsp_debugfs_read_controls_fops);
+
dsp->debugfs_root = root;
}
EXPORT_SYMBOL_NS_GPL(cs_dsp_init_debugfs, FW_CS_DSP);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-25 3:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 16:10 [PATCH] firmware: cs_dsp: Add a debugfs entry containing control details Richard Fitzgerald
2023-03-25 3:01 ` kernel test robot
2023-03-24 16:10 Richard Fitzgerald via Alsa-devel
2023-03-24 21:53 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.