[git:v4l-dvb/v2.6.36] V4L/DVB: v4l2_subdev: Add s_io_pin_config to v4l2_subdev_core_ops

2010-09-27 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: v4l2_subdev: Add s_io_pin_config to v4l2_subdev_core_ops
Author:  Andy Walls 
Date:Sun Jul 18 18:51:10 2010 -0300

Add a method to v4l2_sudev_core_ops to allow bridge drivers to
manage what signal pads/functions are routed out to multiplexed IO pins on a
pin by pin basis.  The interface also allows specifying initial output settings
for pins and disabling an IO pin altogether.

Signed-off-by: Andy Walls 
Signed-off-by: Mauro Carvalho Chehab 

 include/media/v4l2-subdev.h |   23 +++
 1 files changed, 23 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=66752f8396f97360cafb226aa1fe230f66785c5a

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 02c6f4d..9195ad4 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -90,10 +90,31 @@ struct v4l2_decode_vbi_line {
not yet implemented) since ops provide proper type-checking.
  */
 
+/* Subdevice external IO pin configuration */
+#define V4L2_SUBDEV_IO_PIN_DISABLE (1 << 0) /* ENABLE assumed */
+#define V4L2_SUBDEV_IO_PIN_OUTPUT  (1 << 1)
+#define V4L2_SUBDEV_IO_PIN_INPUT   (1 << 2)
+#define V4L2_SUBDEV_IO_PIN_SET_VALUE   (1 << 3) /* Set output value */
+#define V4L2_SUBDEV_IO_PIN_ACTIVE_LOW  (1 << 4) /* ACTIVE HIGH assumed */
+
+struct v4l2_subdev_io_pin_config {
+   u32 flags;  /* V4L2_SUBDEV_IO_PIN_* flags for this pin's config */
+   u8 pin; /* Chip external IO pin to configure */
+   u8 function;/* Internal signal pad/function to route to IO pin */
+   u8 value;   /* Initial value for pin - e.g. GPIO output value */
+   u8 strength;/* Pin drive strength */
+};
+
 /* s_config: if set, then it is always called by the v4l2_i2c_new_subdev*
functions after the v4l2_subdev was registered. It is used to pass
platform data to the subdev which can be used during initialization.
 
+   s_io_pin_config: configure one or more chip I/O pins for chips that
+   multiplex different internal signal pads out to IO pins.  This function
+   takes a pointer to an array of 'n' pin configuration entries, one for
+   each pin being configured.  This function could be called at times
+   other than just subdevice initialization.
+
init: initialize the sensor registors to some sort of reasonable default
values. Do not use for new drivers and should be removed in existing
drivers.
@@ -115,6 +136,8 @@ struct v4l2_subdev_core_ops {
int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident 
*chip);
int (*log_status)(struct v4l2_subdev *sd);
int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data);
+   int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n,
+ struct v4l2_subdev_io_pin_config *pincfg);
int (*init)(struct v4l2_subdev *sd, u32 val);
int (*load_fw)(struct v4l2_subdev *sd);
int (*reset)(struct v4l2_subdev *sd, u32 val);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:v4l-dvb/v2.6.36] V4L/DVB: v4l2_subdev: Add s_io_pin_config to v4l2_subdev_core_ops

2010-08-05 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: v4l2_subdev: Add s_io_pin_config to v4l2_subdev_core_ops
Author:  Andy Walls 
Date:Sun Jul 18 18:51:10 2010 -0300

Add a method to v4l2_sudev_core_ops to allow bridge drivers to
manage what signal pads/functions are routed out to multiplexed IO pins on a
pin by pin basis.  The interface also allows specifying initial output settings
for pins and disabling an IO pin altogether.

Signed-off-by: Andy Walls 
Signed-off-by: Mauro Carvalho Chehab 

 include/media/v4l2-subdev.h |   23 +++
 1 files changed, 23 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=0adaf815bf83a0ca1bd65ecf203204f5c2e666a7

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 02c6f4d..9195ad4 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -90,10 +90,31 @@ struct v4l2_decode_vbi_line {
not yet implemented) since ops provide proper type-checking.
  */
 
+/* Subdevice external IO pin configuration */
+#define V4L2_SUBDEV_IO_PIN_DISABLE (1 << 0) /* ENABLE assumed */
+#define V4L2_SUBDEV_IO_PIN_OUTPUT  (1 << 1)
+#define V4L2_SUBDEV_IO_PIN_INPUT   (1 << 2)
+#define V4L2_SUBDEV_IO_PIN_SET_VALUE   (1 << 3) /* Set output value */
+#define V4L2_SUBDEV_IO_PIN_ACTIVE_LOW  (1 << 4) /* ACTIVE HIGH assumed */
+
+struct v4l2_subdev_io_pin_config {
+   u32 flags;  /* V4L2_SUBDEV_IO_PIN_* flags for this pin's config */
+   u8 pin; /* Chip external IO pin to configure */
+   u8 function;/* Internal signal pad/function to route to IO pin */
+   u8 value;   /* Initial value for pin - e.g. GPIO output value */
+   u8 strength;/* Pin drive strength */
+};
+
 /* s_config: if set, then it is always called by the v4l2_i2c_new_subdev*
functions after the v4l2_subdev was registered. It is used to pass
platform data to the subdev which can be used during initialization.
 
+   s_io_pin_config: configure one or more chip I/O pins for chips that
+   multiplex different internal signal pads out to IO pins.  This function
+   takes a pointer to an array of 'n' pin configuration entries, one for
+   each pin being configured.  This function could be called at times
+   other than just subdevice initialization.
+
init: initialize the sensor registors to some sort of reasonable default
values. Do not use for new drivers and should be removed in existing
drivers.
@@ -115,6 +136,8 @@ struct v4l2_subdev_core_ops {
int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident 
*chip);
int (*log_status)(struct v4l2_subdev *sd);
int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data);
+   int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n,
+ struct v4l2_subdev_io_pin_config *pincfg);
int (*init)(struct v4l2_subdev *sd, u32 val);
int (*load_fw)(struct v4l2_subdev *sd);
int (*reset)(struct v4l2_subdev *sd, u32 val);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits