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
4#ifndef __SOUNDWIRE_H4#ifndef __SOUNDWIRE_H
5#define __SOUNDWIRE_H5#define __SOUNDWIRE_H
6 6
7#include <linux/bug.h>
7#include <linux/mod_devicetable.h>8#include <linux/mod_devicetable.h>
8#include <linux/bitfield.h>9#include <linux/bitfield.h>
9 10
@@ -365,7 +366,9 @@ struct sdw_dpn_prop { · 355 unmodified lines
365 * @sink_dpn_prop: Sink Data Port N properties366 * @sink_dpn_prop: Sink Data Port N properties
366 * @scp_int1_mask: SCP_INT1_MASK desired settings367 * @scp_int1_mask: SCP_INT1_MASK desired settings
367 * @quirks: bitmask identifying deltas from the MIPI specification368 * @quirks: bitmask identifying deltas from the MIPI specification
368 * @is_sdca: the Slave supports the SDCA specification369 * @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.
369 */372 */
370struct sdw_slave_prop {373struct sdw_slave_prop {
371 u32 mipi_revision;374 u32 mipi_revision;
@@ -389,7 +392,7 @@ struct sdw_slave_prop { · 17 unmodified lines
389 struct sdw_dpn_prop *sink_dpn_prop;392 struct sdw_dpn_prop *sink_dpn_prop;
390 u8 scp_int1_mask;393 u8 scp_int1_mask;
391 u32 quirks;394 u32 quirks;
392 bool is_sdca;395 bool clock_reg_supported;
393};396};
394 397
395#define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0)398#define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0)
@@ -836,8 +839,8 @@ struct sdw_defer { · 440 unmodified lines
836 * @read_prop: Read Master properties839 * @read_prop: Read Master properties
837 * @override_adr: Override value read from firmware (quirk for buggy firmware)840 * @override_adr: Override value read from firmware (quirk for buggy firmware)
838 * @xfer_msg: Transfer message callback841 * @xfer_msg: Transfer message callback
839 * @xfer_msg_defer: Defer version of transfer message callback842 * @xfer_msg_defer: Defer version of transfer message callback. The message is handled with the
840 * @reset_page_addr: Reset the SCP page address registers843 * bus struct @sdw_defer
841 * @set_bus_conf: Set the bus configuration844 * @set_bus_conf: Set the bus configuration
842 * @pre_bank_switch: Callback for pre bank switch845 * @pre_bank_switch: Callback for pre bank switch
843 * @post_bank_switch: Callback for post bank switch846 * @post_bank_switch: Callback for post bank switch
@@ -851,10 +854,7 @@ struct sdw_master_ops { · 7 unmodified lines
851 enum sdw_command_response (*xfer_msg)854 enum sdw_command_response (*xfer_msg)
852 (struct sdw_bus *bus, struct sdw_msg *msg);855 (struct sdw_bus *bus, struct sdw_msg *msg);
853 enum sdw_command_response (*xfer_msg_defer)856 enum sdw_command_response (*xfer_msg_defer)
854 (struct sdw_bus *bus, struct sdw_msg *msg,857 (struct sdw_bus *bus);
855 struct sdw_defer *defer);
856 enum sdw_command_response (*reset_page_addr)
857 (struct sdw_bus *bus, unsigned int dev_num);
858 int (*set_bus_conf)(struct sdw_bus *bus,858 int (*set_bus_conf)(struct sdw_bus *bus,
859 struct sdw_bus_params *params);859 struct sdw_bus_params *params);
860 int (*pre_bank_switch)(struct sdw_bus *bus);860 int (*pre_bank_switch)(struct sdw_bus *bus);
@@ -1023,15 +1023,8 @@ int sdw_stream_add_master(struct sdw_bus *bus, · 162 unmodified lines
1023 struct sdw_port_config *port_config,1023 struct sdw_port_config *port_config,
1024 unsigned int num_ports,1024 unsigned int num_ports,
1025 struct sdw_stream_runtime *stream);1025 struct sdw_stream_runtime *stream);
1026int 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);
1031int sdw_stream_remove_master(struct sdw_bus *bus,1026int sdw_stream_remove_master(struct sdw_bus *bus,
1032 struct sdw_stream_runtime *stream);1027 struct sdw_stream_runtime *stream);
1033int sdw_stream_remove_slave(struct sdw_slave *slave,
1034 struct sdw_stream_runtime *stream);
1035int sdw_startup_stream(void *sdw_substream);1028int sdw_startup_stream(void *sdw_substream);
1036int sdw_prepare_stream(struct sdw_stream_runtime *stream);1029int sdw_prepare_stream(struct sdw_stream_runtime *stream);
1037int sdw_enable_stream(struct sdw_stream_runtime *stream);1030int 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
1042int sdw_bus_clk_stop(struct sdw_bus *bus);1035int sdw_bus_clk_stop(struct sdw_bus *bus);
1043int sdw_bus_exit_clk_stop(struct sdw_bus *bus);1036int sdw_bus_exit_clk_stop(struct sdw_bus *bus);
1044 1037
1045/* messaging and data APIs */1038int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);
1039void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id);
1046 1040
1041#if IS_ENABLED(CONFIG_SOUNDWIRE)
1042
1043int 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);
1048int sdw_stream_remove_slave(struct sdw_slave *slave,
1049 struct sdw_stream_runtime *stream);
1050
1051/* messaging and data APIs */
1047int sdw_read(struct sdw_slave *slave, u32 addr);1052int sdw_read(struct sdw_slave *slave, u32 addr);
1048int sdw_write(struct sdw_slave *slave, u32 addr, u8 value);1053int sdw_write(struct sdw_slave *slave, u32 addr, u8 value);
1049int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value);1054int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value);
1050int sdw_read_no_pm(struct sdw_slave *slave, u32 addr);1055int sdw_read_no_pm(struct sdw_slave *slave, u32 addr);
1051int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);1056int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
1057int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
1052int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);1058int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
1059int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
1053int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);1060int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
1054int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);1061int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
1055 1062
1056int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);1063#else
1057void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id);1064
1065static 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
1075static 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 */
1083static inline int sdw_read(struct sdw_slave *slave, u32 addr)
1084{
1085 WARN_ONCE(1, "SoundWire API is disabled");
1086 return -EINVAL;
1087}
1088
1089static 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
1095static 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
1101static 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
1107static 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
1113static 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
1119static 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
1125static 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
1131static 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
1137static 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 */
1058 1144
1059#endif /* __SOUNDWIRE_H */1145#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