From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org,
vkoul@kernel.org, gregkh@linuxfoundation.org,
liam.r.girdwood@linux.intel.com, jank@cadence.com,
joe@perches.com, srinivas.kandagatla@linaro.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [RFC PATCH 0/7] soundwire: add sysfs and debugfs support
Date: Fri, 3 May 2019 20:00:23 -0500 [thread overview]
Message-ID: <20190504010030.29233-1-pierre-louis.bossart@linux.intel.com> (raw)
This patchset is not fully-tested and is not a candidate for any
merge. Since I am not very comfortable with sysfs and debugfs support,
and I am not the initial author for this code, I could use feedback
from smarter people than me.
This series is intented to be applied on top of the 'soundwire:
corrections to ACPI and DisCo properties' series
Parts of this code was initially written by my Intel colleagues Vinod
Koul, Sanyog Kale, Shreyas Nc and Hardik Shah, who are either no
longer with Intel or no longer involved in SoundWire development. When
relevant, I explictly added a note in commit messages to give them
credit for their hard work, but I removed their signed-off-by tags to
avoid email bounces and avoid spamming them forever with SoundWire
patches.
The sysfs parts essentially expose the values of MIPI DisCo
properties. My contribution here was mainly to align with the
specification, a number of properties from the Intel internal code
were missing. I also split the code to make sure the same attribute
names can be used at different levels, as described in the spec.
One of the main questions I have is whether there is really a need to
add new devices, or if the attributes can be added to the *existing*
ones. For example, the sysfs hierarchy for the SoundWire 0 master
shows as:
/sys/bus/acpi/devices/PRP00001:00/int-sdw.0# ls sdw*
'sdw:0:25d:700:0:0':
bank_delay_support hda_reg paging_support source_ports
ch_prep_timeout high_PHY_capable power src-dp2
clk_stop_mode1 index_reg reset_behave src-dp4
clk_stop_timeout master_count simple_clk_stop_capable subsystem
dp0 mipi_revision sink-dp1 test_mode_capable
driver modalias sink-dp3 uevent
firmware_node p15_behave sink_ports wake_capable
'sdw:0:25d:701:0:0':
bank_delay_support high_PHY_capable paging_support source_ports
ch_prep_timeout master_count power subsystem
clk_stop_mode1 mipi_revision reset_behave test_mode_capable
clk_stop_timeout modalias simple_clk_stop_capable uevent
firmware_node p15_behave sink_ports wake_capable
'sdw-master:0':
clk_stop_modes default_col dynamic_frame power uevent
clock_frequencies default_frame_rate err_threshold revision
clock_gears default_row max_clk_freq subsystem
For the first two Slaves, this results in pretend-devices being added
below each master, the actual Slave devices are children of the
PRP00001 devices, so here we add a bit of complexity. Likewise, the
'sdw-master:0' is a pretend-device whose purpose is only to expose
property values. Is this the recommended direction? Or should all the
sysfs properties be added to the devices exposed by ACPI?
The debugfs part is mainly to dump the Master and Slave registers, as
well as the Intel-specific parts. One of the main changes from the
previous code was to harden the code with scnprintf
Feedback welcome.
~Pierre
Pierre-Louis Bossart (7):
soundwire: Add sysfs support for master(s)
soundwire: add Slave sysfs support
ABI: testing: Add description of soundwire master sysfs files
ABI: testing: Add description of soundwire slave sysfs files
soundwire: add debugfs support
soundwire: cadence_master: add debugfs register dump
soundwire: intel: add debugfs register dump
.../ABI/testing/sysfs-bus-soundwire-master | 21 +
.../ABI/testing/sysfs-bus-soundwire-slave | 85 ++++
drivers/soundwire/Makefile | 4 +-
drivers/soundwire/bus.c | 13 +
drivers/soundwire/bus.h | 30 ++
drivers/soundwire/bus_type.c | 8 +
drivers/soundwire/cadence_master.c | 98 +++++
drivers/soundwire/cadence_master.h | 5 +
drivers/soundwire/debugfs.c | 214 ++++++++++
drivers/soundwire/intel.c | 115 ++++++
drivers/soundwire/slave.c | 2 +
drivers/soundwire/sysfs.c | 376 ++++++++++++++++++
drivers/soundwire/sysfs_local.h | 42 ++
drivers/soundwire/sysfs_slave_dp0.c | 112 ++++++
drivers/soundwire/sysfs_slave_dpn.c | 168 ++++++++
include/linux/soundwire/sdw.h | 24 ++
16 files changed, 1316 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ABI/testing/sysfs-bus-soundwire-master
create mode 100644 Documentation/ABI/testing/sysfs-bus-soundwire-slave
create mode 100644 drivers/soundwire/debugfs.c
create mode 100644 drivers/soundwire/sysfs.c
create mode 100644 drivers/soundwire/sysfs_local.h
create mode 100644 drivers/soundwire/sysfs_slave_dp0.c
create mode 100644 drivers/soundwire/sysfs_slave_dpn.c
--
2.17.1
next reply other threads:[~2019-05-04 1:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 1:00 Pierre-Louis Bossart [this message]
2019-05-04 1:00 ` [RFC PATCH 1/7] soundwire: Add sysfs support for master(s) Pierre-Louis Bossart
2019-05-04 6:52 ` Greg KH
2019-05-06 16:43 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-07 2:24 ` Pierre-Louis Bossart
2019-05-07 5:27 ` Vinod Koul
2019-05-07 5:54 ` Greg KH
2019-05-07 11:03 ` Vinod Koul
2019-05-07 11:19 ` Greg KH
2019-05-07 22:49 ` Pierre-Louis Bossart
2019-05-08 7:46 ` Vinod Koul
2019-05-08 9:16 ` Greg KH
2019-05-08 16:42 ` Pierre-Louis Bossart
2019-05-08 16:59 ` Greg KH
[not found] ` <0b8d5238-6894-e2b4-5522-28636e40dd63@linux.intel.com>
2019-05-09 4:26 ` Vinod Koul
2019-05-09 18:18 ` Greg KH
2019-05-04 1:00 ` [RFC PATCH 2/7] soundwire: add Slave sysfs support Pierre-Louis Bossart
2019-05-04 6:54 ` Greg KH
2019-05-06 14:42 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-06 15:19 ` Greg KH
2019-05-06 16:22 ` Vinod Koul
2019-05-06 16:46 ` Pierre-Louis Bossart
2019-05-07 5:19 ` Vinod Koul
2019-05-07 13:54 ` Pierre-Louis Bossart
2019-05-08 7:40 ` Vinod Koul
2019-05-08 16:51 ` Pierre-Louis Bossart
2019-05-04 1:00 ` [RFC PATCH 3/7] ABI: testing: Add description of soundwire master sysfs files Pierre-Louis Bossart
2019-05-04 6:53 ` Greg KH
2019-05-06 16:24 ` Vinod Koul
2019-05-04 1:00 ` [RFC PATCH 4/7] ABI: testing: Add description of soundwire slave " Pierre-Louis Bossart
2019-05-04 1:00 ` [RFC PATCH 5/7] soundwire: add debugfs support Pierre-Louis Bossart
2019-05-04 7:03 ` Greg KH
2019-05-06 14:48 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-06 16:38 ` Vinod Koul
2019-05-06 16:54 ` Pierre-Louis Bossart
2019-05-07 5:56 ` Greg KH
2019-05-04 1:00 ` [RFC PATCH 6/7] soundwire: cadence_master: add debugfs register dump Pierre-Louis Bossart
2019-05-04 7:03 ` Greg KH
2019-05-06 14:50 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-04 7:04 ` Greg KH
2019-05-04 1:00 ` [RFC PATCH 7/7] soundwire: intel: " Pierre-Louis Bossart
2019-05-04 7:04 ` Greg KH
2019-05-06 14:51 ` [alsa-devel] " Pierre-Louis Bossart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190504010030.29233-1-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jank@cadence.com \
--cc=joe@perches.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®