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

2019-08-05 Thread Pierre-Louis Bossart
+static ssize_t cdns_reg_read(struct file *file, char __user *user_buf, +size_t count, loff_t *ppos) +{ + struct sdw_cdns *cdns = file->private_data; + char *buf; + ssize_t ret; + int i, j; + + buf = kzalloc(RD_BUF, GFP_KERNEL); +

Re: [RFC PATCH 02/40] soundwire: cadence_master: add debugfs register dump

2019-08-05 Thread Sanyog Kale
On Thu, Jul 25, 2019 at 06:39:54PM -0500, Pierre-Louis Bossart wrote: > Add debugfs file to dump the Cadence master 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: [RFC PATCH 02/40] soundwire: cadence_master: add debugfs register dump

2019-07-26 Thread Pierre-Louis Bossart
+static const struct file_operations cdns_reg_fops = { + .open = simple_open, + .read = cdns_reg_read, + .llseek = default_llseek, +}; DEFINE_SHOW_ATTRIBUTE()? I remember looking at this but can't recall why I left it this way. That was before my Summer break so will reloo

Re: [RFC PATCH 02/40] soundwire: cadence_master: add debugfs register dump

2019-07-26 Thread Greg KH
On Thu, Jul 25, 2019 at 06:39:54PM -0500, Pierre-Louis Bossart wrote: > Add debugfs file to dump the Cadence master 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

[RFC PATCH 02/40] soundwire: cadence_master: add debugfs register dump

2019-07-25 Thread Pierre-Louis Bossart
Add debugfs file to dump the Cadence master 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 --- dri