Camera sensors have a native bus width say support, but on some
boards not all sensor data lines are connected to the image
interface and thus support a different bus width than the sensors
native one. Some boards even have a bus driver which dynamically
switches between different bus widths with a GPIO.

This patch adds a hook which board code can use to support different
bus widths.

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 include/media/soc_camera.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 7440d92..d68959c 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -100,6 +100,12 @@ struct soc_camera_link {
        /* Optional callbacks to power on or off and reset the sensor */
        int (*power)(struct device *, int);
        int (*reset)(struct device *);
+       /* some platforms may support different data widths than the sensors
+        * native ones due to different data line routing. Let the board code
+        * overwrite the width flags.
+        */
+       int (*set_bus_param)(struct device *, unsigned long flags);
+       unsigned long (*query_bus_param)(struct device *);
 };
 
 static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev)
-- 
1.5.6.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