diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-22 10:52:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-22 10:52:23 -0700 |
commit | 8d7ead5c69dfa928322777c532fa0770af319202 (patch) | |
tree | f8cec2042575db9e89409cbfc253aa2ec1c8293a /include | |
parent | e0703556644a531e50b5dc61b9f6ea83af5f6604 (diff) | |
parent | dfcff3f8a5f18a0cfa233522b5647c2e6035fcb5 (diff) |
Merge tag 'soundwire-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire updates from Vinod Koul:
"This includes DT support thanks to Srini and more work done by Intel
(Pierre) on improving cadence and intel support.
Summary:
- Add DT bindings and DT support in core
- Add debugfs support for soundwire properties
- Improvements on streaming handling to core
- Improved handling of Cadence module
- More updates and improvements to Intel driver"
* tag 'soundwire-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (30 commits)
soundwire: stream: make stream name a const pointer
soundwire: Add compute_params callback
soundwire: core: add device tree support for slave devices
dt-bindings: soundwire: add slave bindings
soundwire: bus: set initial value to port_status
soundwire: intel: handle disabled links
soundwire: intel: add debugfs register dump
soundwire: cadence_master: add debugfs register dump
soundwire: add debugfs support
soundwire: intel: remove unused variables
soundwire: intel: move shutdown() callback and don't export symbol
soundwire: cadence_master: add kernel parameter to override interrupt mask
soundwire: intel_init: add kernel module parameter to filter out links
soundwire: cadence_master: fix divider setting in clock register
soundwire: cadence_master: make use of mclk_freq property
soundwire: intel: read mclk_freq property from firmware
soundwire: add new mclk_freq field for properties
soundwire: stream: remove unnecessary variable initializations
soundwire: stream: fix disable sequence
soundwire: include mod_devicetable.h to avoid compiling warnings
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/soundwire/sdw.h | 20 | ||||
-rw-r--r-- | include/linux/soundwire/sdw_intel.h | 1 |
2 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index bea46bd8b6ce..ea787201c3ac 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -4,6 +4,8 @@ #ifndef __SOUNDWIRE_H #define __SOUNDWIRE_H +#include <linux/mod_devicetable.h> + struct sdw_bus; struct sdw_slave; @@ -377,6 +379,8 @@ struct sdw_slave_prop { * @dynamic_frame: Dynamic frame shape supported * @err_threshold: Number of times that software may retry sending a single * command + * @mclk_freq: clock reference passed to SoundWire Master, in Hz. + * @hw_disabled: if true, the Master is not functional, typically due to pin-mux */ struct sdw_master_prop { u32 revision; @@ -391,6 +395,8 @@ struct sdw_master_prop { u32 default_col; bool dynamic_frame; u32 err_threshold; + u32 mclk_freq; + bool hw_disabled; }; int sdw_master_read_prop(struct sdw_bus *bus); @@ -538,6 +544,7 @@ struct sdw_slave_ops { * @bus: Bus handle * @ops: Slave callback ops * @prop: Slave properties + * @debugfs: Slave debugfs * @node: node for bus list * @port_ready: Port ready completion flag for each Slave port * @dev_num: Device Number assigned by Bus @@ -549,6 +556,9 @@ struct sdw_slave { struct sdw_bus *bus; const struct sdw_slave_ops *ops; struct sdw_slave_prop prop; +#ifdef CONFIG_DEBUG_FS + struct dentry *debugfs; +#endif struct list_head node; struct completion *port_ready; u16 dev_num; @@ -718,6 +728,7 @@ struct sdw_master_ops { * Bit set implies used number, bit clear implies unused number. * @bus_lock: bus lock * @msg_lock: message lock + * @compute_params: points to Bus resource management implementation * @ops: Master callback ops * @port_ops: Master port callback ops * @params: Current bus parameters @@ -725,6 +736,7 @@ struct sdw_master_ops { * @m_rt_list: List of Master instance of all stream(s) running on Bus. This * is used to compute and program bus bandwidth, clock, frame shape, * transport and port parameters + * @debugfs: Bus debugfs * @defer_msg: Defer message * @clk_stop_timeout: Clock stop timeout computed * @bank_switch_timeout: Bank switch timeout computed @@ -739,11 +751,15 @@ struct sdw_bus { DECLARE_BITMAP(assigned, SDW_MAX_DEVICES); struct mutex bus_lock; struct mutex msg_lock; + int (*compute_params)(struct sdw_bus *bus); const struct sdw_master_ops *ops; const struct sdw_master_port_ops *port_ops; struct sdw_bus_params params; struct sdw_master_prop prop; struct list_head m_rt_list; +#ifdef CONFIG_DEBUG_FS + struct dentry *debugfs; +#endif struct sdw_defer defer_msg; unsigned int clk_stop_timeout; u32 bank_switch_timeout; @@ -828,7 +844,7 @@ struct sdw_stream_params { * @m_rt_count: Count of Master runtime(s) in this stream */ struct sdw_stream_runtime { - char *name; + const char *name; struct sdw_stream_params params; enum sdw_stream_state state; enum sdw_stream_type type; @@ -836,7 +852,7 @@ struct sdw_stream_runtime { int m_rt_count; }; -struct sdw_stream_runtime *sdw_alloc_stream(char *stream_name); +struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name); void sdw_release_stream(struct sdw_stream_runtime *stream); int sdw_stream_add_master(struct sdw_bus *bus, struct sdw_stream_config *stream_config, diff --git a/include/linux/soundwire/sdw_intel.h b/include/linux/soundwire/sdw_intel.h index 4d70da45363d..c9427cb6020b 100644 --- a/include/linux/soundwire/sdw_intel.h +++ b/include/linux/soundwire/sdw_intel.h @@ -8,6 +8,7 @@ * struct sdw_intel_ops: Intel audio driver callback ops * * @config_stream: configure the stream with the hw_params + * the first argument containing the context is mandatory */ struct sdw_intel_ops { int (*config_stream)(void *arg, void *substream, |