summaryrefslogtreecommitdiff
path: root/drivers/media/platform/s5p-fimc/fimc-mdevice.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-03-08 17:41:47 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-31 17:54:59 +0400
commit4163851f7b997e24602cad8e0eae96d31a252548 (patch)
tree4b012b4ad94b146bd8739389d1a1f330b344ccd6 /drivers/media/platform/s5p-fimc/fimc-mdevice.h
parent2b13f7d4e3822ed4de37b73b009ff81932e884bb (diff)
downloadlinux-4163851f7b997e24602cad8e0eae96d31a252548.tar.xz
[media] s5p-fimc: Use pinctrl API for camera ports configuration
Before the camera ports can be used the pinmux needs to be configured properly. This patch adds a function to set the camera ports pinctrl to a default state within the media driver's probe(). The camera port(s) are then configured for the video bus operation. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-mdevice.h')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-mdevice.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.h b/drivers/media/platform/s5p-fimc/fimc-mdevice.h
index b6ceb5984664..5d6146e76802 100644
--- a/drivers/media/platform/s5p-fimc/fimc-mdevice.h
+++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.h
@@ -12,6 +12,7 @@
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
+#include <linux/pinctrl/consumer.h>
#include <media/media-device.h>
#include <media/media-entity.h>
#include <media/v4l2-device.h>
@@ -26,6 +27,8 @@
#define FIMC_IS_OF_NODE_NAME "fimc-is"
#define CSIS_OF_NODE_NAME "csis"
+#define PINCTRL_STATE_IDLE "idle"
+
/* Group IDs of sensor, MIPI-CSIS, FIMC-LITE and the writeback subdevs. */
#define GRP_ID_SENSOR (1 << 8)
#define GRP_ID_FIMC_IS_SENSOR (1 << 9)
@@ -73,6 +76,9 @@ struct fimc_sensor_info {
* @media_dev: top level media device
* @v4l2_dev: top level v4l2_device holding up the subdevs
* @pdev: platform device this media device is hooked up into
+ * @pinctrl: camera port pinctrl handle
+ * @state_default: pinctrl default state handle
+ * @state_idle: pinctrl idle state handle
* @user_subdev_api: true if subdevs are not configured by the host driver
* @slock: spinlock protecting @sensor array
*/
@@ -86,6 +92,11 @@ struct fimc_md {
struct media_device media_dev;
struct v4l2_device v4l2_dev;
struct platform_device *pdev;
+ struct fimc_pinctrl {
+ struct pinctrl *pinctrl;
+ struct pinctrl_state *state_default;
+ struct pinctrl_state *state_idle;
+ } pinctl;
bool user_subdev_api;
spinlock_t slock;
};