All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev
@ 2020-06-15 13:26 Ramzi BEN MEFTAH
  2020-06-15 16:12   ` kernel test robot
  2020-06-15 17:27   ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Ramzi BEN MEFTAH @ 2020-06-15 13:26 UTC (permalink / raw)
  To: Kieran Bingham, Mauro Carvalho Chehab, linux-media, linux-kernel
  Cc: Michael Rodin, efriedrich, erosca

This patch adds support for enuminput control to the adv748x hdmi subdev.
This will allow userspace for example to query input hdmi signal status.


Signed-off-by: Ramzi BEN MEFTAH <rbmeftah@de.adit-jv.com>
---
 drivers/media/i2c/adv748x/adv748x-hdmi.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c
index c557f8f..2d748b2 100644
--- a/drivers/media/i2c/adv748x/adv748x-hdmi.c
+++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c
@@ -350,6 +350,22 @@ static int adv748x_hdmi_g_input_status(struct v4l2_subdev *sd, u32 *status)
 	return 0;
 }
 
+static int adv748x_hdmi_enuminput(struct v4l2_subdev *sd,
+				 struct v4l2_input *input)
+{
+	if (input->index != 0)
+		return -EINVAL;
+
+	input->type = V4L2_INPUT_TYPE_CAMERA;
+	input->capabilities = V4L2_IN_CAP_DV_TIMINGS;
+	input->status = V4L2_IN_ST_NO_SIGNAL;
+	input->std = V4L2_STD_UNKNOWN;
+
+	snprintf(input->name, sizeof(input->name), "%s", sd->name);
+
+	return adv748x_hdmi_g_input_status(sd, &input->status);
+}
+
 static int adv748x_hdmi_s_stream(struct v4l2_subdev *sd, int enable)
 {
 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
@@ -386,6 +402,7 @@ static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
 	.g_dv_timings = adv748x_hdmi_g_dv_timings,
 	.query_dv_timings = adv748x_hdmi_query_dv_timings,
 	.g_input_status = adv748x_hdmi_g_input_status,
+	.enuminput = adv748x_hdmi_enuminput,
 	.s_stream = adv748x_hdmi_s_stream,
 	.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
 };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev
  2020-06-15 13:26 [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev Ramzi BEN MEFTAH
@ 2020-06-15 16:12   ` kernel test robot
  2020-06-15 17:27   ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-06-15 16:12 UTC (permalink / raw)
  To: Ramzi BEN MEFTAH, Kieran Bingham, Mauro Carvalho Chehab, linux-kernel
  Cc: kbuild-all, linux-media, Michael Rodin, efriedrich, erosca

[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]

Hi Ramzi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.8-rc1 next-20200615]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Ramzi-BEN-MEFTAH/media-i2c-adv748x-add-enuminput-control-to-adv748x-hdmi-subdev/20200615-212859
base:   git://linuxtv.org/media_tree.git master
config: i386-randconfig-a016-20200615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:3: error: 'const struct v4l2_subdev_video_ops' has no member named 'enuminput'
405 |  .enuminput = adv748x_hdmi_enuminput,
|   ^~~~~~~~~
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: initialization of 'int (*)(struct v4l2_subdev *, int)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_input *)' [-Werror=incompatible-pointer-types]
405 |  .enuminput = adv748x_hdmi_enuminput,
|               ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.s_stream')
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:406:14: warning: initialized field overwritten [-Woverride-init]
406 |  .s_stream = adv748x_hdmi_s_stream,
|              ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:406:14: note: (near initialization for 'adv748x_video_ops_hdmi.s_stream')
cc1: some warnings being treated as errors

vim +405 drivers/media/i2c/adv748x/adv748x-hdmi.c

   399	
   400	static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
   401		.s_dv_timings = adv748x_hdmi_s_dv_timings,
   402		.g_dv_timings = adv748x_hdmi_g_dv_timings,
   403		.query_dv_timings = adv748x_hdmi_query_dv_timings,
   404		.g_input_status = adv748x_hdmi_g_input_status,
 > 405		.enuminput = adv748x_hdmi_enuminput,
 > 406		.s_stream = adv748x_hdmi_s_stream,
   407		.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
   408	};
   409	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39862 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev
@ 2020-06-15 16:12   ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-06-15 16:12 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2637 bytes --]

Hi Ramzi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.8-rc1 next-20200615]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Ramzi-BEN-MEFTAH/media-i2c-adv748x-add-enuminput-control-to-adv748x-hdmi-subdev/20200615-212859
base:   git://linuxtv.org/media_tree.git master
config: i386-randconfig-a016-20200615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:3: error: 'const struct v4l2_subdev_video_ops' has no member named 'enuminput'
405 |  .enuminput = adv748x_hdmi_enuminput,
|   ^~~~~~~~~
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: initialization of 'int (*)(struct v4l2_subdev *, int)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_input *)' [-Werror=incompatible-pointer-types]
405 |  .enuminput = adv748x_hdmi_enuminput,
|               ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.s_stream')
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:406:14: warning: initialized field overwritten [-Woverride-init]
406 |  .s_stream = adv748x_hdmi_s_stream,
|              ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:406:14: note: (near initialization for 'adv748x_video_ops_hdmi.s_stream')
cc1: some warnings being treated as errors

vim +405 drivers/media/i2c/adv748x/adv748x-hdmi.c

   399	
   400	static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
   401		.s_dv_timings = adv748x_hdmi_s_dv_timings,
   402		.g_dv_timings = adv748x_hdmi_g_dv_timings,
   403		.query_dv_timings = adv748x_hdmi_query_dv_timings,
   404		.g_input_status = adv748x_hdmi_g_input_status,
 > 405		.enuminput = adv748x_hdmi_enuminput,
 > 406		.s_stream = adv748x_hdmi_s_stream,
   407		.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
   408	};
   409	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39862 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev
  2020-06-15 13:26 [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev Ramzi BEN MEFTAH
@ 2020-06-15 17:27   ` kernel test robot
  2020-06-15 17:27   ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-06-15 17:27 UTC (permalink / raw)
  To: Ramzi BEN MEFTAH, Kieran Bingham, Mauro Carvalho Chehab, linux-kernel
  Cc: kbuild-all, linux-media, Michael Rodin, efriedrich, erosca

[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]

Hi Ramzi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.8-rc1 next-20200615]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Ramzi-BEN-MEFTAH/media-i2c-adv748x-add-enuminput-control-to-adv748x-hdmi-subdev/20200615-212859
base:   git://linuxtv.org/media_tree.git master
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/media/i2c/adv748x/adv748x-hdmi.c:405:3: error: 'const struct v4l2_subdev_video_ops' has no member named 'enuminput'
405 |  .enuminput = adv748x_hdmi_enuminput,
|   ^~~~~~~~~
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
405 |  .enuminput = adv748x_hdmi_enuminput,
|               ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi')
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_dv_timings *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_input *)' [-Werror=incompatible-pointer-types]
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.g_dv_timings')
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: warning: initialized field overwritten [-Woverride-init]
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.g_dv_timings')
cc1: some warnings being treated as errors

vim +405 drivers/media/i2c/adv748x/adv748x-hdmi.c

   399	
   400	static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
   401		.s_dv_timings = adv748x_hdmi_s_dv_timings,
   402		.g_dv_timings = adv748x_hdmi_g_dv_timings,
   403		.query_dv_timings = adv748x_hdmi_query_dv_timings,
   404		.g_input_status = adv748x_hdmi_g_input_status,
 > 405		.enuminput = adv748x_hdmi_enuminput,
   406		.s_stream = adv748x_hdmi_s_stream,
   407		.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
   408	};
   409	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62357 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev
@ 2020-06-15 17:27   ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-06-15 17:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3031 bytes --]

Hi Ramzi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.8-rc1 next-20200615]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Ramzi-BEN-MEFTAH/media-i2c-adv748x-add-enuminput-control-to-adv748x-hdmi-subdev/20200615-212859
base:   git://linuxtv.org/media_tree.git master
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/media/i2c/adv748x/adv748x-hdmi.c:405:3: error: 'const struct v4l2_subdev_video_ops' has no member named 'enuminput'
405 |  .enuminput = adv748x_hdmi_enuminput,
|   ^~~~~~~~~
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
405 |  .enuminput = adv748x_hdmi_enuminput,
|               ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi')
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_dv_timings *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_input *)' [-Werror=incompatible-pointer-types]
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.g_dv_timings')
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: warning: initialized field overwritten [-Woverride-init]
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.g_dv_timings')
cc1: some warnings being treated as errors

vim +405 drivers/media/i2c/adv748x/adv748x-hdmi.c

   399	
   400	static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
   401		.s_dv_timings = adv748x_hdmi_s_dv_timings,
   402		.g_dv_timings = adv748x_hdmi_g_dv_timings,
   403		.query_dv_timings = adv748x_hdmi_query_dv_timings,
   404		.g_input_status = adv748x_hdmi_g_input_status,
 > 405		.enuminput = adv748x_hdmi_enuminput,
   406		.s_stream = adv748x_hdmi_s_stream,
   407		.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
   408	};
   409	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 62357 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-15 17:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 13:26 [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev Ramzi BEN MEFTAH
2020-06-15 16:12 ` kernel test robot
2020-06-15 16:12   ` kernel test robot
2020-06-15 17:27 ` kernel test robot
2020-06-15 17:27   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.