@@ -871,68 +871,71 @@ struct sdw_master_ops {
871
871
* struct sdw_bus - SoundWire bus
872
872
* @dev: Shortcut to &bus->md->dev to avoid changing the entire code.
873
873
* @md: Master device
874
- * @controller_id: system-unique controller ID. If set to -1, the bus @id will be used.
875
- * @link_id: Link id number, can be 0 to N, unique for each Controller
876
- * @id: bus system-wide unique id
877
- * @slaves: list of Slaves on this bus
878
- * @assigned: Bitmap for Slave device numbers.
879
- * Bit set implies used number, bit clear implies unused number.
874
+ * @bus_lock_key: bus lock key associated to @bus_lock
880
875
* @bus_lock: bus lock
876
+ * @slaves: list of Slaves on this bus
877
+ * @msg_lock_key: message lock key associated to @msg_lock
881
878
* @msg_lock: message lock
882
- * @compute_params: points to Bus resource management implementation
883
- * @ops: Master callback ops
884
- * @port_ops: Master port callback ops
885
- * @params: Current bus parameters
886
- * @prop: Master properties
887
- * @vendor_specific_prop: pointer to non-standard properties
888
879
* @m_rt_list: List of Master instance of all stream(s) running on Bus. This
889
880
* is used to compute and program bus bandwidth, clock, frame shape,
890
881
* transport and port parameters
891
- * @debugfs: Bus debugfs
892
- * @domain: IRQ domain
893
882
* @defer_msg: Defer message
894
- * @clk_stop_timeout: Clock stop timeout computed
895
- * @bank_switch_timeout: Bank switch timeout computed
896
- * @multi_link: Store bus property that indicates if multi links
897
- * are supported. This flag is populated by drivers after reading
898
- * appropriate firmware (ACPI/DT).
883
+ * @params: Current bus parameters
884
+ * @stream_refcount: number of streams currently using this bus
885
+ * @ops: Master callback ops
886
+ * @port_ops: Master port callback ops
887
+ * @prop: Master properties
888
+ * @vendor_specific_prop: pointer to non-standard properties
899
889
* @hw_sync_min_links: Number of links used by a stream above which
900
890
* hardware-based synchronization is required. This value is only
901
891
* meaningful if multi_link is set. If set to 1, hardware-based
902
892
* synchronization will be used even if a stream only uses a single
903
893
* SoundWire segment.
904
- * @stream_refcount: number of streams currently using this bus
894
+ * @controller_id: system-unique controller ID. If set to -1, the bus @id will be used.
895
+ * @link_id: Link id number, can be 0 to N, unique for each Controller
896
+ * @id: bus system-wide unique id
897
+ * @compute_params: points to Bus resource management implementation
898
+ * @assigned: Bitmap for Slave device numbers.
899
+ * Bit set implies used number, bit clear implies unused number.
900
+ * @clk_stop_timeout: Clock stop timeout computed
901
+ * @bank_switch_timeout: Bank switch timeout computed
902
+ * @domain: IRQ domain
903
+ * @irq_chip: IRQ chip
904
+ * @debugfs: Bus debugfs (optional)
905
+ * @multi_link: Store bus property that indicates if multi links
906
+ * are supported. This flag is populated by drivers after reading
907
+ * appropriate firmware (ACPI/DT).
905
908
*/
906
909
struct sdw_bus {
907
910
struct device * dev ;
908
911
struct sdw_master_device * md ;
909
- int controller_id ;
910
- unsigned int link_id ;
911
- int id ;
912
- struct list_head slaves ;
913
- DECLARE_BITMAP (assigned , SDW_MAX_DEVICES );
914
- struct mutex bus_lock ;
915
912
struct lock_class_key bus_lock_key ;
916
- struct mutex msg_lock ;
913
+ struct mutex bus_lock ;
914
+ struct list_head slaves ;
917
915
struct lock_class_key msg_lock_key ;
918
- int (* compute_params )(struct sdw_bus * bus );
916
+ struct mutex msg_lock ;
917
+ struct list_head m_rt_list ;
918
+ struct sdw_defer defer_msg ;
919
+ struct sdw_bus_params params ;
920
+ int stream_refcount ;
919
921
const struct sdw_master_ops * ops ;
920
922
const struct sdw_master_port_ops * port_ops ;
921
- struct sdw_bus_params params ;
922
923
struct sdw_master_prop prop ;
923
924
void * vendor_specific_prop ;
924
- struct list_head m_rt_list ;
925
+ int hw_sync_min_links ;
926
+ int controller_id ;
927
+ unsigned int link_id ;
928
+ int id ;
929
+ int (* compute_params )(struct sdw_bus * bus );
930
+ DECLARE_BITMAP (assigned , SDW_MAX_DEVICES );
931
+ unsigned int clk_stop_timeout ;
932
+ u32 bank_switch_timeout ;
933
+ struct irq_chip irq_chip ;
934
+ struct irq_domain * domain ;
925
935
#ifdef CONFIG_DEBUG_FS
926
936
struct dentry * debugfs ;
927
937
#endif
928
- struct irq_chip irq_chip ;
929
- struct irq_domain * domain ;
930
- struct sdw_defer defer_msg ;
931
- unsigned int clk_stop_timeout ;
932
- u32 bank_switch_timeout ;
933
938
bool multi_link ;
934
- int hw_sync_min_links ;
935
- int stream_refcount ;
936
939
};
937
940
938
941
int sdw_bus_master_add (struct sdw_bus * bus , struct device * parent ,
0 commit comments