Re: [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Pierre-Louis Bossart
+static const struct file_operations intel_reg_fops = { + .open = simple_open, + .read = intel_reg_read, + .llseek = default_llseek, +}; DEFINE_SIMPLE_ATTRIBUTE()? yes + +static void intel_debugfs_init(struct sdw_intel *sdw) +{ + struct dentry *root = sdw->cdns.b

Re: [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Greg KH
On Fri, Jul 26, 2019 at 04:06:35PM +0200, Greg KH wrote: > On Thu, Jul 25, 2019 at 06:39:56PM -0500, Pierre-Louis Bossart wrote: > > Add debugfs file to dump the Intel SoundWire registers > > > > Credits: this patch is based on an earlier internal contribution by > > Vinod Koul, Sanyog Kale, Shrey

Re: [alsa-devel] [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Greg KH
On Fri, Jul 26, 2019 at 09:00:28AM -0500, Pierre-Louis Bossart wrote: > > > On 7/26/19 4:35 AM, Cezary Rojewski wrote: > > On 2019-07-26 01:39, Pierre-Louis Bossart wrote: > > > +static void intel_debugfs_init(struct sdw_intel *sdw) > > > +{ > > > +    struct dentry *root = sdw->cdns.bus.debugfs;

Re: [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Greg KH
On Thu, Jul 25, 2019 at 06:39:56PM -0500, Pierre-Louis Bossart wrote: > Add debugfs file to dump the Intel SoundWire registers > > Credits: this patch is based on an earlier internal contribution by > Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change > is the use of scnprintf to

Re: [alsa-devel] [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 4:35 AM, Cezary Rojewski wrote: On 2019-07-26 01:39, Pierre-Louis Bossart wrote: +static void intel_debugfs_init(struct sdw_intel *sdw) +{ +    struct dentry *root = sdw->cdns.bus.debugfs; + +    if (!root) +    return; + +    sdw->fs = debugfs_create_dir("intel-sdw", root); + 

Re: [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Cezary Rojewski
On 2019-07-26 01:39, Pierre-Louis Bossart wrote: +static void intel_debugfs_init(struct sdw_intel *sdw) +{ + struct dentry *root = sdw->cdns.bus.debugfs; + + if (!root) + return; + + sdw->fs = debugfs_create_dir("intel-sdw", root); + if (IS_ERR_OR_NULL(sdw->f

[RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-25 Thread Pierre-Louis Bossart
Add debugfs file to dump the Intel SoundWire registers Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change is the use of scnprintf to avoid known issues with snprintf. Signed-off-by: Pierre-Louis Bossart --- dr