All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>,
	linux-samsung-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Jitao Shi <jitao.shi@mediatek.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	linux-mediatek@lists.infradead.org,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	linux-tegra@vger.kernel.org, Sean Paul <sean@poorly.run>,
	linux-arm-kernel@lists.infradead.org,
	Purism Kernel Team <kernel@puri.sm>,
	linux-renesas-soc@vger.kernel.org,
	Boris Brezillon <boris.brezillon@collabora.com>
Subject: [PATCH v2 12/25] drm/panel: lvds: use drm_panel backlight support
Date: Sat,  7 Dec 2019 15:03:40 +0100	[thread overview]
Message-ID: <20191207140353.23967-13-sam@ravnborg.org> (raw)
In-Reply-To: <20191207140353.23967-1-sam@ravnborg.org>

Use the backlight support in drm_panel to simplify the driver

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/panel/panel-lvds.c | 40 ++++--------------------------
 1 file changed, 5 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index 5e40b674bb15..5ce3f4a2b7a1 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -8,7 +8,6 @@
  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  */
 
-#include <linux/backlight.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
@@ -34,7 +33,6 @@ struct panel_lvds {
 	unsigned int bus_format;
 	bool data_mirror;
 
-	struct backlight_device *backlight;
 	struct regulator *supply;
 
 	struct gpio_desc *enable_gpio;
@@ -46,19 +44,6 @@ static inline struct panel_lvds *to_panel_lvds(struct drm_panel *panel)
 	return container_of(panel, struct panel_lvds, panel);
 }
 
-static int panel_lvds_disable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.power = FB_BLANK_POWERDOWN;
-		lvds->backlight->props.state |= BL_CORE_FBBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_unprepare(struct drm_panel *panel)
 {
 	struct panel_lvds *lvds = to_panel_lvds(panel);
@@ -93,19 +78,6 @@ static int panel_lvds_prepare(struct drm_panel *panel)
 	return 0;
 }
 
-static int panel_lvds_enable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.state &= ~BL_CORE_FBBLANK;
-		lvds->backlight->props.power = FB_BLANK_UNBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_get_modes(struct drm_panel *panel,
 				struct drm_connector *connector)
 {
@@ -132,10 +104,8 @@ static int panel_lvds_get_modes(struct drm_panel *panel,
 }
 
 static const struct drm_panel_funcs panel_lvds_funcs = {
-	.disable = panel_lvds_disable,
 	.unprepare = panel_lvds_unprepare,
 	.prepare = panel_lvds_prepare,
-	.enable = panel_lvds_enable,
 	.get_modes = panel_lvds_get_modes,
 };
 
@@ -242,10 +212,6 @@ static int panel_lvds_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	lvds->backlight = devm_of_find_backlight(lvds->dev);
-	if (IS_ERR(lvds->backlight))
-		return PTR_ERR(lvds->backlight);
-
 	/*
 	 * TODO: Handle all power supplies specified in the DT node in a generic
 	 * way for panels that don't care about power supply ordering. LVDS
@@ -257,6 +223,10 @@ static int panel_lvds_probe(struct platform_device *pdev)
 	drm_panel_init(&lvds->panel, lvds->dev, &panel_lvds_funcs,
 		       DRM_MODE_CONNECTOR_LVDS);
 
+	ret = drm_panel_of_backlight(&lvds->panel);
+	if (ret)
+		return ret;
+
 	ret = drm_panel_add(&lvds->panel);
 	if (ret < 0)
 		return ret;
@@ -271,7 +241,7 @@ static int panel_lvds_remove(struct platform_device *pdev)
 
 	drm_panel_remove(&lvds->panel);
 
-	panel_lvds_disable(&lvds->panel);
+	drm_panel_disable(&lvds->panel);
 
 	return 0;
 }
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID
From: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: Abhinav Kumar <abhinavk@codeaurora.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Jitao Shi <jitao.shi@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Purism Kernel Team <kernel@puri.sm>, Sean Paul <sean@poorly.run>,
	Stefan Agner <stefan@agner.ch>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH v2 12/25] drm/panel: lvds: use drm_panel backlight support
Date: Sat,  7 Dec 2019 15:03:40 +0100	[thread overview]
Message-ID: <20191207140353.23967-13-sam@ravnborg.org> (raw)
In-Reply-To: <20191207140353.23967-1-sam@ravnborg.org>

Use the backlight support in drm_panel to simplify the driver

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/panel/panel-lvds.c | 40 ++++--------------------------
 1 file changed, 5 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index 5e40b674bb15..5ce3f4a2b7a1 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -8,7 +8,6 @@
  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  */
 
-#include <linux/backlight.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
@@ -34,7 +33,6 @@ struct panel_lvds {
 	unsigned int bus_format;
 	bool data_mirror;
 
-	struct backlight_device *backlight;
 	struct regulator *supply;
 
 	struct gpio_desc *enable_gpio;
@@ -46,19 +44,6 @@ static inline struct panel_lvds *to_panel_lvds(struct drm_panel *panel)
 	return container_of(panel, struct panel_lvds, panel);
 }
 
-static int panel_lvds_disable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.power = FB_BLANK_POWERDOWN;
-		lvds->backlight->props.state |= BL_CORE_FBBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_unprepare(struct drm_panel *panel)
 {
 	struct panel_lvds *lvds = to_panel_lvds(panel);
@@ -93,19 +78,6 @@ static int panel_lvds_prepare(struct drm_panel *panel)
 	return 0;
 }
 
-static int panel_lvds_enable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.state &= ~BL_CORE_FBBLANK;
-		lvds->backlight->props.power = FB_BLANK_UNBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_get_modes(struct drm_panel *panel,
 				struct drm_connector *connector)
 {
@@ -132,10 +104,8 @@ static int panel_lvds_get_modes(struct drm_panel *panel,
 }
 
 static const struct drm_panel_funcs panel_lvds_funcs = {
-	.disable = panel_lvds_disable,
 	.unprepare = panel_lvds_unprepare,
 	.prepare = panel_lvds_prepare,
-	.enable = panel_lvds_enable,
 	.get_modes = panel_lvds_get_modes,
 };
 
@@ -242,10 +212,6 @@ static int panel_lvds_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	lvds->backlight = devm_of_find_backlight(lvds->dev);
-	if (IS_ERR(lvds->backlight))
-		return PTR_ERR(lvds->backlight);
-
 	/*
 	 * TODO: Handle all power supplies specified in the DT node in a generic
 	 * way for panels that don't care about power supply ordering. LVDS
@@ -257,6 +223,10 @@ static int panel_lvds_probe(struct platform_device *pdev)
 	drm_panel_init(&lvds->panel, lvds->dev, &panel_lvds_funcs,
 		       DRM_MODE_CONNECTOR_LVDS);
 
+	ret = drm_panel_of_backlight(&lvds->panel);
+	if (ret)
+		return ret;
+
 	ret = drm_panel_add(&lvds->panel);
 	if (ret < 0)
 		return ret;
@@ -271,7 +241,7 @@ static int panel_lvds_remove(struct platform_device *pdev)
 
 	drm_panel_remove(&lvds->panel);
 
-	panel_lvds_disable(&lvds->panel);
+	drm_panel_disable(&lvds->panel);
 
 	return 0;
 }
-- 
2.20.1


WARNING: multiple messages have this Message-ID
From: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>, Stefan Agner <stefan@agner.ch>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	linux-samsung-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Jitao Shi <jitao.shi@mediatek.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	linux-tegra@vger.kernel.org, Sean Paul <sean@poorly.run>,
	linux-arm-kernel@lists.infradead.org,
	Purism Kernel Team <kernel@puri.sm>,
	linux-renesas-soc@vger.kernel.org,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH v2 12/25] drm/panel: lvds: use drm_panel backlight support
Date: Sat,  7 Dec 2019 15:03:40 +0100	[thread overview]
Message-ID: <20191207140353.23967-13-sam@ravnborg.org> (raw)
In-Reply-To: <20191207140353.23967-1-sam@ravnborg.org>

Use the backlight support in drm_panel to simplify the driver

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/panel/panel-lvds.c | 40 ++++--------------------------
 1 file changed, 5 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index 5e40b674bb15..5ce3f4a2b7a1 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -8,7 +8,6 @@
  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  */
 
-#include <linux/backlight.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
@@ -34,7 +33,6 @@ struct panel_lvds {
 	unsigned int bus_format;
 	bool data_mirror;
 
-	struct backlight_device *backlight;
 	struct regulator *supply;
 
 	struct gpio_desc *enable_gpio;
@@ -46,19 +44,6 @@ static inline struct panel_lvds *to_panel_lvds(struct drm_panel *panel)
 	return container_of(panel, struct panel_lvds, panel);
 }
 
-static int panel_lvds_disable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.power = FB_BLANK_POWERDOWN;
-		lvds->backlight->props.state |= BL_CORE_FBBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_unprepare(struct drm_panel *panel)
 {
 	struct panel_lvds *lvds = to_panel_lvds(panel);
@@ -93,19 +78,6 @@ static int panel_lvds_prepare(struct drm_panel *panel)
 	return 0;
 }
 
-static int panel_lvds_enable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.state &= ~BL_CORE_FBBLANK;
-		lvds->backlight->props.power = FB_BLANK_UNBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_get_modes(struct drm_panel *panel,
 				struct drm_connector *connector)
 {
@@ -132,10 +104,8 @@ static int panel_lvds_get_modes(struct drm_panel *panel,
 }
 
 static const struct drm_panel_funcs panel_lvds_funcs = {
-	.disable = panel_lvds_disable,
 	.unprepare = panel_lvds_unprepare,
 	.prepare = panel_lvds_prepare,
-	.enable = panel_lvds_enable,
 	.get_modes = panel_lvds_get_modes,
 };
 
@@ -242,10 +212,6 @@ static int panel_lvds_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	lvds->backlight = devm_of_find_backlight(lvds->dev);
-	if (IS_ERR(lvds->backlight))
-		return PTR_ERR(lvds->backlight);
-
 	/*
 	 * TODO: Handle all power supplies specified in the DT node in a generic
 	 * way for panels that don't care about power supply ordering. LVDS
@@ -257,6 +223,10 @@ static int panel_lvds_probe(struct platform_device *pdev)
 	drm_panel_init(&lvds->panel, lvds->dev, &panel_lvds_funcs,
 		       DRM_MODE_CONNECTOR_LVDS);
 
+	ret = drm_panel_of_backlight(&lvds->panel);
+	if (ret)
+		return ret;
+
 	ret = drm_panel_add(&lvds->panel);
 	if (ret < 0)
 		return ret;
@@ -271,7 +241,7 @@ static int panel_lvds_remove(struct platform_device *pdev)
 
 	drm_panel_remove(&lvds->panel);
 
-	panel_lvds_disable(&lvds->panel);
+	drm_panel_disable(&lvds->panel);
 
 	return 0;
 }
-- 
2.20.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID
From: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>, Stefan Agner <stefan@agner.ch>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	linux-samsung-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Jitao Shi <jitao.shi@mediatek.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	linux-tegra@vger.kernel.org, Sean Paul <sean@poorly.run>,
	linux-arm-kernel@lists.infradead.org,
	Purism Kernel Team <kernel@puri.sm>,
	linux-renesas-soc@vger.kernel.org,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH v2 12/25] drm/panel: lvds: use drm_panel backlight support
Date: Sat,  7 Dec 2019 15:03:40 +0100	[thread overview]
Message-ID: <20191207140353.23967-13-sam@ravnborg.org> (raw)
In-Reply-To: <20191207140353.23967-1-sam@ravnborg.org>

Use the backlight support in drm_panel to simplify the driver

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/panel/panel-lvds.c | 40 ++++--------------------------
 1 file changed, 5 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index 5e40b674bb15..5ce3f4a2b7a1 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -8,7 +8,6 @@
  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  */
 
-#include <linux/backlight.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of_platform.h>
@@ -34,7 +33,6 @@ struct panel_lvds {
 	unsigned int bus_format;
 	bool data_mirror;
 
-	struct backlight_device *backlight;
 	struct regulator *supply;
 
 	struct gpio_desc *enable_gpio;
@@ -46,19 +44,6 @@ static inline struct panel_lvds *to_panel_lvds(struct drm_panel *panel)
 	return container_of(panel, struct panel_lvds, panel);
 }
 
-static int panel_lvds_disable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.power = FB_BLANK_POWERDOWN;
-		lvds->backlight->props.state |= BL_CORE_FBBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_unprepare(struct drm_panel *panel)
 {
 	struct panel_lvds *lvds = to_panel_lvds(panel);
@@ -93,19 +78,6 @@ static int panel_lvds_prepare(struct drm_panel *panel)
 	return 0;
 }
 
-static int panel_lvds_enable(struct drm_panel *panel)
-{
-	struct panel_lvds *lvds = to_panel_lvds(panel);
-
-	if (lvds->backlight) {
-		lvds->backlight->props.state &= ~BL_CORE_FBBLANK;
-		lvds->backlight->props.power = FB_BLANK_UNBLANK;
-		backlight_update_status(lvds->backlight);
-	}
-
-	return 0;
-}
-
 static int panel_lvds_get_modes(struct drm_panel *panel,
 				struct drm_connector *connector)
 {
@@ -132,10 +104,8 @@ static int panel_lvds_get_modes(struct drm_panel *panel,
 }
 
 static const struct drm_panel_funcs panel_lvds_funcs = {
-	.disable = panel_lvds_disable,
 	.unprepare = panel_lvds_unprepare,
 	.prepare = panel_lvds_prepare,
-	.enable = panel_lvds_enable,
 	.get_modes = panel_lvds_get_modes,
 };
 
@@ -242,10 +212,6 @@ static int panel_lvds_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	lvds->backlight = devm_of_find_backlight(lvds->dev);
-	if (IS_ERR(lvds->backlight))
-		return PTR_ERR(lvds->backlight);
-
 	/*
 	 * TODO: Handle all power supplies specified in the DT node in a generic
 	 * way for panels that don't care about power supply ordering. LVDS
@@ -257,6 +223,10 @@ static int panel_lvds_probe(struct platform_device *pdev)
 	drm_panel_init(&lvds->panel, lvds->dev, &panel_lvds_funcs,
 		       DRM_MODE_CONNECTOR_LVDS);
 
+	ret = drm_panel_of_backlight(&lvds->panel);
+	if (ret)
+		return ret;
+
 	ret = drm_panel_add(&lvds->panel);
 	if (ret < 0)
 		return ret;
@@ -271,7 +241,7 @@ static int panel_lvds_remove(struct platform_device *pdev)
 
 	drm_panel_remove(&lvds->panel);
 
-	panel_lvds_disable(&lvds->panel);
+	drm_panel_disable(&lvds->panel);
 
 	return 0;
 }
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-12-07 14:03 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07 14:03 [PATCH v2 0/25] drm/panel infrastructure + backlight update Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 01/25] drm/drm_panel: no error when no callback Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 19:08   ` Michał Mirosław
2019-12-08  8:41     ` Sam Ravnborg
2019-12-09  0:50   ` Laurent Pinchart
2019-12-09  0:50     ` Laurent Pinchart
2019-12-09  0:50     ` Laurent Pinchart
2019-12-09  0:50     ` Laurent Pinchart
2019-12-07 14:03 ` [PATCH v2 02/25] drm/panel: add backlight support Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-09  0:55   ` Laurent Pinchart
2019-12-09  0:55     ` Laurent Pinchart
2019-12-09  0:55     ` Laurent Pinchart
2019-12-09  0:55     ` Laurent Pinchart
2019-12-13 13:30   ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-07 14:03 ` [PATCH v2 03/25] drm/panel: simple: use drm_panel " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 04/25] drm: get drm_bridge_panel connector via helper Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-10 14:48   ` [PATCH] drm/bridge: panel: export drm_panel_bridge_connector Mihail Atanassov
2019-12-10 14:48     ` Mihail Atanassov
2019-12-10 16:26     ` Laurent Pinchart
2019-12-10 16:26       ` Laurent Pinchart
2019-12-10 17:28       ` Mihail Atanassov
2019-12-10 17:28         ` Mihail Atanassov
2019-12-07 14:03 ` [PATCH v2 05/25] drm/panel: add drm_connector argument to get_modes() Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 06/25] drm/panel: decouple connector from drm_panel Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 07/25] drm/panel: drop drm_device " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 08/25] drm/panel: feiyang-fy07024di26a30d: use drm_panel backlight support Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 09/25] drm/panel: ilitek-ili9881c: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 10/25] drm/panel: innolux-p079zca: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 11/25] drm/panel: kingdisplay-kd097d04: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg [this message]
2019-12-07 14:03   ` [PATCH v2 12/25] drm/panel: lvds: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 13/25] drm/panel: olimex-lcd-olinuxino: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 14/25] drm/panel: osd-osd101t2587-53ts: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 15/25] drm/panel: panasonic-vvx10f034n00: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 16/25] drm/panel: raydium-rm68200: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 17/25] drm/panel: rocktech-jh057n00900: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 18/25] drm/panel: ronbo-rb070d30: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 19/25] drm/panel: seiko-43wvf1g: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 20/25] drm/panel: sharp-lq101r1sx01: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 21/25] drm/panel: sharp-ls043t1le01: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 22/25] drm/panel: sitronix-st7701: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 23/25] drm/panel: sitronix-st7789v: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 24/25] drm/panel: tpo-td028ttec1: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 25/25] drm/panel: tpo-tpg110: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-09 22:04 ` [PATCH v2 0/25] drm/panel infrastructure + backlight update Sam Ravnborg
2019-12-09 22:04   ` Sam Ravnborg
2019-12-09 22:04   ` Sam Ravnborg
2019-12-09 22:04   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191207140353.23967-13-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jagan@amarulasolutions.com \
    --cc=jitao.shi@mediatek.com \
    --cc=kernel@pengutronix.de \
    --cc=kernel@puri.sm \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=sean@poorly.run \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    --subject='Re: [PATCH v2 12/25] drm/panel: lvds: use drm_panel backlight support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.