* [PATCH 10/32] OMAPDSS: split overlay manager creation
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
Split the function that creates overlay manager structs into two: one
that creates just the structs, and one that creates the sysfs files for
the manager.
This will help us use the overlay manager structs with omapdrm in the
following patches, while still leaving the sysfs files out.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/apply.c | 9 ++++++---
drivers/video/omap2/dss/dss.h | 6 ++++--
drivers/video/omap2/dss/manager-sysfs.c | 2 ++
drivers/video/omap2/dss/manager.c | 29 ++++++++++++++++++++++-------
4 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index b84bd99..74d1d00 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -1577,7 +1577,8 @@ int omapdss_compat_init(void)
apply_init_priv();
- dss_init_overlay_managers(pdev);
+ dss_init_overlay_managers();
+ dss_init_overlay_managers_sysfs(pdev);
dss_init_overlays(pdev);
for (i = 0; i < omap_dss_get_num_overlay_managers(); i++) {
@@ -1640,7 +1641,8 @@ err_disp_sysfs:
dss_uninstall_mgr_ops();
err_mgr_ops:
- dss_uninit_overlay_managers(pdev);
+ dss_uninit_overlay_managers_sysfs(pdev);
+ dss_uninit_overlay_managers();
dss_uninit_overlays(pdev);
compat_refcnt--;
@@ -1668,7 +1670,8 @@ void omapdss_compat_uninit(void)
dss_uninstall_mgr_ops();
- dss_uninit_overlay_managers(pdev);
+ dss_uninit_overlay_managers_sysfs(pdev);
+ dss_uninit_overlay_managers();
dss_uninit_overlays(pdev);
out:
mutex_unlock(&compat_init_lock);
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 8475893..7964d3b 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -194,8 +194,10 @@ void display_uninit_sysfs(struct platform_device *pdev,
struct omap_dss_device *dssdev);
/* manager */
-int dss_init_overlay_managers(struct platform_device *pdev);
-void dss_uninit_overlay_managers(struct platform_device *pdev);
+int dss_init_overlay_managers(void);
+void dss_uninit_overlay_managers(void);
+int dss_init_overlay_managers_sysfs(struct platform_device *pdev);
+void dss_uninit_overlay_managers_sysfs(struct platform_device *pdev);
int dss_mgr_simple_check(struct omap_overlay_manager *mgr,
const struct omap_overlay_manager_info *info);
int dss_mgr_check_timings(struct omap_overlay_manager *mgr,
diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c
index 5104681..72784b3 100644
--- a/drivers/video/omap2/dss/manager-sysfs.c
+++ b/drivers/video/omap2/dss/manager-sysfs.c
@@ -511,4 +511,6 @@ void dss_manager_kobj_uninit(struct omap_overlay_manager *mgr)
{
kobject_del(&mgr->kobj);
kobject_put(&mgr->kobj);
+
+ memset(&mgr->kobj, 0, sizeof(mgr->kobj));
}
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 2551eaa..1aac9b4 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -36,9 +36,9 @@
static int num_managers;
static struct omap_overlay_manager *managers;
-int dss_init_overlay_managers(struct platform_device *pdev)
+int dss_init_overlay_managers(void)
{
- int i, r;
+ int i;
num_managers = dss_feat_get_num_mgrs();
@@ -76,6 +76,17 @@ int dss_init_overlay_managers(struct platform_device *pdev)
dss_feat_get_supported_outputs(mgr->id);
INIT_LIST_HEAD(&mgr->overlays);
+ }
+
+ return 0;
+}
+
+int dss_init_overlay_managers_sysfs(struct platform_device *pdev)
+{
+ int i, r;
+
+ for (i = 0; i < num_managers; ++i) {
+ struct omap_overlay_manager *mgr = &managers[i];
r = dss_manager_kobj_init(mgr, pdev);
if (r)
@@ -85,18 +96,22 @@ int dss_init_overlay_managers(struct platform_device *pdev)
return 0;
}
-void dss_uninit_overlay_managers(struct platform_device *pdev)
+void dss_uninit_overlay_managers(void)
+{
+ kfree(managers);
+ managers = NULL;
+ num_managers = 0;
+}
+
+void dss_uninit_overlay_managers_sysfs(struct platform_device *pdev)
{
int i;
for (i = 0; i < num_managers; ++i) {
struct omap_overlay_manager *mgr = &managers[i];
+
dss_manager_kobj_uninit(mgr);
}
-
- kfree(managers);
- managers = NULL;
- num_managers = 0;
}
int omap_dss_get_num_overlay_managers(void)
--
1.8.1.2
^ permalink raw reply related
* [PATCH 09/32] OMAPDSS: add helpers to get mgr or output from display
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
Add two helper functions that can be used to find either the DSS output
or the overlay manager that is connected to the given display.
This hides how the output and the manager are actually connected, making
it easier to change the connections in the future.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/gpu/drm/omapdrm/omap_drv.c | 5 ++++-
drivers/video/omap2/dss/manager-sysfs.c | 4 +++-
drivers/video/omap2/dss/output.c | 19 +++++++++++++++++++
drivers/video/omap2/omapfb/omapfb-ioctl.c | 9 +++++++--
drivers/video/omap2/omapfb/omapfb-main.c | 16 +++++++---------
include/video/omapdss.h | 3 +++
6 files changed, 43 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 9c53c25..691e760 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -247,6 +247,9 @@ static int omap_modeset_init(struct drm_device *dev)
struct drm_encoder *encoder = priv->encoders[i];
struct omap_dss_device *dssdev omap_encoder_get_dssdev(encoder);
+ struct omap_dss_output *output;
+
+ output = omapdss_find_output_from_display(dssdev);
/* figure out which crtc's we can connect the encoder to: */
encoder->possible_crtcs = 0;
@@ -259,7 +262,7 @@ static int omap_modeset_init(struct drm_device *dev)
supported_outputs dss_feat_get_supported_outputs(crtc_channel);
- if (supported_outputs & dssdev->output->id)
+ if (supported_outputs & output->id)
encoder->possible_crtcs |= (1 << id);
}
}
diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c
index 9a2fb59..5104681 100644
--- a/drivers/video/omap2/dss/manager-sysfs.c
+++ b/drivers/video/omap2/dss/manager-sysfs.c
@@ -78,7 +78,9 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr,
}
if (dssdev) {
- struct omap_dss_output *out = dssdev->output;
+ struct omap_dss_output *out;
+
+ out = omapdss_find_output_from_display(dssdev);
/*
* a registered device should have an output connected to it
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 4d01001..ab2c0f0 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -141,6 +141,25 @@ struct omap_dss_output *omap_dss_find_output_by_node(struct device_node *node)
}
EXPORT_SYMBOL(omap_dss_find_output_by_node);
+struct omap_dss_output *omapdss_find_output_from_display(struct omap_dss_device *dssdev)
+{
+ return dssdev->output;
+}
+EXPORT_SYMBOL(omapdss_find_output_from_display);
+
+struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev)
+{
+ struct omap_dss_output *out;
+
+ out = omapdss_find_output_from_display(dssdev);
+
+ if (out = NULL)
+ return NULL;
+
+ return out->manager;
+}
+EXPORT_SYMBOL(omapdss_find_mgr_from_display);
+
static const struct dss_mgr_ops *dss_mgr_ops;
int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops)
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
index d30b45d..146b6f5 100644
--- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
+++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
@@ -770,12 +770,17 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
case OMAPFB_WAITFORVSYNC:
DBG("ioctl WAITFORVSYNC\n");
- if (!display || !display->output || !display->output->manager) {
+
+ if (!display) {
r = -EINVAL;
break;
}
- mgr = display->output->manager;
+ mgr = omapdss_find_mgr_from_display(display);
+ if (!mgr) {
+ r = -EINVAL;
+ break;
+ }
r = mgr->wait_for_vsync(mgr);
break;
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index c84bb8a..dd972c5 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2363,18 +2363,16 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
int i, r;
struct omap_overlay_manager *mgr;
- if (!def_dssdev->output) {
- dev_err(fbdev->dev, "no output for the default display\n");
- return -EINVAL;
- }
-
for (i = 0; i < fbdev->num_displays; ++i) {
struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
- struct omap_dss_output *out = dssdev->output;
+ struct omap_dss_output *out;
- mgr = omap_dss_get_overlay_manager(out->dispc_channel);
+ out = omapdss_find_output_from_display(dssdev);
+ if (!out)
+ continue;
- if (!mgr || !out)
+ mgr = omap_dss_get_overlay_manager(out->dispc_channel);
+ if (!mgr)
continue;
if (mgr->output)
@@ -2383,7 +2381,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
mgr->set_output(mgr, out);
}
- mgr = def_dssdev->output->manager;
+ mgr = omapdss_find_mgr_from_display(def_dssdev);
if (!mgr) {
dev_err(fbdev->dev, "no ovl manager for the default display\n");
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 7fe6144..68b2345 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -785,6 +785,9 @@ int omapdss_output_set_device(struct omap_dss_output *out,
struct omap_dss_device *dssdev);
int omapdss_output_unset_device(struct omap_dss_output *out);
+struct omap_dss_output *omapdss_find_output_from_display(struct omap_dss_device *dssdev);
+struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev);
+
void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
u16 *xres, u16 *yres);
int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 08/32] OMAPDSS: clean up dss_[ovl|mgr]_get_device()
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
Minor cleanup for the dss_[ovl|mgr]_get_device() functions to make them
more readable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/apply.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index a4b356a..b84bd99 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -420,16 +420,14 @@ static void wait_pending_extra_info_updates(void)
DSSWARN("timeout in wait_pending_extra_info_updates\n");
}
-static inline struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl)
+static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr)
{
- return ovl->manager ?
- (ovl->manager->output ? ovl->manager->output->device : NULL) :
- NULL;
+ return mgr->output ? mgr->output->device : NULL;
}
-static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr)
+static struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl)
{
- return mgr->output ? mgr->output->device : NULL;
+ return ovl->manager ? dss_mgr_get_device(ovl->manager) : NULL;
}
static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr)
--
1.8.1.2
^ permalink raw reply related
* [PATCH 07/32] OMAPDSS: SDI: fix regulators for DT
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
SDI requires a regulator to operate. This regulator is, for some reason,
currently attached to the virtual omapdss device, instead of the SDI
device. This does not work for DT, as the regulator mappings need to be
described in the DT data, and the virtual omapdss device is not present
there.
Fix the issue by acquiring the regulator in the SDI device. To retain
compatibility with the current board files, the old method of getting
the regulator is kept. The old method can be removed when the board
files have been changed to pass the regulator to SDI.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/sdi.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 6277c05..2e3afb8 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -31,8 +31,11 @@
#include "dss.h"
static struct {
+ struct platform_device *pdev;
+
bool update_enabled;
struct regulator *vdds_sdi_reg;
+ bool vdds_sdi_from_core;
struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings;
@@ -258,8 +261,14 @@ static int sdi_init_display(struct omap_dss_device *dssdev)
vdds_sdi = dss_get_vdds_sdi();
if (IS_ERR(vdds_sdi)) {
- DSSERR("can't get VDDS_SDI regulator\n");
- return PTR_ERR(vdds_sdi);
+ vdds_sdi = regulator_get(&sdi.pdev->dev, "vdds_sdi");
+ if (IS_ERR(vdds_sdi)) {
+ DSSERR("can't get VDDS_SDI regulator\n");
+ return PTR_ERR(vdds_sdi);
+ }
+ sdi.vdds_sdi_from_core = false;
+ } else {
+ sdi.vdds_sdi_from_core = true;
}
sdi.vdds_sdi_reg = vdds_sdi;
@@ -363,6 +372,8 @@ static int omap_sdi_probe(struct platform_device *pdev)
{
int r;
+ sdi.pdev = pdev;
+
sdi_init_output(pdev);
if (pdev->dev.platform_data) {
@@ -384,6 +395,11 @@ static int __exit omap_sdi_remove(struct platform_device *pdev)
sdi_uninit_output(pdev);
+ if (sdi.vdds_sdi_reg != NULL && sdi.vdds_sdi_from_core = false) {
+ regulator_put(sdi.vdds_sdi_reg);
+ sdi.vdds_sdi_reg = NULL;
+ }
+
return 0;
}
--
1.8.1.2
^ permalink raw reply related
* [PATCH 06/32] OMAPDSS: DPI: fix regulators for DT
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
On some platforms DPI requires a regulator to be enabled to power up the
output pins. This regulator is, for some reason, currently attached to
the virtual omapdss device, instead of the DPI device. This does not
work for DT, as the regulator mappings need to be described in the DT
data, and the virtual omapdss device is not present there.
Fix the issue by acquiring the regulator in the DPI device. To retain
compatibility with the current board files, the old method of getting
the regulator is kept. The old method can be removed when the board
files have been changed to pass the regulator to DPI.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index ef8fca2..43f6b26 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -37,7 +37,10 @@
#include "dss_features.h"
static struct {
+ struct platform_device *pdev;
+
struct regulator *vdds_dsi_reg;
+ bool vdds_dsi_from_core;
struct platform_device *dsidev;
struct mutex lock;
@@ -583,10 +586,15 @@ static int dpi_init_display(struct omap_dss_device *dssdev)
struct regulator *vdds_dsi;
vdds_dsi = dss_get_vdds_dsi();
-
if (IS_ERR(vdds_dsi)) {
- DSSERR("can't get VDDS_DSI regulator\n");
- return PTR_ERR(vdds_dsi);
+ vdds_dsi = regulator_get(&dpi.pdev->dev, "vdds_dsi");
+ if (IS_ERR(vdds_dsi)) {
+ DSSERR("can't get VDDS_DSI regulator\n");
+ return PTR_ERR(vdds_dsi);
+ }
+ dpi.vdds_dsi_from_core = false;
+ } else {
+ dpi.vdds_dsi_from_core = true;
}
dpi.vdds_dsi_reg = vdds_dsi;
@@ -702,6 +710,8 @@ static int omap_dpi_probe(struct platform_device *pdev)
{
int r;
+ dpi.pdev = pdev;
+
mutex_init(&dpi.lock);
dpi_init_output(pdev);
@@ -725,6 +735,11 @@ static int __exit omap_dpi_remove(struct platform_device *pdev)
dpi_uninit_output(pdev);
+ if (dpi.vdds_dsi_reg != NULL && dpi.vdds_dsi_from_core = false) {
+ regulator_put(dpi.vdds_dsi_reg);
+ dpi.vdds_dsi_reg = NULL;
+ }
+
return 0;
}
--
1.8.1.2
^ permalink raw reply related
* [PATCH 05/32] OMAPDSS: fix dss_get_ctx_loss_count for DT
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
When using DT, dss device does not have platform data. However,
dss_get_ctx_loss_count() uses dss device's platform data to find the
get_ctx_loss_count function pointer.
To fix this, dss_get_ctx_loss_count() needs to be changed to get the
platform data from the omapdss device, which is a "virtual" device and
always has platform data.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dss.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 94f66f9..bd01608 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -157,7 +157,8 @@ static void dss_restore_context(void)
int dss_get_ctx_loss_count(void)
{
- struct omap_dss_board_info *board_data = dss.pdev->dev.platform_data;
+ struct platform_device *core_pdev = dss_get_core_pdev();
+ struct omap_dss_board_info *board_data = core_pdev->dev.platform_data;
int cnt;
if (!board_data->get_context_loss_count)
--
1.8.1.2
^ permalink raw reply related
* [PATCH 04/32] OMAPDSS: add omap_dss_find_output_by_node()
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
Add a support function to find a DSS output by given DT node. This is
used in later patches to link the panels to DSS outputs.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/output.c | 13 +++++++++++++
include/video/omapdss.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 3274628..4d01001 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -128,6 +128,19 @@ struct omap_dss_output *omap_dss_find_output(const char *name)
}
EXPORT_SYMBOL(omap_dss_find_output);
+struct omap_dss_output *omap_dss_find_output_by_node(struct device_node *node)
+{
+ struct omap_dss_output *out;
+
+ list_for_each_entry(out, &output_list, list) {
+ if (out->pdev->dev.of_node = node)
+ return out;
+ }
+
+ return NULL;
+}
+EXPORT_SYMBOL(omap_dss_find_output_by_node);
+
static const struct dss_mgr_ops *dss_mgr_ops;
int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops)
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index aad47a2..7fe6144 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -780,6 +780,7 @@ struct omap_overlay *omap_dss_get_overlay(int num);
struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id);
struct omap_dss_output *omap_dss_find_output(const char *name);
+struct omap_dss_output *omap_dss_find_output_by_node(struct device_node *node);
int omapdss_output_set_device(struct omap_dss_output *out,
struct omap_dss_device *dssdev);
int omapdss_output_unset_device(struct omap_dss_output *out);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 03/32] OMAPDSS: add omap_dss_find_output()
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
Add a support function to find a DSS output by given name. This is used
in later patches to link the panels to DSS outputs.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/output.c | 13 +++++++++++++
include/video/omapdss.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 5214df6..3274628 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -115,6 +115,19 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id)
}
EXPORT_SYMBOL(omap_dss_get_output);
+struct omap_dss_output *omap_dss_find_output(const char *name)
+{
+ struct omap_dss_output *out;
+
+ list_for_each_entry(out, &output_list, list) {
+ if (strcmp(out->name, name) = 0)
+ return out;
+ }
+
+ return NULL;
+}
+EXPORT_SYMBOL(omap_dss_find_output);
+
static const struct dss_mgr_ops *dss_mgr_ops;
int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops)
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index d5f1fff..aad47a2 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -779,6 +779,7 @@ int omap_dss_get_num_overlays(void);
struct omap_overlay *omap_dss_get_overlay(int num);
struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id);
+struct omap_dss_output *omap_dss_find_output(const char *name);
int omapdss_output_set_device(struct omap_dss_output *out,
struct omap_dss_device *dssdev);
int omapdss_output_unset_device(struct omap_dss_output *out);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 02/32] OMAPDSS: only probe pdata if there's one
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
omapdss output drivers always read the platform data. This crashes when
there's no platform data when using DT.
Add a check to read the platform data only if it exists.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dpi.c | 12 ++++++++----
drivers/video/omap2/dss/dsi.c | 13 +++++++------
drivers/video/omap2/dss/hdmi.c | 16 ++++++++++------
drivers/video/omap2/dss/rfbi.c | 11 ++++++-----
drivers/video/omap2/dss/sdi.c | 12 ++++++++----
drivers/video/omap2/dss/venc.c | 13 +++++++------
6 files changed, 46 insertions(+), 31 deletions(-)
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 757b57f..ef8fca2 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -706,13 +706,17 @@ static int omap_dpi_probe(struct platform_device *pdev)
dpi_init_output(pdev);
- r = dpi_probe_pdata(pdev);
- if (r) {
- dpi_uninit_output(pdev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = dpi_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+
+err_probe:
+ dpi_uninit_output(pdev);
+ return r;
}
static int __exit omap_dpi_remove(struct platform_device *pdev)
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index a73dedc..bdddd0d 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5563,12 +5563,10 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
dsi_init_output(dsidev);
- r = dsi_probe_pdata(dsidev);
- if (r) {
- dsi_runtime_put(dsidev);
- dsi_uninit_output(dsidev);
- pm_runtime_disable(&dsidev->dev);
- return r;
+ if (dsidev->dev.platform_data) {
+ r = dsi_probe_pdata(dsidev);
+ if (r)
+ goto err_probe;
}
dsi_runtime_put(dsidev);
@@ -5586,6 +5584,9 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
#endif
return 0;
+err_probe:
+ dsi_runtime_put(dsidev);
+ dsi_uninit_output(dsidev);
err_runtime_get:
pm_runtime_disable(&dsidev->dev);
return r;
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 17f4d55..99f4ab5 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1098,15 +1098,19 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev)
dss_debugfs_create_file("hdmi", hdmi_dump_regs);
- r = hdmi_probe_pdata(pdev);
- if (r) {
- hdmi_panel_exit();
- hdmi_uninit_output(pdev);
- pm_runtime_disable(&pdev->dev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = hdmi_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+
+err_probe:
+ hdmi_panel_exit();
+ hdmi_uninit_output(pdev);
+ pm_runtime_disable(&pdev->dev);
+ return r;
}
static int __exit hdmi_remove_child(struct device *dev, void *data)
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index 1a17dd1..1ff221e 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -1093,15 +1093,16 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
rfbi_init_output(pdev);
- r = rfbi_probe_pdata(pdev);
- if (r) {
- rfbi_uninit_output(pdev);
- pm_runtime_disable(&pdev->dev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = rfbi_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+err_probe:
+ rfbi_uninit_output(pdev);
err_runtime_get:
pm_runtime_disable(&pdev->dev);
return r;
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 0bcd302..6277c05 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -365,13 +365,17 @@ static int omap_sdi_probe(struct platform_device *pdev)
sdi_init_output(pdev);
- r = sdi_probe_pdata(pdev);
- if (r) {
- sdi_uninit_output(pdev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = sdi_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+
+err_probe:
+ sdi_uninit_output(pdev);
+ return r;
}
static int __exit omap_sdi_remove(struct platform_device *pdev)
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 74fdb3e..7b2e3ae 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -866,16 +866,17 @@ static int omap_venchw_probe(struct platform_device *pdev)
venc_init_output(pdev);
- r = venc_probe_pdata(pdev);
- if (r) {
- venc_panel_exit();
- venc_uninit_output(pdev);
- pm_runtime_disable(&pdev->dev);
- return r;
+ if (pdev->dev.platform_data) {
+ r = venc_probe_pdata(pdev);
+ if (r)
+ goto err_probe;
}
return 0;
+err_probe:
+ venc_panel_exit();
+ venc_uninit_output(pdev);
err_panel_init:
err_runtime_get:
pm_runtime_disable(&pdev->dev);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 01/32] OMAPDSS: add pdata->default_display_name
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
In-Reply-To: <1369906493-27538-1-git-send-email-tomi.valkeinen@ti.com>
We can currently set the default display (i.e. the initial display) in
the omapdss platform data by using a pointer to the default
omap_dss_device. Internally omapdss uses the device's name to resolve
the default display.
As it's difficult to get the omap_dss_device pointer in the future,
after we've changed the omapdss device model, this patch adds a new way
to define the default display, by using the name of the display.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
---
drivers/video/omap2/dss/core.c | 2 ++
include/video/omapdss.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 60cc6fe..502ec1b 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -235,6 +235,8 @@ static int __init omap_dss_probe(struct platform_device *pdev)
if (def_disp_name)
core.default_display_name = def_disp_name;
+ else if (pdata->default_display_name)
+ core.default_display_name = pdata->default_display_name;
else if (pdata->default_device)
core.default_display_name = pdata->default_device->name;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 62ca9a7..d5f1fff 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -365,6 +365,7 @@ struct omap_dss_board_info {
int num_devices;
struct omap_dss_device **devices;
struct omap_dss_device *default_device;
+ const char *default_display_name;
int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask);
void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
int (*set_min_bus_tput)(struct device *dev, unsigned long r);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 00/32] OMAPDSS: dss-dev-model "base" (Part 1/2)
From: Tomi Valkeinen @ 2013-05-30 9:34 UTC (permalink / raw)
To: linux-fbdev, linux-omap, Archit Taneja; +Cc: Tomi Valkeinen
Hi,
Here's are the first sets of patches targeting towards enabling DT for DSS and
changing the DSS device model to be more versatile. The exact division of the
sets of patches is still a bit open, and some splitting up for arch/driver
changes is needed, but most likely there will be at least the following major
sets, each based on the former one:
- base, containing cleanups and changes that do not yet really bring bigger new
features
- dev-model, implements the new DSS device model, including new panel drivers
- dt, adds DSS DT support (not at all ready yet, although works for a few boards)
The patches can be found from the following branches:
git://gitorious.org/linux-omap-dss2/linux.git work/dss-dev-model-base
git://gitorious.org/linux-omap-dss2/linux.git work/dss-dev-model
git://gitorious.org/linux-omap-dss2/linux.git work/dss-dev-model-dt
The set you are looking at is the "base" set.
The "base" set shouldn't change anything from the user's point of view. It
contains patches that do not make much sense until "dev-model" and "dt" are
merged, but those patches should not cause any problems either. Most likely the
"base" set is quite stable, I don't expect any changes to it.
Tomi
Tomi Valkeinen (32):
OMAPDSS: add pdata->default_display_name
OMAPDSS: only probe pdata if there's one
OMAPDSS: add omap_dss_find_output()
OMAPDSS: add omap_dss_find_output_by_node()
OMAPDSS: fix dss_get_ctx_loss_count for DT
OMAPDSS: DPI: fix regulators for DT
OMAPDSS: SDI: fix regulators for DT
OMAPDSS: clean up dss_[ovl|mgr]_get_device()
OMAPDSS: add helpers to get mgr or output from display
OMAPDSS: split overlay manager creation
OMAPDRM: fix overlay manager handling
OMAPDSS: Implement display (dis)connect support
OMAPDSS: CORE: use devm_regulator_get
OMAPDSS: DSI: cleanup regulator init
OMAPDSS: DPI: cleanup pll & regulator init
OMAPDSS: HDMI: add hdmi_init_regulator
OMAPDSS: SDI: clean up regulator init
OMAPDSS: VENC: clean up regulator init
OMAPDSS: add videomode conversion support
OMAPDSS: remove dssdev uses in trivial cases
OMAPDSS: add panel list
OMAPDSS: use the panel list in omap_dss_get_next_device
OMAPDSS: don't use dss bus in suspend/resume
OMAPDSS: implement display sysfs without dss bus
OMAPDSS: Add panel dev pointer to dssdev
OMAPDSS: remove omap_dss_start/stop_device()
OMAPDSS: combine omap_dss_output into omap_dss_device
OMAPDSS: omapdss.h: add owner field to omap_dss_device
OMAPDSS: add module_get/put to omap_dss_get/put_device()
OMAPDSS: add THIS_MODULE owner to DSS outputs
OMAPDSS: output: increase refcount in find_output funcs
OMAPFB: use EPROBE_DEFER if default display is not present
drivers/gpu/drm/omapdrm/omap_crtc.c | 46 +++-
drivers/gpu/drm/omapdrm/omap_drv.c | 21 +-
drivers/gpu/drm/omapdrm/omap_drv.h | 1 +
drivers/video/omap2/displays/panel-acx565akm.c | 16 +-
drivers/video/omap2/displays/panel-generic-dpi.c | 26 +--
.../omap2/displays/panel-lgphilips-lb035q02.c | 10 +-
drivers/video/omap2/displays/panel-n8x0.c | 30 +--
.../omap2/displays/panel-nec-nl8048hl11-01b.c | 4 +-
drivers/video/omap2/displays/panel-picodlp.c | 32 +--
.../video/omap2/displays/panel-sharp-ls037v7dw01.c | 10 +-
drivers/video/omap2/displays/panel-taal.c | 164 +++++++-------
drivers/video/omap2/displays/panel-tfp410.c | 32 +--
.../video/omap2/displays/panel-tpo-td043mtea1.c | 36 +--
drivers/video/omap2/dss/Kconfig | 1 +
drivers/video/omap2/dss/apply.c | 47 ++--
drivers/video/omap2/dss/core.c | 108 +++++----
drivers/video/omap2/dss/dispc.c | 4 +
drivers/video/omap2/dss/display-sysfs.c | 154 +++++++------
drivers/video/omap2/dss/display.c | 246 ++++++++++++++-------
drivers/video/omap2/dss/dpi.c | 140 ++++++------
drivers/video/omap2/dss/dsi.c | 124 ++++-------
drivers/video/omap2/dss/dss.c | 3 +-
drivers/video/omap2/dss/dss.h | 16 +-
drivers/video/omap2/dss/hdmi.c | 87 ++++----
drivers/video/omap2/dss/manager-sysfs.c | 47 ++--
drivers/video/omap2/dss/manager.c | 29 ++-
drivers/video/omap2/dss/output.c | 78 ++++++-
drivers/video/omap2/dss/rfbi.c | 39 ++--
drivers/video/omap2/dss/sdi.c | 78 ++++---
drivers/video/omap2/dss/venc.c | 74 +++----
drivers/video/omap2/dss/venc_panel.c | 16 +-
drivers/video/omap2/omapfb/omapfb-ioctl.c | 9 +-
drivers/video/omap2/omapfb/omapfb-main.c | 27 +--
include/video/omapdss.h | 103 ++++++---
34 files changed, 1088 insertions(+), 770 deletions(-)
--
1.8.1.2
^ permalink raw reply
* [PATCH] backlight: Turn backlight on/off when necessary
From: Liu Ying @ 2013-05-30 8:13 UTC (permalink / raw)
To: FlorianSchandinat; +Cc: linux-fbdev, linux-kernel, liu.y.victor, Liu Ying
We don't have to turn backlight on/off everytime a blanking
or unblanking event comes because the backlight status may have
already been what we want. Another thought is that one backlight
device may be shared by multiple framebuffers. We don't hope that
blanking one of the framebuffers would turn the backlight off for
all the other framebuffers, since they are likely active to show
display content. This patch adds logic to record each framebuffer's
backlight status to determine the backlight device use count and
whether the backlight should be turned on or off.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
drivers/video/backlight/backlight.c | 23 +++++++++++++++++------
include/linux/backlight.h | 6 ++++++
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index c74e7aa..97ea2b8 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -31,13 +31,14 @@ static const char *const backlight_types[] = {
defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE))
/* This callback gets called when something important happens inside a
* framebuffer driver. We're looking if that important event is blanking,
- * and if it is, we're switching backlight power as well ...
+ * and if it is and necessary, we're switching backlight power as well ...
*/
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct backlight_device *bd;
struct fb_event *evdata = data;
+ int node = evdata->info->node;
/* If we aren't interested in this event, skip it immediately ... */
if (event != FB_EVENT_BLANK && event != FB_EVENT_CONBLANK)
@@ -49,11 +50,21 @@ static int fb_notifier_callback(struct notifier_block *self,
if (!bd->ops->check_fb ||
bd->ops->check_fb(bd, evdata->info)) {
bd->props.fb_blank = *(int *)evdata->data;
- if (bd->props.fb_blank = FB_BLANK_UNBLANK)
- bd->props.state &= ~BL_CORE_FBBLANK;
- else
- bd->props.state |= BL_CORE_FBBLANK;
- backlight_update_status(bd);
+ if (bd->props.fb_blank = FB_BLANK_UNBLANK &&
+ !bd->fb_bl_on[node]) {
+ bd->fb_bl_on[node] = true;
+ if (!bd->use_count++) {
+ bd->props.state &= ~BL_CORE_FBBLANK;
+ backlight_update_status(bd);
+ }
+ } else if (bd->props.fb_blank != FB_BLANK_UNBLANK &&
+ bd->fb_bl_on[node]) {
+ bd->fb_bl_on[node] = false;
+ if (!(--bd->use_count)) {
+ bd->props.state |= BL_CORE_FBBLANK;
+ backlight_update_status(bd);
+ }
+ }
}
mutex_unlock(&bd->ops_lock);
return 0;
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index da9a082..5de71a0 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -9,6 +9,7 @@
#define _LINUX_BACKLIGHT_H
#include <linux/device.h>
+#include <linux/fb.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
@@ -101,6 +102,11 @@ struct backlight_device {
struct notifier_block fb_notif;
struct device dev;
+
+ /* Multiple framebuffers may share one backlight device */
+ bool fb_bl_on[FB_MAX];
+
+ int use_count;
};
static inline void backlight_update_status(struct backlight_device *bd)
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Lars-Peter Clausen @ 2013-05-30 7:52 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD
Cc: Jingoo Han, 'Michael Hennerich',
'Rafael J. Wysocki', 'Tomi Valkeinen',
linux-fbdev, linux-pm
In-Reply-To: <20130530071413.GC19468@game.jcrosoft.org>
On 05/30/2013 09:14 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:32 Thu 30 May , Jingoo Han wrote:
>> On Thursday, May 30, 2013 4:20 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>> On 16:24 Wed 29 May , Michael Hennerich wrote:
>>>> On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
>>>>> Use dev_pm_ops instead of the legacy suspend/resume callbacks.
>>>>>
>>>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>>> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
>>>>> ---
>>>>> drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
>>>>> 1 file changed, 14 insertions(+), 8 deletions(-)
>>>>>
>>>>> diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
>>>>> index 29d8c04..6084c17 100644
>>>>> --- a/drivers/video/bfin-lq035q1-fb.c
>>>>> +++ b/drivers/video/bfin-lq035q1-fb.c
>>>>> @@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
>>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
>>>>> }
>>>>> -#ifdef CONFIG_PM
>>>>> -static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
>>>>> +#ifdef CONFIG_PM_SLEEP
>>>>> +static int lq035q1_spidev_suspend(struct device *dev)
>>>>> {
>>>>> + struct spi_device *spi = to_spi_device(dev);
>>>>> +
>>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
>>>>> }
>>>>> -static int lq035q1_spidev_resume(struct spi_device *spi)
>>>>> +static int lq035q1_spidev_resume(struct device *dev)
>>>>> {
>>>>> - int ret;
>>>>> + struct spi_device *spi = to_spi_device(dev);
>>>>> struct spi_control *ctl = spi_get_drvdata(spi);
>>>>> + int ret;
>>>>> ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
>>>>> if (ret)
>>>>> @@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
>>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
>>>>> }
>>>>> +
>>>>> +static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
>>>>> + lq035q1_spidev_resume);
>>>>> +#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
>>>>> +
>>>>> #else
>>>>> -# define lq035q1_spidev_suspend NULL
>>>>> -# define lq035q1_spidev_resume NULL
>>>>> +#define LQ035Q1_SPIDEV_PM_OPS NULL
>>>>> #endif
>>> we really need to ahve a macro like for DT of_match_ptr to drop the #else
>>
>> Hi Jean-Christophe PLAGNIOL-VILLARD,
>>
>> I submitted the following patch. :)
>> (https://patchwork.kernel.org/patch/2502971/)
>>
>> --- a/include/linux/pm.h
>> +++ b/include/linux/pm.h
>> @@ -55,8 +55,10 @@ struct device;
>>
>> #ifdef CONFIG_PM
>> extern const char power_group_name[]; /* = "power" */
>> +#define pm_ops_ptr(_ptr) (_ptr)
>> #else
>> #define power_group_name NULL
>> +#define pm_ops_ptr(_ptr) NULL
>> #endif
>>
>>
>> This patch was accepted by Rafael Wysocki, and will be merged to v3.11-rc1.
>>
> Lars-Peter please update with and
Since the code depends on CONFIG_PM_SLEEP and not CONFIG_PM I don't think
the macro will work.
- Lars
^ permalink raw reply
* Re: [PATCH 1/8] video: atmel_lcdfb: fix platform data struct
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-30 7:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACQ1gAj_m_aWaq5J41SY8EPwOH5-3zYPsf2WJCunvVnBCyq00Q@mail.gmail.com>
On 08:39 Thu 30 May , Richard Genoud wrote:
> 2013/5/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> > On 19:44 Wed 29 May , Richard Genoud wrote:
> >> 2013/5/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> >> > On 16:36 Wed 29 May , Richard Genoud wrote:
> >> >> 2013/4/11 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> >> >> > Today we mix pdata and drivers data in the struct atmel_lcdfb_info
> >> >> > Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only
> >> >> >
> >> >> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >> >> > Cc: linux-fbdev@vger.kernel.org
> >> >> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> >> >> > Cc: Andrew Morton <akpm@linux-foundation.org>
> >> >> > Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> >> >> > ---
> >> >> > arch/arm/mach-at91/at91sam9261_devices.c | 6 +-
> >> >> > arch/arm/mach-at91/at91sam9263_devices.c | 6 +-
> >> >> > arch/arm/mach-at91/at91sam9g45_devices.c | 6 +-
> >> >> > arch/arm/mach-at91/at91sam9rl_devices.c | 6 +-
> >> >> > arch/arm/mach-at91/board-sam9261ek.c | 6 +-
> >> >> > arch/arm/mach-at91/board-sam9263ek.c | 4 +-
> >> >> > arch/arm/mach-at91/board-sam9m10g45ek.c | 4 +-
> >> >> > arch/arm/mach-at91/board-sam9rlek.c | 4 +-
> >> >> > arch/arm/mach-at91/board.h | 4 +-
> >> >> > arch/avr32/boards/atngw100/evklcd10x.c | 6 +-
> >> >> > arch/avr32/boards/atngw100/mrmt.c | 4 +-
> >> >> > arch/avr32/boards/atstk1000/atstk1000.h | 2 +-
> >> >> > arch/avr32/boards/atstk1000/setup.c | 2 +-
> >> >> > arch/avr32/boards/favr-32/setup.c | 2 +-
> >> >> > arch/avr32/boards/hammerhead/setup.c | 2 +-
> >> >> > arch/avr32/boards/merisc/display.c | 2 +-
> >> >> > arch/avr32/boards/mimc200/setup.c | 4 +-
> >> >> > arch/avr32/mach-at32ap/at32ap700x.c | 8 +--
> >> >> > arch/avr32/mach-at32ap/include/mach/board.h | 4 +-
> >> >> > drivers/video/atmel_lcdfb.c | 104 +++++++++++++++++----------
> >> >> > include/video/atmel_lcdc.h | 24 +------
> >> >> > 21 files changed, 109 insertions(+), 101 deletions(-)
> >> >> >
> >> >> [snip]
> >> >> > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> >> >> > index c1a2914..98733cd4 100644
> >> >> > --- a/drivers/video/atmel_lcdfb.c
> >> >> > +++ b/drivers/video/atmel_lcdfb.c
> >> >> > @@ -20,12 +20,45 @@
> >> >> > #include <linux/gfp.h>
> >> >> > #include <linux/module.h>
> >> >> > #include <linux/platform_data/atmel.h>
> >> >> > +#include <video/of_display_timing.h>
> >> >> >
> >> >> > #include <mach/cpu.h>
> >> >> > #include <asm/gpio.h>
> >> >> >
> >> >> > #include <video/atmel_lcdc.h>
> >> >> >
> >> >> > +struct atmel_lcdfb_config {
> >> >> > + bool have_alt_pixclock;
> >> >> > + bool have_hozval;
> >> >> > + bool have_intensity_bit;
> >> >> > +};
> >> >> > +
> >> >> > + /* LCD Controller info data structure, stored in device platform_data */
> >> >> > +struct atmel_lcdfb_info {
> >> >> > + spinlock_t lock;
> >> >> > + struct fb_info *info;
> >> >> > + void __iomem *mmio;
> >> >> > + int irq_base;
> >> >> > + struct work_struct task;
> >> >> > +
> >> >> > + unsigned int smem_len;
> >> >> > + struct platform_device *pdev;
> >> >> > + struct clk *bus_clk;
> >> >> > + struct clk *lcdc_clk;
> >> >> > +
> >> >> > + struct backlight_device *backlight;
> >> >> > + u8 bl_power;
> >> >> > + bool lcdcon_pol_negative;
> >> >> I think lcdcon_pol_negative should be part of pdata, because it really
> >> >> depends on how the PWM is wired on the board.
> >> >>
> >> >
> >> > maybe but no one mainline use it on any pdata for non-dt boars
> >> > so I did not want to expose it
> >> Well, at least, I'm using it :)
> >> (and I guess that Andreas is using it also, otherwise he wouldn't have
> >> introduce it !)
> >
> > yes but pdata is for non-dt boards, for dt you can keep it in struct
> > atmel_lcdfb_info and add a property
> >
> > if non-dt boards want it my answer is I do not care switch to DT
>
> ok (I use a full DT board based on sam9g35)
>
> so I'll add something like
> sinfo->lcdcon_pol_negative = of_property_read_bool(display_np,
> "atmel,lcdcon-pwm-pulse-low");
> in /atmel_lcdfb.c
>
> But I thought the goal of this patch was to separate driver data from
> platform specific data, and IMHO, lcdcon_pol_negative is a specificity
> of the platform.
You are right but as non one mainline use it as pdata I choose to drop it
and only keep it on the driver as we can still use it for DT
It's a way to force peopoe to switch to DT
Best Regards,
J.
>
> Best regards,
> Richard.
^ permalink raw reply
* Re: [RFC] Add co-maintainer for fbdev
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-30 7:21 UTC (permalink / raw)
To: Andrew Morton
Cc: Jingoo Han, 'Arnd Bergmann',
'Florian Tobias Schandinat', 'Olof Johansson',
linux-fbdev, 'Linus Torvalds', linux-kernel,
'Tomi Valkeinen'
In-Reply-To: <20130529135346.43ebe4c4565d90cec195e38e@linux-foundation.org>
On 13:53 Wed 29 May , Andrew Morton wrote:
> On Wed, 29 May 2013 10:32:08 +0900 Jingoo Han <jg1.han@samsung.com> wrote:
>
> > On Wednesday, May 29, 2013 6:20 AM, Arnd Bergmann wrote:
> > > On Monday 27 May 2013, Florian Tobias Schandinat wrote:
> > > > >> On Fri, May 24, 2013 at 8:38 AM, Jean-Christophe PLAGNIOL-VILLARD
> > > > >> <plagnioj@jcrosoft.com> wrote:
> > > > >>> Hi Florian,
> > > > >>>
> > > > >>> As you seems very busy I'd like to propose the help you to handle the
> > > > >>> fbdev subsystem to easier the rich of the fbdev patch to Linus
> > > > >>>
> > > > >>> As I'm working on fbdev on at91 and others and already Co-Maintain the
> > > > >>> at91 mach on ARM
> > > > >>>
> > > > >>> And if you are not willing to continue I could take over
> > > >
> > > > Yeah, it would be great if you could help, at the moment I get barely
> > > > any sleep, let alone that I could keep up with the majority of mail I
> > > > get. I'll let you decide whether you want to be sole maintainer or not.
> > >
> > > For any bigger subsystems, it's good practice to have two maintainers,
> > > even if one of them does all the work. I think it makes sense to have
> > > Jean-Christophe as the primary maintainer and owner of the git tree,
> > > but it may also be good to have you or Tomi listed as a second maintainer
> > > for times when Jean-Christophe isn't available.
> >
> > Hi Arnd,
> >
> > I agree with Arnd's opinion.
> > It looks good to have Florian or Tomi listed as a second maintainer.
>
> Someone send a patch!
Olof notice on IRC
It was me I use git-send-email but the From was scrued and my name disapear
in the From
I resend it
Can I have you ack on it?
Best Regards,
J.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-30 7:14 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Michael Hennerich', 'Rafael J. Wysocki',
'Lars-Peter Clausen', 'Tomi Valkeinen',
linux-fbdev, linux-pm
In-Reply-To: <001801ce5ccd$2dd30be0$897923a0$@samsung.com>
On 09:32 Thu 30 May , Jingoo Han wrote:
> On Thursday, May 30, 2013 4:20 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 16:24 Wed 29 May , Michael Hennerich wrote:
> > > On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
> > > >Use dev_pm_ops instead of the legacy suspend/resume callbacks.
> > > >
> > > >Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > > Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> > > >---
> > > > drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
> > > > 1 file changed, 14 insertions(+), 8 deletions(-)
> > > >
> > > >diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> > > >index 29d8c04..6084c17 100644
> > > >--- a/drivers/video/bfin-lq035q1-fb.c
> > > >+++ b/drivers/video/bfin-lq035q1-fb.c
> > > >@@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > > }
> > > >-#ifdef CONFIG_PM
> > > >-static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> > > >+#ifdef CONFIG_PM_SLEEP
> > > >+static int lq035q1_spidev_suspend(struct device *dev)
> > > > {
> > > >+ struct spi_device *spi = to_spi_device(dev);
> > > >+
> > > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > > }
> > > >-static int lq035q1_spidev_resume(struct spi_device *spi)
> > > >+static int lq035q1_spidev_resume(struct device *dev)
> > > > {
> > > >- int ret;
> > > >+ struct spi_device *spi = to_spi_device(dev);
> > > > struct spi_control *ctl = spi_get_drvdata(spi);
> > > >+ int ret;
> > > > ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > > > if (ret)
> > > >@@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> > > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > > > }
> > > >+
> > > >+static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> > > >+ lq035q1_spidev_resume);
> > > >+#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
> > > >+
> > > > #else
> > > >-# define lq035q1_spidev_suspend NULL
> > > >-# define lq035q1_spidev_resume NULL
> > > >+#define LQ035Q1_SPIDEV_PM_OPS NULL
> > > > #endif
> > we really need to ahve a macro like for DT of_match_ptr to drop the #else
>
> Hi Jean-Christophe PLAGNIOL-VILLARD,
>
> I submitted the following patch. :)
> (https://patchwork.kernel.org/patch/2502971/)
>
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -55,8 +55,10 @@ struct device;
>
> #ifdef CONFIG_PM
> extern const char power_group_name[]; /* = "power" */
> +#define pm_ops_ptr(_ptr) (_ptr)
> #else
> #define power_group_name NULL
> +#define pm_ops_ptr(_ptr) NULL
> #endif
>
>
> This patch was accepted by Rafael Wysocki, and will be merged to v3.11-rc1.
>
Lars-Peter please update with and
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Rafael can you take this one via pm tree
Best Regards,
J.
>
> Best regards,
> Jingoo Han
>
> >
> > I known it's related to this patch but someone should do it
> >
> > Rafael what do you think
> >
> > Best Regards,
> > J.
> > > > /* Power down all displays on reboot, poweroff or halt */
> > > >@@ -708,8 +715,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> > > > info->spidrv.probe = lq035q1_spidev_probe;
> > > > info->spidrv.remove = lq035q1_spidev_remove;
> > > > info->spidrv.shutdown = lq035q1_spidev_shutdown;
> > > >- info->spidrv.suspend = lq035q1_spidev_suspend;
> > > >- info->spidrv.resume = lq035q1_spidev_resume;
> > > >+ info->spidrv.driver.pm = LQ035Q1_SPIDEV_PM_OPS;
> > > > ret = spi_register_driver(&info->spidrv);
> > > > if (ret < 0) {
> > >
> > >
> > > --
> > > Greetings,
> > > Michael
> > >
> > > --
> > > Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
> > > Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
> > > Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
> > > Margaret Seif
> > >
> > >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH 1/8] video: atmel_lcdfb: fix platform data struct
From: Richard Genoud @ 2013-05-30 6:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130529193220.GB19468@game.jcrosoft.org>
2013/5/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> On 19:44 Wed 29 May , Richard Genoud wrote:
>> 2013/5/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
>> > On 16:36 Wed 29 May , Richard Genoud wrote:
>> >> 2013/4/11 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
>> >> > Today we mix pdata and drivers data in the struct atmel_lcdfb_info
>> >> > Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only
>> >> >
>> >> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>> >> > Cc: linux-fbdev@vger.kernel.org
>> >> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>> >> > Cc: Andrew Morton <akpm@linux-foundation.org>
>> >> > Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
>> >> > ---
>> >> > arch/arm/mach-at91/at91sam9261_devices.c | 6 +-
>> >> > arch/arm/mach-at91/at91sam9263_devices.c | 6 +-
>> >> > arch/arm/mach-at91/at91sam9g45_devices.c | 6 +-
>> >> > arch/arm/mach-at91/at91sam9rl_devices.c | 6 +-
>> >> > arch/arm/mach-at91/board-sam9261ek.c | 6 +-
>> >> > arch/arm/mach-at91/board-sam9263ek.c | 4 +-
>> >> > arch/arm/mach-at91/board-sam9m10g45ek.c | 4 +-
>> >> > arch/arm/mach-at91/board-sam9rlek.c | 4 +-
>> >> > arch/arm/mach-at91/board.h | 4 +-
>> >> > arch/avr32/boards/atngw100/evklcd10x.c | 6 +-
>> >> > arch/avr32/boards/atngw100/mrmt.c | 4 +-
>> >> > arch/avr32/boards/atstk1000/atstk1000.h | 2 +-
>> >> > arch/avr32/boards/atstk1000/setup.c | 2 +-
>> >> > arch/avr32/boards/favr-32/setup.c | 2 +-
>> >> > arch/avr32/boards/hammerhead/setup.c | 2 +-
>> >> > arch/avr32/boards/merisc/display.c | 2 +-
>> >> > arch/avr32/boards/mimc200/setup.c | 4 +-
>> >> > arch/avr32/mach-at32ap/at32ap700x.c | 8 +--
>> >> > arch/avr32/mach-at32ap/include/mach/board.h | 4 +-
>> >> > drivers/video/atmel_lcdfb.c | 104 +++++++++++++++++----------
>> >> > include/video/atmel_lcdc.h | 24 +------
>> >> > 21 files changed, 109 insertions(+), 101 deletions(-)
>> >> >
>> >> [snip]
>> >> > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
>> >> > index c1a2914..98733cd4 100644
>> >> > --- a/drivers/video/atmel_lcdfb.c
>> >> > +++ b/drivers/video/atmel_lcdfb.c
>> >> > @@ -20,12 +20,45 @@
>> >> > #include <linux/gfp.h>
>> >> > #include <linux/module.h>
>> >> > #include <linux/platform_data/atmel.h>
>> >> > +#include <video/of_display_timing.h>
>> >> >
>> >> > #include <mach/cpu.h>
>> >> > #include <asm/gpio.h>
>> >> >
>> >> > #include <video/atmel_lcdc.h>
>> >> >
>> >> > +struct atmel_lcdfb_config {
>> >> > + bool have_alt_pixclock;
>> >> > + bool have_hozval;
>> >> > + bool have_intensity_bit;
>> >> > +};
>> >> > +
>> >> > + /* LCD Controller info data structure, stored in device platform_data */
>> >> > +struct atmel_lcdfb_info {
>> >> > + spinlock_t lock;
>> >> > + struct fb_info *info;
>> >> > + void __iomem *mmio;
>> >> > + int irq_base;
>> >> > + struct work_struct task;
>> >> > +
>> >> > + unsigned int smem_len;
>> >> > + struct platform_device *pdev;
>> >> > + struct clk *bus_clk;
>> >> > + struct clk *lcdc_clk;
>> >> > +
>> >> > + struct backlight_device *backlight;
>> >> > + u8 bl_power;
>> >> > + bool lcdcon_pol_negative;
>> >> I think lcdcon_pol_negative should be part of pdata, because it really
>> >> depends on how the PWM is wired on the board.
>> >>
>> >
>> > maybe but no one mainline use it on any pdata for non-dt boars
>> > so I did not want to expose it
>> Well, at least, I'm using it :)
>> (and I guess that Andreas is using it also, otherwise he wouldn't have
>> introduce it !)
>
> yes but pdata is for non-dt boards, for dt you can keep it in struct
> atmel_lcdfb_info and add a property
>
> if non-dt boards want it my answer is I do not care switch to DT
ok (I use a full DT board based on sam9g35)
so I'll add something like
sinfo->lcdcon_pol_negative = of_property_read_bool(display_np,
"atmel,lcdcon-pwm-pulse-low");
in /atmel_lcdfb.c
But I thought the goal of this patch was to separate driver data from
platform specific data, and IMHO, lcdcon_pol_negative is a specificity
of the platform.
Best regards,
Richard.
^ permalink raw reply
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Jingoo Han @ 2013-05-30 0:32 UTC (permalink / raw)
To: 'Jean-Christophe PLAGNIOL-VILLARD',
'Michael Hennerich', 'Rafael J. Wysocki'
Cc: 'Lars-Peter Clausen', 'Tomi Valkeinen',
linux-fbdev, linux-pm, Jingoo Han
In-Reply-To: <20130529192013.GA19468@game.jcrosoft.org>
On Thursday, May 30, 2013 4:20 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 16:24 Wed 29 May , Michael Hennerich wrote:
> > On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
> > >Use dev_pm_ops instead of the legacy suspend/resume callbacks.
> > >
> > >Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> > >---
> > > drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
> > > 1 file changed, 14 insertions(+), 8 deletions(-)
> > >
> > >diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> > >index 29d8c04..6084c17 100644
> > >--- a/drivers/video/bfin-lq035q1-fb.c
> > >+++ b/drivers/video/bfin-lq035q1-fb.c
> > >@@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > }
> > >-#ifdef CONFIG_PM
> > >-static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> > >+#ifdef CONFIG_PM_SLEEP
> > >+static int lq035q1_spidev_suspend(struct device *dev)
> > > {
> > >+ struct spi_device *spi = to_spi_device(dev);
> > >+
> > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > }
> > >-static int lq035q1_spidev_resume(struct spi_device *spi)
> > >+static int lq035q1_spidev_resume(struct device *dev)
> > > {
> > >- int ret;
> > >+ struct spi_device *spi = to_spi_device(dev);
> > > struct spi_control *ctl = spi_get_drvdata(spi);
> > >+ int ret;
> > > ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > > if (ret)
> > >@@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > > }
> > >+
> > >+static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> > >+ lq035q1_spidev_resume);
> > >+#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
> > >+
> > > #else
> > >-# define lq035q1_spidev_suspend NULL
> > >-# define lq035q1_spidev_resume NULL
> > >+#define LQ035Q1_SPIDEV_PM_OPS NULL
> > > #endif
> we really need to ahve a macro like for DT of_match_ptr to drop the #else
Hi Jean-Christophe PLAGNIOL-VILLARD,
I submitted the following patch. :)
(https://patchwork.kernel.org/patch/2502971/)
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -55,8 +55,10 @@ struct device;
#ifdef CONFIG_PM
extern const char power_group_name[]; /* = "power" */
+#define pm_ops_ptr(_ptr) (_ptr)
#else
#define power_group_name NULL
+#define pm_ops_ptr(_ptr) NULL
#endif
This patch was accepted by Rafael Wysocki, and will be merged to v3.11-rc1.
Best regards,
Jingoo Han
>
> I known it's related to this patch but someone should do it
>
> Rafael what do you think
>
> Best Regards,
> J.
> > > /* Power down all displays on reboot, poweroff or halt */
> > >@@ -708,8 +715,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> > > info->spidrv.probe = lq035q1_spidev_probe;
> > > info->spidrv.remove = lq035q1_spidev_remove;
> > > info->spidrv.shutdown = lq035q1_spidev_shutdown;
> > >- info->spidrv.suspend = lq035q1_spidev_suspend;
> > >- info->spidrv.resume = lq035q1_spidev_resume;
> > >+ info->spidrv.driver.pm = LQ035Q1_SPIDEV_PM_OPS;
> > > ret = spi_register_driver(&info->spidrv);
> > > if (ret < 0) {
> >
> >
> > --
> > Greetings,
> > Michael
> >
> > --
> > Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
> > Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
> > Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
> > Margaret Seif
> >
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Rafael J. Wysocki @ 2013-05-29 21:36 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD
Cc: Michael Hennerich, Lars-Peter Clausen, Tomi Valkeinen,
linux-fbdev, linux-pm
In-Reply-To: <20130529192013.GA19468@game.jcrosoft.org>
On Wednesday, May 29, 2013 09:20:13 PM Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 16:24 Wed 29 May , Michael Hennerich wrote:
> > On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
> > >Use dev_pm_ops instead of the legacy suspend/resume callbacks.
> > >
> > >Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> > >---
> > > drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
> > > 1 file changed, 14 insertions(+), 8 deletions(-)
> > >
> > >diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> > >index 29d8c04..6084c17 100644
> > >--- a/drivers/video/bfin-lq035q1-fb.c
> > >+++ b/drivers/video/bfin-lq035q1-fb.c
> > >@@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > }
> > >-#ifdef CONFIG_PM
> > >-static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> > >+#ifdef CONFIG_PM_SLEEP
> > >+static int lq035q1_spidev_suspend(struct device *dev)
> > > {
> > >+ struct spi_device *spi = to_spi_device(dev);
> > >+
> > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > }
> > >-static int lq035q1_spidev_resume(struct spi_device *spi)
> > >+static int lq035q1_spidev_resume(struct device *dev)
> > > {
> > >- int ret;
> > >+ struct spi_device *spi = to_spi_device(dev);
> > > struct spi_control *ctl = spi_get_drvdata(spi);
> > >+ int ret;
> > > ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > > if (ret)
> > >@@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> > > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > > }
> > >+
> > >+static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> > >+ lq035q1_spidev_resume);
> > >+#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
> > >+
> > > #else
> > >-# define lq035q1_spidev_suspend NULL
> > >-# define lq035q1_spidev_resume NULL
> > >+#define LQ035Q1_SPIDEV_PM_OPS NULL
> > > #endif
> we really need to ahve a macro like for DT of_match_ptr to drop the #else
>
> I known it's related to this patch but someone should do it
>
> Rafael what do you think
There's a patch adding something like that in the linux-next branch of my tree
(if I understand correctly what you mean).
Thanks,
Rafael
> > > /* Power down all displays on reboot, poweroff or halt */
> > >@@ -708,8 +715,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> > > info->spidrv.probe = lq035q1_spidev_probe;
> > > info->spidrv.remove = lq035q1_spidev_remove;
> > > info->spidrv.shutdown = lq035q1_spidev_shutdown;
> > >- info->spidrv.suspend = lq035q1_spidev_suspend;
> > >- info->spidrv.resume = lq035q1_spidev_resume;
> > >+ info->spidrv.driver.pm = LQ035Q1_SPIDEV_PM_OPS;
> > > ret = spi_register_driver(&info->spidrv);
> > > if (ret < 0) {
> >
> >
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: [RFC] Add co-maintainer for fbdev
From: Andrew Morton @ 2013-05-29 20:53 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Arnd Bergmann', 'Florian Tobias Schandinat',
'Olof Johansson',
'Jean-Christophe PLAGNIOL-VILLARD', linux-fbdev,
'Linus Torvalds', linux-kernel, 'Tomi Valkeinen'
In-Reply-To: <002301ce5c0c$5552b650$fff822f0$@samsung.com>
On Wed, 29 May 2013 10:32:08 +0900 Jingoo Han <jg1.han@samsung.com> wrote:
> On Wednesday, May 29, 2013 6:20 AM, Arnd Bergmann wrote:
> > On Monday 27 May 2013, Florian Tobias Schandinat wrote:
> > > >> On Fri, May 24, 2013 at 8:38 AM, Jean-Christophe PLAGNIOL-VILLARD
> > > >> <plagnioj@jcrosoft.com> wrote:
> > > >>> Hi Florian,
> > > >>>
> > > >>> As you seems very busy I'd like to propose the help you to handle the
> > > >>> fbdev subsystem to easier the rich of the fbdev patch to Linus
> > > >>>
> > > >>> As I'm working on fbdev on at91 and others and already Co-Maintain the
> > > >>> at91 mach on ARM
> > > >>>
> > > >>> And if you are not willing to continue I could take over
> > >
> > > Yeah, it would be great if you could help, at the moment I get barely
> > > any sleep, let alone that I could keep up with the majority of mail I
> > > get. I'll let you decide whether you want to be sole maintainer or not.
> >
> > For any bigger subsystems, it's good practice to have two maintainers,
> > even if one of them does all the work. I think it makes sense to have
> > Jean-Christophe as the primary maintainer and owner of the git tree,
> > but it may also be good to have you or Tomi listed as a second maintainer
> > for times when Jean-Christophe isn't available.
>
> Hi Arnd,
>
> I agree with Arnd's opinion.
> It looks good to have Florian or Tomi listed as a second maintainer.
Someone send a patch!
^ permalink raw reply
* Re: [PATCH 1/8] video: atmel_lcdfb: fix platform data struct
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-29 19:32 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACQ1gAhhsMw1-Znd8BC=A0rJBrB4pphCtH9v9qOQR+j2dY3vCw@mail.gmail.com>
On 19:44 Wed 29 May , Richard Genoud wrote:
> 2013/5/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> > On 16:36 Wed 29 May , Richard Genoud wrote:
> >> 2013/4/11 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> >> > Today we mix pdata and drivers data in the struct atmel_lcdfb_info
> >> > Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only
> >> >
> >> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >> > Cc: linux-fbdev@vger.kernel.org
> >> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> >> > Cc: Andrew Morton <akpm@linux-foundation.org>
> >> > Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> >> > ---
> >> > arch/arm/mach-at91/at91sam9261_devices.c | 6 +-
> >> > arch/arm/mach-at91/at91sam9263_devices.c | 6 +-
> >> > arch/arm/mach-at91/at91sam9g45_devices.c | 6 +-
> >> > arch/arm/mach-at91/at91sam9rl_devices.c | 6 +-
> >> > arch/arm/mach-at91/board-sam9261ek.c | 6 +-
> >> > arch/arm/mach-at91/board-sam9263ek.c | 4 +-
> >> > arch/arm/mach-at91/board-sam9m10g45ek.c | 4 +-
> >> > arch/arm/mach-at91/board-sam9rlek.c | 4 +-
> >> > arch/arm/mach-at91/board.h | 4 +-
> >> > arch/avr32/boards/atngw100/evklcd10x.c | 6 +-
> >> > arch/avr32/boards/atngw100/mrmt.c | 4 +-
> >> > arch/avr32/boards/atstk1000/atstk1000.h | 2 +-
> >> > arch/avr32/boards/atstk1000/setup.c | 2 +-
> >> > arch/avr32/boards/favr-32/setup.c | 2 +-
> >> > arch/avr32/boards/hammerhead/setup.c | 2 +-
> >> > arch/avr32/boards/merisc/display.c | 2 +-
> >> > arch/avr32/boards/mimc200/setup.c | 4 +-
> >> > arch/avr32/mach-at32ap/at32ap700x.c | 8 +--
> >> > arch/avr32/mach-at32ap/include/mach/board.h | 4 +-
> >> > drivers/video/atmel_lcdfb.c | 104 +++++++++++++++++----------
> >> > include/video/atmel_lcdc.h | 24 +------
> >> > 21 files changed, 109 insertions(+), 101 deletions(-)
> >> >
> >> [snip]
> >> > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> >> > index c1a2914..98733cd4 100644
> >> > --- a/drivers/video/atmel_lcdfb.c
> >> > +++ b/drivers/video/atmel_lcdfb.c
> >> > @@ -20,12 +20,45 @@
> >> > #include <linux/gfp.h>
> >> > #include <linux/module.h>
> >> > #include <linux/platform_data/atmel.h>
> >> > +#include <video/of_display_timing.h>
> >> >
> >> > #include <mach/cpu.h>
> >> > #include <asm/gpio.h>
> >> >
> >> > #include <video/atmel_lcdc.h>
> >> >
> >> > +struct atmel_lcdfb_config {
> >> > + bool have_alt_pixclock;
> >> > + bool have_hozval;
> >> > + bool have_intensity_bit;
> >> > +};
> >> > +
> >> > + /* LCD Controller info data structure, stored in device platform_data */
> >> > +struct atmel_lcdfb_info {
> >> > + spinlock_t lock;
> >> > + struct fb_info *info;
> >> > + void __iomem *mmio;
> >> > + int irq_base;
> >> > + struct work_struct task;
> >> > +
> >> > + unsigned int smem_len;
> >> > + struct platform_device *pdev;
> >> > + struct clk *bus_clk;
> >> > + struct clk *lcdc_clk;
> >> > +
> >> > + struct backlight_device *backlight;
> >> > + u8 bl_power;
> >> > + bool lcdcon_pol_negative;
> >> I think lcdcon_pol_negative should be part of pdata, because it really
> >> depends on how the PWM is wired on the board.
> >>
> >
> > maybe but no one mainline use it on any pdata for non-dt boars
> > so I did not want to expose it
> Well, at least, I'm using it :)
> (and I guess that Andreas is using it also, otherwise he wouldn't have
> introduce it !)
yes but pdata is for non-dt boards, for dt you can keep it in struct
atmel_lcdfb_info and add a property
if non-dt boards want it my answer is I do not care switch to DT
Best Regards,
J.
>
>
> Best regards,
> Richard.
^ permalink raw reply
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-29 19:20 UTC (permalink / raw)
To: Michael Hennerich, Rafael J. Wysocki
Cc: Lars-Peter Clausen, Tomi Valkeinen, linux-fbdev, linux-pm
In-Reply-To: <51A60F83.7070403@analog.com>
On 16:24 Wed 29 May , Michael Hennerich wrote:
> On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
> >Use dev_pm_ops instead of the legacy suspend/resume callbacks.
> >
> >Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> >---
> > drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
> > 1 file changed, 14 insertions(+), 8 deletions(-)
> >
> >diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> >index 29d8c04..6084c17 100644
> >--- a/drivers/video/bfin-lq035q1-fb.c
> >+++ b/drivers/video/bfin-lq035q1-fb.c
> >@@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > }
> >-#ifdef CONFIG_PM
> >-static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> >+#ifdef CONFIG_PM_SLEEP
> >+static int lq035q1_spidev_suspend(struct device *dev)
> > {
> >+ struct spi_device *spi = to_spi_device(dev);
> >+
> > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > }
> >-static int lq035q1_spidev_resume(struct spi_device *spi)
> >+static int lq035q1_spidev_resume(struct device *dev)
> > {
> >- int ret;
> >+ struct spi_device *spi = to_spi_device(dev);
> > struct spi_control *ctl = spi_get_drvdata(spi);
> >+ int ret;
> > ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > if (ret)
> >@@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > }
> >+
> >+static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> >+ lq035q1_spidev_resume);
> >+#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
> >+
> > #else
> >-# define lq035q1_spidev_suspend NULL
> >-# define lq035q1_spidev_resume NULL
> >+#define LQ035Q1_SPIDEV_PM_OPS NULL
> > #endif
we really need to ahve a macro like for DT of_match_ptr to drop the #else
I known it's related to this patch but someone should do it
Rafael what do you think
Best Regards,
J.
> > /* Power down all displays on reboot, poweroff or halt */
> >@@ -708,8 +715,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> > info->spidrv.probe = lq035q1_spidev_probe;
> > info->spidrv.remove = lq035q1_spidev_remove;
> > info->spidrv.shutdown = lq035q1_spidev_shutdown;
> >- info->spidrv.suspend = lq035q1_spidev_suspend;
> >- info->spidrv.resume = lq035q1_spidev_resume;
> >+ info->spidrv.driver.pm = LQ035Q1_SPIDEV_PM_OPS;
> > ret = spi_register_driver(&info->spidrv);
> > if (ret < 0) {
>
>
> --
> Greetings,
> Michael
>
> --
> Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
> Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
> Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
> Margaret Seif
>
>
^ permalink raw reply
* Re: [PATCH 1/8] video: atmel_lcdfb: fix platform data struct
From: Richard Genoud @ 2013-05-29 17:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130529173538.GC23899@game.jcrosoft.org>
2013/5/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> On 16:36 Wed 29 May , Richard Genoud wrote:
>> 2013/4/11 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
>> > Today we mix pdata and drivers data in the struct atmel_lcdfb_info
>> > Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only
>> >
>> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>> > Cc: linux-fbdev@vger.kernel.org
>> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>> > Cc: Andrew Morton <akpm@linux-foundation.org>
>> > Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
>> > ---
>> > arch/arm/mach-at91/at91sam9261_devices.c | 6 +-
>> > arch/arm/mach-at91/at91sam9263_devices.c | 6 +-
>> > arch/arm/mach-at91/at91sam9g45_devices.c | 6 +-
>> > arch/arm/mach-at91/at91sam9rl_devices.c | 6 +-
>> > arch/arm/mach-at91/board-sam9261ek.c | 6 +-
>> > arch/arm/mach-at91/board-sam9263ek.c | 4 +-
>> > arch/arm/mach-at91/board-sam9m10g45ek.c | 4 +-
>> > arch/arm/mach-at91/board-sam9rlek.c | 4 +-
>> > arch/arm/mach-at91/board.h | 4 +-
>> > arch/avr32/boards/atngw100/evklcd10x.c | 6 +-
>> > arch/avr32/boards/atngw100/mrmt.c | 4 +-
>> > arch/avr32/boards/atstk1000/atstk1000.h | 2 +-
>> > arch/avr32/boards/atstk1000/setup.c | 2 +-
>> > arch/avr32/boards/favr-32/setup.c | 2 +-
>> > arch/avr32/boards/hammerhead/setup.c | 2 +-
>> > arch/avr32/boards/merisc/display.c | 2 +-
>> > arch/avr32/boards/mimc200/setup.c | 4 +-
>> > arch/avr32/mach-at32ap/at32ap700x.c | 8 +--
>> > arch/avr32/mach-at32ap/include/mach/board.h | 4 +-
>> > drivers/video/atmel_lcdfb.c | 104 +++++++++++++++++----------
>> > include/video/atmel_lcdc.h | 24 +------
>> > 21 files changed, 109 insertions(+), 101 deletions(-)
>> >
>> [snip]
>> > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
>> > index c1a2914..98733cd4 100644
>> > --- a/drivers/video/atmel_lcdfb.c
>> > +++ b/drivers/video/atmel_lcdfb.c
>> > @@ -20,12 +20,45 @@
>> > #include <linux/gfp.h>
>> > #include <linux/module.h>
>> > #include <linux/platform_data/atmel.h>
>> > +#include <video/of_display_timing.h>
>> >
>> > #include <mach/cpu.h>
>> > #include <asm/gpio.h>
>> >
>> > #include <video/atmel_lcdc.h>
>> >
>> > +struct atmel_lcdfb_config {
>> > + bool have_alt_pixclock;
>> > + bool have_hozval;
>> > + bool have_intensity_bit;
>> > +};
>> > +
>> > + /* LCD Controller info data structure, stored in device platform_data */
>> > +struct atmel_lcdfb_info {
>> > + spinlock_t lock;
>> > + struct fb_info *info;
>> > + void __iomem *mmio;
>> > + int irq_base;
>> > + struct work_struct task;
>> > +
>> > + unsigned int smem_len;
>> > + struct platform_device *pdev;
>> > + struct clk *bus_clk;
>> > + struct clk *lcdc_clk;
>> > +
>> > + struct backlight_device *backlight;
>> > + u8 bl_power;
>> > + bool lcdcon_pol_negative;
>> I think lcdcon_pol_negative should be part of pdata, because it really
>> depends on how the PWM is wired on the board.
>>
>
> maybe but no one mainline use it on any pdata for non-dt boars
> so I did not want to expose it
Well, at least, I'm using it :)
(and I guess that Andreas is using it also, otherwise he wouldn't have
introduce it !)
Best regards,
Richard.
^ permalink raw reply
* Re: [PATCH 1/8] video: atmel_lcdfb: fix platform data struct
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-29 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACQ1gAjF5kuu-czkj56-pQdTBUhvY5VodvfnF3RA_DN-O0b9NQ@mail.gmail.com>
On 16:36 Wed 29 May , Richard Genoud wrote:
> 2013/4/11 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> > Today we mix pdata and drivers data in the struct atmel_lcdfb_info
> > Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only
> >
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> > ---
> > arch/arm/mach-at91/at91sam9261_devices.c | 6 +-
> > arch/arm/mach-at91/at91sam9263_devices.c | 6 +-
> > arch/arm/mach-at91/at91sam9g45_devices.c | 6 +-
> > arch/arm/mach-at91/at91sam9rl_devices.c | 6 +-
> > arch/arm/mach-at91/board-sam9261ek.c | 6 +-
> > arch/arm/mach-at91/board-sam9263ek.c | 4 +-
> > arch/arm/mach-at91/board-sam9m10g45ek.c | 4 +-
> > arch/arm/mach-at91/board-sam9rlek.c | 4 +-
> > arch/arm/mach-at91/board.h | 4 +-
> > arch/avr32/boards/atngw100/evklcd10x.c | 6 +-
> > arch/avr32/boards/atngw100/mrmt.c | 4 +-
> > arch/avr32/boards/atstk1000/atstk1000.h | 2 +-
> > arch/avr32/boards/atstk1000/setup.c | 2 +-
> > arch/avr32/boards/favr-32/setup.c | 2 +-
> > arch/avr32/boards/hammerhead/setup.c | 2 +-
> > arch/avr32/boards/merisc/display.c | 2 +-
> > arch/avr32/boards/mimc200/setup.c | 4 +-
> > arch/avr32/mach-at32ap/at32ap700x.c | 8 +--
> > arch/avr32/mach-at32ap/include/mach/board.h | 4 +-
> > drivers/video/atmel_lcdfb.c | 104 +++++++++++++++++----------
> > include/video/atmel_lcdc.h | 24 +------
> > 21 files changed, 109 insertions(+), 101 deletions(-)
> >
> [snip]
> > diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> > index c1a2914..98733cd4 100644
> > --- a/drivers/video/atmel_lcdfb.c
> > +++ b/drivers/video/atmel_lcdfb.c
> > @@ -20,12 +20,45 @@
> > #include <linux/gfp.h>
> > #include <linux/module.h>
> > #include <linux/platform_data/atmel.h>
> > +#include <video/of_display_timing.h>
> >
> > #include <mach/cpu.h>
> > #include <asm/gpio.h>
> >
> > #include <video/atmel_lcdc.h>
> >
> > +struct atmel_lcdfb_config {
> > + bool have_alt_pixclock;
> > + bool have_hozval;
> > + bool have_intensity_bit;
> > +};
> > +
> > + /* LCD Controller info data structure, stored in device platform_data */
> > +struct atmel_lcdfb_info {
> > + spinlock_t lock;
> > + struct fb_info *info;
> > + void __iomem *mmio;
> > + int irq_base;
> > + struct work_struct task;
> > +
> > + unsigned int smem_len;
> > + struct platform_device *pdev;
> > + struct clk *bus_clk;
> > + struct clk *lcdc_clk;
> > +
> > + struct backlight_device *backlight;
> > + u8 bl_power;
> > + bool lcdcon_pol_negative;
> I think lcdcon_pol_negative should be part of pdata, because it really
> depends on how the PWM is wired on the board.
>
maybe but no one mainline use it on any pdata for non-dt boars
so I did not want to expose it
Best Regatgards,
J.
>
> Regards,
> Richard.
^ permalink raw reply
* Re: [PATCH 1/3] video: xilinxfb: Fix OF probing on little-endian systems
From: Sören Brinkmann @ 2013-05-29 16:18 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, Michal Simek, Pallav Joshi, git-dev,
Florian Tobias Schandinat, linux-fbdev
In-Reply-To: <502367ddf6d79b7b343b3165ad54cb9e2d4713db.1369843969.git.michal.simek@xilinx.com>
On Wed, May 29, 2013 at 06:12:56PM +0200, Michal Simek wrote:
> From: Michal Simek <monstr@monstr.eu>
>
> DTB is always big-endian that's why is necessary
> to convert it.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> drivers/video/xilinxfb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> index af0b4fd..5af341e 100644
> --- a/drivers/video/xilinxfb.c
> +++ b/drivers/video/xilinxfb.c
> @@ -428,7 +428,7 @@ static int xilinxfb_of_probe(struct platform_device *op)
> * interface and initialize the tft_access accordingly.
> */
> p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL);
You should consider using 'of_property_read_u32() (or one of its other
variants for arrays, strings, etc). That already implicitly does the
endian conversion.
Sören
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox