mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
linux (Allwinner): reinstate sun8i_hdmi_phy_remove()
This commit is contained in:
parent
b64d14528b
commit
b277c31796
@ -76,7 +76,7 @@ diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8
|
|||||||
index b64d93da651d..e2936e7745b8 100644
|
index b64d93da651d..e2936e7745b8 100644
|
||||||
--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
||||||
+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
|
||||||
@@ -498,8 +498,9 @@ static void sun8i_hdmi_phy_init_h3(struct sun8i_hdmi_phy *phy)
|
@@ -506,8 +506,9 @@
|
||||||
regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG,
|
regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG,
|
||||||
SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, 0);
|
SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, 0);
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ index b64d93da651d..e2936e7745b8 100644
|
|||||||
|
|
||||||
/* read calibration data */
|
/* read calibration data */
|
||||||
regmap_read(phy->regs, SUN8I_HDMI_PHY_ANA_STS_REG, &val);
|
regmap_read(phy->regs, SUN8I_HDMI_PHY_ANA_STS_REG, &val);
|
||||||
@@ -576,8 +577,47 @@ void sun8i_hdmi_phy_set_ops(struct sun8i_hdmi_phy *phy,
|
@@ -584,8 +585,47 @@
|
||||||
plat_data->cur_ctr = variant->cur_ctr;
|
plat_data->cur_ctr = variant->cur_ctr;
|
||||||
plat_data->phy_config = variant->phy_cfg;
|
plat_data->phy_config = variant->phy_cfg;
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ index b64d93da651d..e2936e7745b8 100644
|
|||||||
static const struct regmap_config sun8i_hdmi_phy_regmap_config = {
|
static const struct regmap_config sun8i_hdmi_phy_regmap_config = {
|
||||||
.reg_bits = 32,
|
.reg_bits = 32,
|
||||||
.val_bits = 32,
|
.val_bits = 32,
|
||||||
@@ -653,6 +693,7 @@ int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
|
@@ -653,6 +693,7 @@
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = of_find_device_by_node(node);
|
struct platform_device *pdev = of_find_device_by_node(node);
|
||||||
struct sun8i_hdmi_phy *phy;
|
struct sun8i_hdmi_phy *phy;
|
||||||
@ -144,7 +144,7 @@ index b64d93da651d..e2936e7745b8 100644
|
|||||||
|
|
||||||
if (!pdev)
|
if (!pdev)
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
@@ -664,8 +705,35 @@ int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
|
@@ -666,8 +707,35 @@
|
||||||
hdmi->phy = phy;
|
hdmi->phy = phy;
|
||||||
|
|
||||||
put_device(&pdev->dev);
|
put_device(&pdev->dev);
|
||||||
@ -180,7 +180,7 @@ index b64d93da651d..e2936e7745b8 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
|
static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
|
||||||
@@ -690,6 +758,14 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
|
@@ -682,6 +750,14 @@
|
||||||
|
|
||||||
phy->variant = of_device_get_match_data(dev);
|
phy->variant = of_device_get_match_data(dev);
|
||||||
phy->dev = dev;
|
phy->dev = dev;
|
||||||
@ -195,3 +195,23 @@ index b64d93da651d..e2936e7745b8 100644
|
|||||||
|
|
||||||
regs = devm_platform_ioremap_resource(pdev, 0);
|
regs = devm_platform_ioremap_resource(pdev, 0);
|
||||||
if (IS_ERR(regs))
|
if (IS_ERR(regs))
|
||||||
|
@@ -728,8 +804,19 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int sun8i_hdmi_phy_remove(struct platform_device *pdev)
|
||||||
|
+{
|
||||||
|
+ struct sun8i_hdmi_phy *phy = platform_get_drvdata(pdev);
|
||||||
|
+
|
||||||
|
+ cec_notifier_cec_adap_unregister(phy->cec_notifier, phy->cec_adapter);
|
||||||
|
+ cec_unregister_adapter(phy->cec_adapter);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
struct platform_driver sun8i_hdmi_phy_driver = {
|
||||||
|
.probe = sun8i_hdmi_phy_probe,
|
||||||
|
+ .remove = sun8i_hdmi_phy_remove,
|
||||||
|
.driver = {
|
||||||
|
.name = "sun8i-hdmi-phy",
|
||||||
|
.of_match_table = sun8i_hdmi_phy_of_table,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user