aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
diff options
context:
space:
mode:
authorDmitry Baryshkov <[email protected]>2021-03-31 10:57:24 +0000
committerRob Clark <[email protected]>2021-04-07 18:05:45 +0000
commitaaadcbb4d70239b24b469ede7637c332820c12f0 (patch)
treeeb857f4a88f59b4ccde155f99adb57928a710de7 /drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
parentdrm/msm/dsi: use devm_of_clk_add_hw_provider (diff)
downloadkernel-aaadcbb4d70239b24b469ede7637c332820c12f0.tar.gz
kernel-aaadcbb4d70239b24b469ede7637c332820c12f0.zip
drm/msm/dsi: make save/restore_state phy-level functions
Morph msm_dsi_pll_save/restore_state() into msm_dsi_phy_save/restore_state(), thus removing last bits of knowledge about msm_dsi_pll from dsi_manager. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Tested-by: Stephen Boyd <[email protected]> # on sc7180 lazor Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/phy/dsi_phy.h')
-rw-r--r--drivers/gpu/drm/msm/dsi/phy/dsi_phy.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
index 2c5196844ba9..8133732e0c7f 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
@@ -6,6 +6,7 @@
#ifndef __DSI_PHY_H__
#define __DSI_PHY_H__
+#include <linux/clk-provider.h>
#include <linux/regulator/consumer.h>
#include "dsi.h"
@@ -13,6 +14,16 @@
#define dsi_phy_read(offset) msm_readl((offset))
#define dsi_phy_write(offset, data) msm_writel((data), (offset))
+struct msm_dsi_pll {
+ struct clk_hw clk_hw;
+ bool pll_on;
+ bool state_saved;
+
+ const struct msm_dsi_phy_cfg *cfg;
+};
+
+#define hw_clk_to_pll(x) container_of(x, struct msm_dsi_pll, clk_hw)
+
struct msm_dsi_phy_ops {
int (*pll_init)(struct msm_dsi_phy *phy);
int (*enable)(struct msm_dsi_phy *phy, int src_pll_id,