Loading include/soc/soundwire.h +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/regmap.h> #include "audio_mod_devicetable.h" #define SWR_CLK_RATE_0P3MHZ 300000 #define SWR_CLK_RATE_0P6MHZ 600000 #define SWR_CLK_RATE_1P2MHZ 1200000 #define SWR_CLK_RATE_2P4MHZ 2400000 Loading soc/swr-mstr-ctrl.c +14 −2 Original line number Diff line number Diff line Loading @@ -1567,6 +1567,7 @@ static int swrm_connect_port(struct swr_master *master, mport->req_ch |= mstr_ch_msk; master->port_en_mask |= (1 << mstr_port_id); if (swrm->clk_stop_mode0_supp && swrm->dynamic_port_map_supported && (mport->ch_rate < portinfo->ch_rate[i])) { mport->ch_rate = portinfo->ch_rate[i]; swrm_update_bus_clk(swrm); Loading Loading @@ -1633,7 +1634,9 @@ static int swrm_disconnect_port(struct swr_master *master, } port_req->req_ch &= ~portinfo->ch_en[i]; mport->req_ch &= ~mstr_ch_mask; if (swrm->clk_stop_mode0_supp && !mport->req_ch) { if (swrm->clk_stop_mode0_supp && swrm->dynamic_port_map_supported && !mport->req_ch) { mport->ch_rate = 0; swrm_update_bus_clk(swrm); } Loading Loading @@ -2326,6 +2329,15 @@ static int swrm_probe(struct platform_device *pdev) dev_err(&pdev->dev, "%s: failed to get master id\n", __func__); goto err_pdata_fail; } ret = of_property_read_u32(pdev->dev.of_node, "qcom,dynamic-port-map-supported", &swrm->dynamic_port_map_supported); if (ret) { dev_dbg(&pdev->dev, "%s: failed to get dynamic port map support, use default\n", __func__); swrm->dynamic_port_map_supported = 1; } if (!(of_property_read_u32(pdev->dev.of_node, "swrm-io-base", &swrm->swrm_base_reg))) ret = of_property_read_u32(pdev->dev.of_node, Loading soc/swr-mstr-ctrl.h +1 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ struct swr_mstr_ctrl { u8 rcmd_id; u8 wcmd_id; u32 master_id; u32 dynamic_port_map_supported; void *handle; /* SWR Master handle from client for read and writes */ int (*read)(void *handle, int reg); int (*write)(void *handle, int reg, int val); Loading Loading
include/soc/soundwire.h +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/regmap.h> #include "audio_mod_devicetable.h" #define SWR_CLK_RATE_0P3MHZ 300000 #define SWR_CLK_RATE_0P6MHZ 600000 #define SWR_CLK_RATE_1P2MHZ 1200000 #define SWR_CLK_RATE_2P4MHZ 2400000 Loading
soc/swr-mstr-ctrl.c +14 −2 Original line number Diff line number Diff line Loading @@ -1567,6 +1567,7 @@ static int swrm_connect_port(struct swr_master *master, mport->req_ch |= mstr_ch_msk; master->port_en_mask |= (1 << mstr_port_id); if (swrm->clk_stop_mode0_supp && swrm->dynamic_port_map_supported && (mport->ch_rate < portinfo->ch_rate[i])) { mport->ch_rate = portinfo->ch_rate[i]; swrm_update_bus_clk(swrm); Loading Loading @@ -1633,7 +1634,9 @@ static int swrm_disconnect_port(struct swr_master *master, } port_req->req_ch &= ~portinfo->ch_en[i]; mport->req_ch &= ~mstr_ch_mask; if (swrm->clk_stop_mode0_supp && !mport->req_ch) { if (swrm->clk_stop_mode0_supp && swrm->dynamic_port_map_supported && !mport->req_ch) { mport->ch_rate = 0; swrm_update_bus_clk(swrm); } Loading Loading @@ -2326,6 +2329,15 @@ static int swrm_probe(struct platform_device *pdev) dev_err(&pdev->dev, "%s: failed to get master id\n", __func__); goto err_pdata_fail; } ret = of_property_read_u32(pdev->dev.of_node, "qcom,dynamic-port-map-supported", &swrm->dynamic_port_map_supported); if (ret) { dev_dbg(&pdev->dev, "%s: failed to get dynamic port map support, use default\n", __func__); swrm->dynamic_port_map_supported = 1; } if (!(of_property_read_u32(pdev->dev.of_node, "swrm-io-base", &swrm->swrm_base_reg))) ret = of_property_read_u32(pdev->dev.of_node, Loading
soc/swr-mstr-ctrl.h +1 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ struct swr_mstr_ctrl { u8 rcmd_id; u8 wcmd_id; u32 master_id; u32 dynamic_port_map_supported; void *handle; /* SWR Master handle from client for read and writes */ int (*read)(void *handle, int reg); int (*write)(void *handle, int reg, int val); Loading