Add base debugfs mechanism for SoundWire bus by creating soundwire root and master-N and slave-x hierarchy. Also add SDW Slave SCP, DP0 and DP-N register debug file. Registers not implemented will print as "XX" Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Showing the changes to include/linux (1 of 7 files). Show all
Unified · Split
| @@ -542,6 +542,7 @@ struct sdw_slave_ops { · 541 unmodified lines | |||
| 542 | * @bus: Bus handle | 542 | * @bus: Bus handle |
| 543 | * @ops: Slave callback ops | 543 | * @ops: Slave callback ops |
| 544 | * @prop: Slave properties | 544 | * @prop: Slave properties |
| 545 | * @debugfs: Slave debugfs | ||
| 545 | * @node: node for bus list | 546 | * @node: node for bus list |
| 546 | * @port_ready: Port ready completion flag for each Slave port | 547 | * @port_ready: Port ready completion flag for each Slave port |
| 547 | * @dev_num: Device Number assigned by Bus | 548 | * @dev_num: Device Number assigned by Bus |
| @@ -553,6 +554,9 @@ struct sdw_slave { · 5 unmodified lines | |||
| 553 | struct sdw_bus *bus; | 554 | struct sdw_bus *bus; |
| 554 | const struct sdw_slave_ops *ops; | 555 | const struct sdw_slave_ops *ops; |
| 555 | struct sdw_slave_prop prop; | 556 | struct sdw_slave_prop prop; |
| 557 | #ifdef CONFIG_DEBUG_FS | ||
| 558 | struct dentry *debugfs; | ||
| 559 | #endif | ||
| 556 | struct list_head node; | 560 | struct list_head node; |
| 557 | struct completion *port_ready; | 561 | struct completion *port_ready; |
| 558 | u16 dev_num; | 562 | u16 dev_num; |
| @@ -729,6 +733,7 @@ struct sdw_master_ops { · 170 unmodified lines | |||
| 729 | * @m_rt_list: List of Master instance of all stream(s) running on Bus. This | 733 | * @m_rt_list: List of Master instance of all stream(s) running on Bus. This |
| 730 | * is used to compute and program bus bandwidth, clock, frame shape, | 734 | * is used to compute and program bus bandwidth, clock, frame shape, |
| 731 | * transport and port parameters | 735 | * transport and port parameters |
| 736 | * @debugfs: Bus debugfs | ||
| 732 | * @defer_msg: Defer message | 737 | * @defer_msg: Defer message |
| 733 | * @clk_stop_timeout: Clock stop timeout computed | 738 | * @clk_stop_timeout: Clock stop timeout computed |
| 734 | * @bank_switch_timeout: Bank switch timeout computed | 739 | * @bank_switch_timeout: Bank switch timeout computed |
| @@ -748,6 +753,9 @@ struct sdw_bus { · 13 unmodified lines | |||
| 748 | struct sdw_bus_params params; | 753 | struct sdw_bus_params params; |
| 749 | struct sdw_master_prop prop; | 754 | struct sdw_master_prop prop; |
| 750 | struct list_head m_rt_list; | 755 | struct list_head m_rt_list; |
| 756 | #ifdef CONFIG_DEBUG_FS | ||
| 757 | struct dentry *debugfs; | ||
| 758 | #endif | ||
| 751 | struct sdw_defer defer_msg; | 759 | struct sdw_defer defer_msg; |
| 752 | unsigned int clk_stop_timeout; | 760 | unsigned int clk_stop_timeout; |
| 753 | u32 bank_switch_timeout; | 761 | u32 bank_switch_timeout; |