Commit f3502b8a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (5305): Mark VIDIOC_DBG_S/G_REGISTER as experimental

Move VIDIOC_DBG_S/G_REGISTER from the internal ioctl list to the
public ioctls, but mark it as experimental for now.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent ada6ecd2
...@@ -376,7 +376,10 @@ static const char *v4l2_ioctls[] = { ...@@ -376,7 +376,10 @@ static const char *v4l2_ioctls[] = {
[_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS", [_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS",
[_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX", [_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX",
[_IOC_NR(VIDIOC_ENCODER_CMD)] = "VIDIOC_ENCODER_CMD", [_IOC_NR(VIDIOC_ENCODER_CMD)] = "VIDIOC_ENCODER_CMD",
[_IOC_NR(VIDIOC_TRY_ENCODER_CMD)] = "VIDIOC_TRY_ENCODER_CMD" [_IOC_NR(VIDIOC_TRY_ENCODER_CMD)] = "VIDIOC_TRY_ENCODER_CMD",
[_IOC_NR(VIDIOC_DBG_S_REGISTER)] = "VIDIOC_DBG_S_REGISTER",
[_IOC_NR(VIDIOC_DBG_G_REGISTER)] = "VIDIOC_DBG_G_REGISTER",
#endif #endif
}; };
#define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
...@@ -401,9 +404,6 @@ static const char *v4l2_int_ioctls[] = { ...@@ -401,9 +404,6 @@ static const char *v4l2_int_ioctls[] = {
[_IOC_NR(TUNER_SET_STANDBY)] = "TUNER_SET_STANDBY", [_IOC_NR(TUNER_SET_STANDBY)] = "TUNER_SET_STANDBY",
[_IOC_NR(TDA9887_SET_CONFIG)] = "TDA9887_SET_CONFIG", [_IOC_NR(TDA9887_SET_CONFIG)] = "TDA9887_SET_CONFIG",
[_IOC_NR(VIDIOC_DBG_S_REGISTER)] = "VIDIOC_DBG_S_REGISTER",
[_IOC_NR(VIDIOC_DBG_G_REGISTER)] = "VIDIOC_DBG_G_REGISTER",
[_IOC_NR(VIDIOC_INT_S_TUNER_MODE)] = "VIDIOC_INT_S_TUNER_MODE", [_IOC_NR(VIDIOC_INT_S_TUNER_MODE)] = "VIDIOC_INT_S_TUNER_MODE",
[_IOC_NR(VIDIOC_INT_RESET)] = "VIDIOC_INT_RESET", [_IOC_NR(VIDIOC_INT_RESET)] = "VIDIOC_INT_RESET",
[_IOC_NR(VIDIOC_INT_AUDIO_CLOCK_FREQ)] = "VIDIOC_INT_AUDIO_CLOCK_FREQ", [_IOC_NR(VIDIOC_INT_AUDIO_CLOCK_FREQ)] = "VIDIOC_INT_AUDIO_CLOCK_FREQ",
...@@ -956,8 +956,6 @@ u32 v4l2_ctrl_next(const u32 * const * ctrl_classes, u32 id) ...@@ -956,8 +956,6 @@ u32 v4l2_ctrl_next(const u32 * const * ctrl_classes, u32 id)
int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_chip) int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_chip)
{ {
switch (match_type) { switch (match_type) {
case V4L2_CHIP_MATCH_ALWAYS:
return 1;
case V4L2_CHIP_MATCH_I2C_DRIVER: case V4L2_CHIP_MATCH_I2C_DRIVER:
return (c != NULL && c->driver != NULL && c->driver->id == match_chip); return (c != NULL && c->driver != NULL && c->driver->id == match_chip);
case V4L2_CHIP_MATCH_I2C_ADDR: case V4L2_CHIP_MATCH_I2C_ADDR:
...@@ -970,8 +968,6 @@ int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_c ...@@ -970,8 +968,6 @@ int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 match_type, u32 match_c
int v4l2_chip_match_host(u32 match_type, u32 match_chip) int v4l2_chip_match_host(u32 match_type, u32 match_chip)
{ {
switch (match_type) { switch (match_type) {
case V4L2_CHIP_MATCH_ALWAYS:
return 1;
case V4L2_CHIP_MATCH_HOST: case V4L2_CHIP_MATCH_HOST:
return match_chip == 0; return match_chip == 0;
default: default:
......
...@@ -1352,14 +1352,15 @@ struct v4l2_streamparm ...@@ -1352,14 +1352,15 @@ struct v4l2_streamparm
/* /*
* A D V A N C E D D E B U G G I N G * A D V A N C E D D E B U G G I N G
*
* NOTE: EXPERIMENTAL API
*/ */
/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
#define V4L2_CHIP_MATCH_ALWAYS 0 /* Match always (match_chip is not used) */ #define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */
#define V4L2_CHIP_MATCH_HOST 1 /* Match against chip ID on host (0 for the host) */ #define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver ID */
#define V4L2_CHIP_MATCH_I2C_DRIVER 2 /* Match against I2C driver ID */ #define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
#define V4L2_CHIP_MATCH_I2C_ADDR 3 /* Match against I2C 7-bit address */
struct v4l2_register { struct v4l2_register {
__u32 match_type; /* Match type */ __u32 match_type; /* Match type */
...@@ -1437,10 +1438,11 @@ struct v4l2_register { ...@@ -1437,10 +1438,11 @@ struct v4l2_register {
#define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx) #define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx)
#define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd) #define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd)
#define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd) #define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd)
/* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
#define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register)
#define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register)
#endif #endif
/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
#define VIDIOC_DBG_S_REGISTER _IOW ('d', 100, struct v4l2_register)
#define VIDIOC_DBG_G_REGISTER _IOWR('d', 101, struct v4l2_register)
#ifdef __OLD_VIDIOC_ #ifdef __OLD_VIDIOC_
/* for compatibility, will go away some day */ /* for compatibility, will go away some day */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment