Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
[linux-block.git] / drivers / soundwire / bus.h
index 96927a14379689b2df116d50a8a1e48b7e59962f..fda6b24ac2da99c4de6e22db5a58b83c47d2f414 100644 (file)
@@ -144,6 +144,13 @@ struct sdw_master_runtime {
        struct list_head bus_node;
 };
 
+struct sdw_transport_data {
+       int hstart;
+       int hstop;
+       int block_offset;
+       int sub_block_offset;
+};
+
 struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
                                            enum sdw_data_direction direction,
                                            unsigned int port_num);
@@ -158,17 +165,6 @@ int sdw_transfer_defer(struct sdw_bus *bus, struct sdw_msg *msg);
 int sdw_fill_msg(struct sdw_msg *msg, struct sdw_slave *slave,
                 u32 addr, size_t count, u16 dev_num, u8 flags, u8 *buf);
 
-/* Retrieve and return channel count from channel mask */
-static inline int sdw_ch_mask_to_ch(int ch_mask)
-{
-       int c = 0;
-
-       for (c = 0; ch_mask; ch_mask >>= 1)
-               c += ch_mask & 1;
-
-       return c;
-}
-
 /* Fill transport parameter data structure */
 static inline void sdw_fill_xport_params(struct sdw_transport_params *params,
                                         int port_num, bool grp_ctrl_valid,
@@ -212,5 +208,7 @@ int sdw_bwrite_no_pm_unlocked(struct sdw_bus *bus, u16 dev_num, u32 addr, u8 val
 
 void sdw_clear_slave_status(struct sdw_bus *bus, u32 request);
 int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size);
+void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
+                            struct sdw_transport_data *t_data);
 
 #endif /* __SDW_BUS_H */