linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] [media] Input: atmel_mxt: disallow impossible configuration
@ 2016-09-12 15:30 Arnd Bergmann
  2016-09-12 15:30 ` [PATCH 2/2] [media] Input: synaptics-rmi4: " Arnd Bergmann
  2016-09-15 20:23 ` [PATCH 1/2] [media] Input: atmel_mxt: " Nick Dyer
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-09-12 15:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-media, Arnd Bergmann, Dmitry Torokhov, Rob Herring,
	Nick Dyer, Hans de Goede, linux-input, linux-kernel

The newnly added debug mode for the atmel_mxt_ts driver relies on
the v4l2 interface and vb2_vmalloc, but those might be configured
as loadable modules when the driver itself is built-in, resulting
in a link failure:

drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_vidioc_querycap':
atmel_mxt_ts.c:(.text.mxt_vidioc_querycap+0x10): undefined reference to `video_devdata'
drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_buffer_queue':
atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x20): undefined reference to `vb2_plane_vaddr'
atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x164): undefined reference to `vb2_buffer_done'
drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_free_object_table':
atmel_mxt_ts.c:(.text.mxt_free_object_table+0x18): undefined reference to `video_unregister_device'
atmel_mxt_ts.c:(.text.mxt_free_object_table+0x20): undefined reference to `v4l2_device_unregister'

The best workaround I could come up with is to disallow the debug
mode unless it's actually possible to call it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ecfdd7e2660e ("[media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device")
---
 drivers/input/touchscreen/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index fce1e41ffe8b..ccf933969587 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -117,7 +117,8 @@ config TOUCHSCREEN_ATMEL_MXT
 
 config TOUCHSCREEN_ATMEL_MXT_T37
 	bool "Support T37 Diagnostic Data"
-	depends on TOUCHSCREEN_ATMEL_MXT && VIDEO_V4L2
+	depends on TOUCHSCREEN_ATMEL_MXT
+	depends on VIDEO_V4L2=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_V4L2=m)
 	select VIDEOBUF2_VMALLOC
 	help
 	  Say Y here if you want support to output data from the T37
-- 
2.9.0


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

* [PATCH 2/2] [media] Input: synaptics-rmi4: disallow impossible configuration
  2016-09-12 15:30 [PATCH 1/2] [media] Input: atmel_mxt: disallow impossible configuration Arnd Bergmann
@ 2016-09-12 15:30 ` Arnd Bergmann
  2016-09-15 20:23   ` Nick Dyer
  2016-09-15 20:23 ` [PATCH 1/2] [media] Input: atmel_mxt: " Nick Dyer
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-09-12 15:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-media, Arnd Bergmann, Dmitry Torokhov, Andrew Duggan,
	Hans Verkuil, Nick Dyer, linux-input, linux-kernel

The newly added debug mode for the synaptics-rmi4 driver relies on
the v4l2 interface and vb2_vmalloc, but those might be configured
as loadable modules when the driver itself is built-in, resulting
in a link failure:

drivers/input/rmi4/rmi_core.o: In function `rmi_f54_remove':
rmi_f54.c:(.text.rmi_f54_remove+0x14): undefined reference to `video_unregister_device'
rmi_f54.c:(.text.rmi_f54_remove+0x20): undefined reference to `v4l2_device_unregister'
drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_s_input':
rmi_f54.c:(.text.rmi_f54_vidioc_s_input+0x10): undefined reference to `video_devdata'
drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_g_input':
rmi_f54.c:(.text.rmi_f54_vidioc_g_input+0x10): undefined reference to `video_devdata'
drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_fmt':
rmi_f54.c:(.text.rmi_f54_vidioc_fmt+0x10): undefined reference to `video_devdata'
drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_enum_input':
rmi_f54.c:(.text.rmi_f54_vidioc_enum_input+0x10): undefined reference to `video_devdata'
drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_querycap':
...

The best workaround I could come up with is to disallow the debug
mode unless it's actually possible to call it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")
---
 drivers/input/rmi4/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig
index f3418b65eb41..4c8a55857e00 100644
--- a/drivers/input/rmi4/Kconfig
+++ b/drivers/input/rmi4/Kconfig
@@ -65,7 +65,7 @@ config RMI4_F30
 config RMI4_F54
 	bool "RMI4 Function 54 (Analog diagnostics)"
 	depends on RMI4_CORE
-	depends on VIDEO_V4L2
+	depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m)
 	select VIDEOBUF2_VMALLOC
 	help
 	  Say Y here if you want to add support for RMI4 function 54
-- 
2.9.0


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

* Re: [PATCH 2/2] [media] Input: synaptics-rmi4: disallow impossible configuration
  2016-09-12 15:30 ` [PATCH 2/2] [media] Input: synaptics-rmi4: " Arnd Bergmann
@ 2016-09-15 20:23   ` Nick Dyer
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Dyer @ 2016-09-15 20:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, linux-media, Dmitry Torokhov,
	Andrew Duggan, Hans Verkuil, linux-input, linux-kernel

On Mon, Sep 12, 2016 at 05:30:33PM +0200, Arnd Bergmann wrote:
> The newly added debug mode for the synaptics-rmi4 driver relies on
> the v4l2 interface and vb2_vmalloc, but those might be configured
> as loadable modules when the driver itself is built-in, resulting
> in a link failure:
> 
> drivers/input/rmi4/rmi_core.o: In function `rmi_f54_remove':
> rmi_f54.c:(.text.rmi_f54_remove+0x14): undefined reference to `video_unregister_device'
> rmi_f54.c:(.text.rmi_f54_remove+0x20): undefined reference to `v4l2_device_unregister'
> drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_s_input':
> rmi_f54.c:(.text.rmi_f54_vidioc_s_input+0x10): undefined reference to `video_devdata'
> drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_g_input':
> rmi_f54.c:(.text.rmi_f54_vidioc_g_input+0x10): undefined reference to `video_devdata'
> drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_fmt':
> rmi_f54.c:(.text.rmi_f54_vidioc_fmt+0x10): undefined reference to `video_devdata'
> drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_enum_input':
> rmi_f54.c:(.text.rmi_f54_vidioc_enum_input+0x10): undefined reference to `video_devdata'
> drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_querycap':
> ...
> 
> The best workaround I could come up with is to disallow the debug
> mode unless it's actually possible to call it.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")

Acked-by: Nick Dyer <nick@shmanahar.org>

> ---
>  drivers/input/rmi4/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig
> index f3418b65eb41..4c8a55857e00 100644
> --- a/drivers/input/rmi4/Kconfig
> +++ b/drivers/input/rmi4/Kconfig
> @@ -65,7 +65,7 @@ config RMI4_F30
>  config RMI4_F54
>  	bool "RMI4 Function 54 (Analog diagnostics)"
>  	depends on RMI4_CORE
> -	depends on VIDEO_V4L2
> +	depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m)
>  	select VIDEOBUF2_VMALLOC
>  	help
>  	  Say Y here if you want to add support for RMI4 function 54
> -- 
> 2.9.0
> 

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

* Re: [PATCH 1/2] [media] Input: atmel_mxt: disallow impossible configuration
  2016-09-12 15:30 [PATCH 1/2] [media] Input: atmel_mxt: disallow impossible configuration Arnd Bergmann
  2016-09-12 15:30 ` [PATCH 2/2] [media] Input: synaptics-rmi4: " Arnd Bergmann
@ 2016-09-15 20:23 ` Nick Dyer
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Dyer @ 2016-09-15 20:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, linux-media, Dmitry Torokhov, Rob Herring,
	Hans de Goede, linux-input, linux-kernel

On Mon, Sep 12, 2016 at 05:30:32PM +0200, Arnd Bergmann wrote:
> The newnly added debug mode for the atmel_mxt_ts driver relies on
> the v4l2 interface and vb2_vmalloc, but those might be configured
> as loadable modules when the driver itself is built-in, resulting
> in a link failure:
> 
> drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_vidioc_querycap':
> atmel_mxt_ts.c:(.text.mxt_vidioc_querycap+0x10): undefined reference to `video_devdata'
> drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_buffer_queue':
> atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x20): undefined reference to `vb2_plane_vaddr'
> atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x164): undefined reference to `vb2_buffer_done'
> drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_free_object_table':
> atmel_mxt_ts.c:(.text.mxt_free_object_table+0x18): undefined reference to `video_unregister_device'
> atmel_mxt_ts.c:(.text.mxt_free_object_table+0x20): undefined reference to `v4l2_device_unregister'
> 
> The best workaround I could come up with is to disallow the debug
> mode unless it's actually possible to call it.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: ecfdd7e2660e ("[media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device")

Acked-by: Nick Dyer <nick@shmanahar.org>

> ---
>  drivers/input/touchscreen/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
> index fce1e41ffe8b..ccf933969587 100644
> --- a/drivers/input/touchscreen/Kconfig
> +++ b/drivers/input/touchscreen/Kconfig
> @@ -117,7 +117,8 @@ config TOUCHSCREEN_ATMEL_MXT
>  
>  config TOUCHSCREEN_ATMEL_MXT_T37
>  	bool "Support T37 Diagnostic Data"
> -	depends on TOUCHSCREEN_ATMEL_MXT && VIDEO_V4L2
> +	depends on TOUCHSCREEN_ATMEL_MXT
> +	depends on VIDEO_V4L2=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_V4L2=m)
>  	select VIDEOBUF2_VMALLOC
>  	help
>  	  Say Y here if you want support to output data from the T37
> -- 
> 2.9.0
> 

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

end of thread, other threads:[~2016-09-15 20:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 15:30 [PATCH 1/2] [media] Input: atmel_mxt: disallow impossible configuration Arnd Bergmann
2016-09-12 15:30 ` [PATCH 2/2] [media] Input: synaptics-rmi4: " Arnd Bergmann
2016-09-15 20:23   ` Nick Dyer
2016-09-15 20:23 ` [PATCH 1/2] [media] Input: atmel_mxt: " Nick Dyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).