History

Merge tag 'soundwire-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul: "This is a small update which features a bit of core changes and driver updates in Intel and cadence driver. Core: - sdw_transfer_defer() API change to drop an argument - Reset page address rework - Export sdw_nwrite_no_pm and sdw_nread_no_pm APIs Drivers: - Cadence and related intel driver updates for FIFO handling and low level msg transfers" * tag 'soundwire-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: cadence: further simplify low-level xfer_msg_defer() callback soundwire: cadence: use directly bus sdw_defer structure soundwire: bus: remove sdw_defer argument in sdw_transfer_defer() soundwire: stream: use consistent pattern for freeing buffers soundwire: bus: Remove unused reset_page_addr() callback soundwire: bus: Don't zero page registers after every transaction soundwire: bus_type: Avoid lockdep assert in sdw_drv_probe() soundwire: stream: Move remaining register accesses over to no_pm soundwire: debugfs: Switch to sdw_read_no_pm soundwire: Provide build stubs for common functions soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions soundwire: cadence: remove unused sdw_cdns_master_ops declaration soundwire: enable optional clock registers for SoundWire 1.2 devices ASoC/soundwire: remove is_sdca boolean property soundwire: cadence: Drain the RX FIFO after an IO timeout soundwire: cadence: Remove wasted space in response_buf soundwire: cadence: Don't overflow the command FIFOs soundwire: intel: remove DAI startup/shutdown

Linus Torvalds committed 3 years ago

Commit 595fa4e2 parents 8ff99ad 66f95de13 files · +207 −167Browse files

Showing the changes to include (1 of 13 files). Show all

Unified · Split

include/linux/soundwire/sdw.h+104−18
@@ -4,6 +4,7 @@ · 3 unmodified lines
44 #ifndef __SOUNDWIRE_H
55 #define __SOUNDWIRE_H
66
7+#include <linux/bug.h>
78 #include <linux/mod_devicetable.h>
89 #include <linux/bitfield.h>
910
@@ -365,7 +366,9 @@ struct sdw_dpn_prop { · 355 unmodified lines
365366 * @sink_dpn_prop: Sink Data Port N properties
366367 * @scp_int1_mask: SCP_INT1_MASK desired settings
367368 * @quirks: bitmask identifying deltas from the MIPI specification
368− * @is_sdca: the Slave supports the SDCA specification
369+ * @clock_reg_supported: the Peripheral implements the clock base and scale
370+ * registers introduced with the SoundWire 1.2 specification. SDCA devices
371+ * do not need to set this boolean property as the registers are required.
369372 */
370373 struct sdw_slave_prop {
371374 u32 mipi_revision;
@@ -389,7 +392,7 @@ struct sdw_slave_prop { · 17 unmodified lines
389392 struct sdw_dpn_prop *sink_dpn_prop;
390393 u8 scp_int1_mask;
391394 u32 quirks;
392− bool is_sdca;
395+ bool clock_reg_supported;
393396 };
394397
395398 #define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0)
@@ -836,8 +839,8 @@ struct sdw_defer { · 440 unmodified lines
836839 * @read_prop: Read Master properties
837840 * @override_adr: Override value read from firmware (quirk for buggy firmware)
838841 * @xfer_msg: Transfer message callback
839− * @xfer_msg_defer: Defer version of transfer message callback
840− * @reset_page_addr: Reset the SCP page address registers
842+ * @xfer_msg_defer: Defer version of transfer message callback. The message is handled with the
843+ * bus struct @sdw_defer
841844 * @set_bus_conf: Set the bus configuration
842845 * @pre_bank_switch: Callback for pre bank switch
843846 * @post_bank_switch: Callback for post bank switch
@@ -851,10 +854,7 @@ struct sdw_master_ops { · 7 unmodified lines
851854 enum sdw_command_response (*xfer_msg)
852855 (struct sdw_bus *bus, struct sdw_msg *msg);
853856 enum sdw_command_response (*xfer_msg_defer)
854− (struct sdw_bus *bus, struct sdw_msg *msg,
855− struct sdw_defer *defer);
856− enum sdw_command_response (*reset_page_addr)
857− (struct sdw_bus *bus, unsigned int dev_num);
857+ (struct sdw_bus *bus);
858858 int (*set_bus_conf)(struct sdw_bus *bus,
859859 struct sdw_bus_params *params);
860860 int (*pre_bank_switch)(struct sdw_bus *bus);
@@ -1023,15 +1023,8 @@ int sdw_stream_add_master(struct sdw_bus *bus, · 162 unmodified lines
10231023 struct sdw_port_config *port_config,
10241024 unsigned int num_ports,
10251025 struct sdw_stream_runtime *stream);
1026−int sdw_stream_add_slave(struct sdw_slave *slave,
1027− struct sdw_stream_config *stream_config,
1028− struct sdw_port_config *port_config,
1029− unsigned int num_ports,
1030− struct sdw_stream_runtime *stream);
10311026 int sdw_stream_remove_master(struct sdw_bus *bus,
10321027 struct sdw_stream_runtime *stream);
1033−int sdw_stream_remove_slave(struct sdw_slave *slave,
1034− struct sdw_stream_runtime *stream);
10351028 int sdw_startup_stream(void *sdw_substream);
10361029 int sdw_prepare_stream(struct sdw_stream_runtime *stream);
10371030 int sdw_enable_stream(struct sdw_stream_runtime *stream);
@@ -1042,18 +1035,111 @@ int sdw_bus_prep_clk_stop(struct sdw_bus *bus); · 4 unmodified lines
10421035 int sdw_bus_clk_stop(struct sdw_bus *bus);
10431036 int sdw_bus_exit_clk_stop(struct sdw_bus *bus);
10441037
1045−/* messaging and data APIs */
1038+int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);
1039+void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id);
10461040
1041+#if IS_ENABLED(CONFIG_SOUNDWIRE)
1042+
1043+int sdw_stream_add_slave(struct sdw_slave *slave,
1044+ struct sdw_stream_config *stream_config,
1045+ struct sdw_port_config *port_config,
1046+ unsigned int num_ports,
1047+ struct sdw_stream_runtime *stream);
1048+int sdw_stream_remove_slave(struct sdw_slave *slave,
1049+ struct sdw_stream_runtime *stream);
1050+
1051+/* messaging and data APIs */
10471052 int sdw_read(struct sdw_slave *slave, u32 addr);
10481053 int sdw_write(struct sdw_slave *slave, u32 addr, u8 value);
10491054 int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value);
10501055 int sdw_read_no_pm(struct sdw_slave *slave, u32 addr);
10511056 int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
1057+int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
10521058 int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
1059+int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
10531060 int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
10541061 int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
10551062
1056−int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);
1057−void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id);
1063+#else
1064+
1065+static inline int sdw_stream_add_slave(struct sdw_slave *slave,
1066+ struct sdw_stream_config *stream_config,
1067+ struct sdw_port_config *port_config,
1068+ unsigned int num_ports,
1069+ struct sdw_stream_runtime *stream)
1070+{
1071+ WARN_ONCE(1, "SoundWire API is disabled");
1072+ return -EINVAL;
1073+}
1074+
1075+static inline int sdw_stream_remove_slave(struct sdw_slave *slave,
1076+ struct sdw_stream_runtime *stream)
1077+{
1078+ WARN_ONCE(1, "SoundWire API is disabled");
1079+ return -EINVAL;
1080+}
1081+
1082+/* messaging and data APIs */
1083+static inline int sdw_read(struct sdw_slave *slave, u32 addr)
1084+{
1085+ WARN_ONCE(1, "SoundWire API is disabled");
1086+ return -EINVAL;
1087+}
1088+
1089+static inline int sdw_write(struct sdw_slave *slave, u32 addr, u8 value)
1090+{
1091+ WARN_ONCE(1, "SoundWire API is disabled");
1092+ return -EINVAL;
1093+}
1094+
1095+static inline int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value)
1096+{
1097+ WARN_ONCE(1, "SoundWire API is disabled");
1098+ return -EINVAL;
1099+}
1100+
1101+static inline int sdw_read_no_pm(struct sdw_slave *slave, u32 addr)
1102+{
1103+ WARN_ONCE(1, "SoundWire API is disabled");
1104+ return -EINVAL;
1105+}
1106+
1107+static inline int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val)
1108+{
1109+ WARN_ONCE(1, "SoundWire API is disabled");
1110+ return -EINVAL;
1111+}
1112+
1113+static inline int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val)
1114+{
1115+ WARN_ONCE(1, "SoundWire API is disabled");
1116+ return -EINVAL;
1117+}
1118+
1119+static inline int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val)
1120+{
1121+ WARN_ONCE(1, "SoundWire API is disabled");
1122+ return -EINVAL;
1123+}
1124+
1125+static inline int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val)
1126+{
1127+ WARN_ONCE(1, "SoundWire API is disabled");
1128+ return -EINVAL;
1129+}
1130+
1131+static inline int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val)
1132+{
1133+ WARN_ONCE(1, "SoundWire API is disabled");
1134+ return -EINVAL;
1135+}
1136+
1137+static inline int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val)
1138+{
1139+ WARN_ONCE(1, "SoundWire API is disabled");
1140+ return -EINVAL;
1141+}
1142+
1143+#endif /* CONFIG_SOUNDWIRE */
10581144
10591145 #endif /* __SOUNDWIRE_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t