From bfd8d1d6aa45a9c679f628e53b78904e19be89b9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 17 Jan 2018 09:28:10 -0600 Subject: [PATCH] apps/examples/touchscreen: Elimint BOARDIOC_TSCTEST_SETUP. --- examples/touchscreen/Kconfig | 22 ---------------------- examples/touchscreen/tc_main.c | 19 ------------------- 2 files changed, 41 deletions(-) diff --git a/examples/touchscreen/Kconfig b/examples/touchscreen/Kconfig index 0801675d4..a0c3de339 100644 --- a/examples/touchscreen/Kconfig +++ b/examples/touchscreen/Kconfig @@ -43,26 +43,4 @@ config EXAMPLES_TOUCHSCREEN_MOUSE The touchscreen test can also be configured to work with a mouse driver by setting this option. -config EXAMPLES_TOUCHSCREEN_ARCHINIT - bool "Architecture-specific initialization" - default y - depends on LIB_BOARDCTL - select BOARDCTL_TSCTEST - ---help--- - By default, the touchscreen example will call boardctl() to - register the touchscreen device before it attempts to open it. - Similarly, it will call boardctl() to unregister the touchscreen - device when it is finished. - - This works well for the typical touchscreen controller but there are - other devices that cannot be initialized and uninitialized in this - fashion. Consider a USB mouse, for example. The USB mouse will be - registered when the mouse is connected and unregistered when the - mouse is disconnected. - - So, in cases like this, there are two options: (1) provide dummy - board_tsc_setup() just to satisfy the linking requirements of - boardctl() or, (2) de-select this option. If this option is de- - selected, then the boardctl() will never be called. - endif diff --git a/examples/touchscreen/tc_main.c b/examples/touchscreen/tc_main.c index 4b1a9cf6f..3554c37a2 100644 --- a/examples/touchscreen/tc_main.c +++ b/examples/touchscreen/tc_main.c @@ -40,7 +40,6 @@ #include #include -#include #include #include @@ -106,9 +105,6 @@ int tc_main(int argc, char *argv[]) #endif int fd; int errval = 0; -#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT - int ret; -#endif /* If this example is configured as an NX add-on, then limit the number of * samples that we collect before returning. Otherwise, we never return @@ -125,21 +121,6 @@ int tc_main(int argc, char *argv[]) printf("tc_main: nsamples: %d\n", CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES); #endif -#ifdef CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT - /* Initialization of the touchscreen hardware is performed by logic - * external to this test. - */ - - printf("tc_main: Initializing external touchscreen device\n"); - ret = boardctl(BOARDIOC_TSCTEST_SETUP, CONFIG_EXAMPLES_TOUCHSCREEN_MINOR); - if (ret != OK) - { - printf("tc_main: board_tsc_setup failed: %d\n", errno); - errval = 1; - goto errout; - } -#endif - /* Open the touchscreen device for reading */ printf("tc_main: Opening %s\n", CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH);