Some CEU implementations have non-standard (larger) maximum supported
width and height values. Add two OF properties to specify them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovet...@gmx.de>
---
 .../platform/soc_camera/sh_mobile_ceu_camera.c     |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c 
b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
index 61ee459..1fd03f6 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
@@ -2119,6 +2119,25 @@ static int __devinit sh_mobile_ceu_probe(struct 
platform_device *pdev)
                pcdev->flags = pcdev->pdata->flags;
        }
 
+       if (!pcdev->max_width) {
+               unsigned int v;
+               err = of_property_read_u32(pdev->dev.of_node, 
"renesas,max-width", &v);
+               if (!err)
+                       pcdev->max_width = v;
+
+               if (!pcdev->max_width)
+                       pcdev->max_width = 2560;
+       }
+       if (!pcdev->max_height) {
+               unsigned int v;
+               err = of_property_read_u32(pdev->dev.of_node, 
"renesas,max-height", &v);
+               if (!err)
+                       pcdev->max_height = v;
+
+               if (!pcdev->max_height)
+                       pcdev->max_height = 1920;
+       }
+
        base = ioremap_nocache(res->start, resource_size(res));
        if (!base) {
                err = -ENXIO;
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to