From e276d4d16dd896d974513dcbfdcb663366eed2ad Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 16 Jan 2018 18:03:21 -0600 Subject: [PATCH] Remove the BOARDIOC_TSCTEST_TEARNDOWN boardctl() command. Remove all implementations of board_tsc_teardown() (the were all stubs anyway except for the simulation). --- configs/Kconfig | 3 +-- configs/arduino-due/src/sam_touchscreen.c | 23 ---------------- configs/boardctl.c | 14 ---------- configs/hymini-stm32v/src/stm32_ts.c | 21 --------------- .../lpcxpresso-lpc54628/src/lpc54_ft5x06.c | 7 +---- .../mikroe-stm32f4/src/stm32_touchscreen.c | 21 --------------- .../olimex-lpc1766stk/src/lpc17_hidmouse.c | 23 ---------------- configs/open1788/src/lpc17_touchscreen.c | 21 --------------- configs/pic32mx7mmb/src/pic32_touchscreen.c | 21 --------------- configs/sam3u-ek/src/sam_touchscreen.c | 21 --------------- configs/sam4e-ek/src/sam_ads7843e.c | 21 --------------- configs/sama5d3x-ek/src/sam_touchscreen.c | 21 --------------- configs/sama5d4-ek/src/sam_maxtouch.c | 23 ---------------- configs/samv71-xult/src/sam_maxtouch.c | 23 ---------------- configs/shenzhou/src/stm32_touchscreen.c | 21 --------------- configs/sim/src/sim_touchscreen.c | 20 -------------- configs/stm3220g-eval/src/stm32_stmpe811.c | 21 --------------- configs/stm3240g-eval/src/stm32_stmpe811.c | 21 --------------- configs/stm32f429i-disco/src/stm32_stmpe811.c | 21 --------------- .../src/stm32_touchscreen.c | 23 ---------------- include/nuttx/board.h | 27 +------------------ include/sys/boardctl.h | 11 ++------ 22 files changed, 5 insertions(+), 423 deletions(-) diff --git a/configs/Kconfig b/configs/Kconfig index c278ece1e8..bc45349949 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -2357,8 +2357,7 @@ config BOARDCTL_TSCTEST ---help--- Enables support for the BOARDIOC_TSCTEST_SETUP and BOARDIOC_TSCTEST_TEARDOWN boardctl() commands. Architecture - specific logic must provide board_tsc_setup() and - board_tsc_teardown() interfaces. + specific logic must provide the board_tsc_setup() interface. config BOARDCTL_IOCTL bool "Board-specific boardctl() commands" diff --git a/configs/arduino-due/src/sam_touchscreen.c b/configs/arduino-due/src/sam_touchscreen.c index 4e78c9376a..2c20c0f2b2 100644 --- a/configs/arduino-due/src/sam_touchscreen.c +++ b/configs/arduino-due/src/sam_touchscreen.c @@ -405,27 +405,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen XPT2046 device. It will - * continue to run and process touch interrupts in the background. - */ -} - #endif /* CONFIG_ARDUINO_ITHEAD_TFT && CONFIG_SPI_BITBANG && CONFIG_INPUT_ADS7843E */ diff --git a/configs/boardctl.c b/configs/boardctl.c index d540471135..a1f4f6ebc6 100644 --- a/configs/boardctl.c +++ b/configs/boardctl.c @@ -414,20 +414,6 @@ int boardctl(unsigned int cmd, uintptr_t arg) ret = board_tsc_setup((int)arg); } break; - - /* CMD: BOARDIOC_TSCTEST_TEARDOWN - * DESCRIPTION: Touchscreen controller test configuration - * ARG: None - * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST - * DEPENDENCIES: Board logic must provide board_tsc_teardown() - */ - - case BOARDIOC_TSCTEST_TEARDOWN: - { - board_tsc_teardown(); - ret = OK; - } - break; #endif default: diff --git a/configs/hymini-stm32v/src/stm32_ts.c b/configs/hymini-stm32v/src/stm32_ts.c index 781eafc9f1..529a3fc1a6 100644 --- a/configs/hymini-stm32v/src/stm32_ts.c +++ b/configs/hymini-stm32v/src/stm32_ts.c @@ -172,24 +172,3 @@ int board_tsc_setup(int minor) return ads7843e_register(dev, &ts_cfg, minor); } - -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* FIXME What can/should we do here ? */ -} diff --git a/configs/lpcxpresso-lpc54628/src/lpc54_ft5x06.c b/configs/lpcxpresso-lpc54628/src/lpc54_ft5x06.c index 162089b190..84b4ede70b 100644 --- a/configs/lpcxpresso-lpc54628/src/lpc54_ft5x06.c +++ b/configs/lpcxpresso-lpc54628/src/lpc54_ft5x06.c @@ -246,7 +246,7 @@ int lpc54_ft5x06_register(void) } /**************************************************************************** - * Name: board_tsc_setup and board_tsc_teardown + * Name: board_tsc_setup * * Description: * Stubs for expected interfaces. This implementation does not permit the @@ -261,9 +261,4 @@ int board_tsc_setup(int minor) return OK; } -void board_tsc_teardown(void) -{ -} -#endif - #endif /* HAVE_FT5x06*/ diff --git a/configs/mikroe-stm32f4/src/stm32_touchscreen.c b/configs/mikroe-stm32f4/src/stm32_touchscreen.c index 8dfb259f48..ec1cb2e00e 100644 --- a/configs/mikroe-stm32f4/src/stm32_touchscreen.c +++ b/configs/mikroe-stm32f4/src/stm32_touchscreen.c @@ -1583,25 +1583,4 @@ errout_with_priv: return ret; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* Need to unregister the /dev/inputN device here. */ -} - #endif /* CONFIG_INPUT */ diff --git a/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c b/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c index f583d52679..a44d62cbab 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c +++ b/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c @@ -132,27 +132,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the USB mouse driver. It will continue - * to run and process touch interrupts in the background. - */ -} - #endif /* CONFIG_USBHOST_HIDMOUSE */ diff --git a/configs/open1788/src/lpc17_touchscreen.c b/configs/open1788/src/lpc17_touchscreen.c index eb63f52614..03416505ff 100644 --- a/configs/open1788/src/lpc17_touchscreen.c +++ b/configs/open1788/src/lpc17_touchscreen.c @@ -323,25 +323,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen XPT2046 device yet */ -} - #endif /* CONFIG_INPUT_ADS7843E */ diff --git a/configs/pic32mx7mmb/src/pic32_touchscreen.c b/configs/pic32mx7mmb/src/pic32_touchscreen.c index 950d1fc867..f0ed889a2f 100644 --- a/configs/pic32mx7mmb/src/pic32_touchscreen.c +++ b/configs/pic32mx7mmb/src/pic32_touchscreen.c @@ -1435,25 +1435,4 @@ errout_with_priv: return ret; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* Need to unregister the /dev/inputN device here. */ -} - #endif /* CONFIG_INPUT */ diff --git a/configs/sam3u-ek/src/sam_touchscreen.c b/configs/sam3u-ek/src/sam_touchscreen.c index c5cc9df288..398838710f 100644 --- a/configs/sam3u-ek/src/sam_touchscreen.c +++ b/configs/sam3u-ek/src/sam_touchscreen.c @@ -272,26 +272,5 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen ADS7843E device yet */ -} - #endif /* CONFIG_INPUT_ADS7843E */ diff --git a/configs/sam4e-ek/src/sam_ads7843e.c b/configs/sam4e-ek/src/sam_ads7843e.c index 82dd848cd9..aeeddceb27 100644 --- a/configs/sam4e-ek/src/sam_ads7843e.c +++ b/configs/sam4e-ek/src/sam_ads7843e.c @@ -269,25 +269,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen ADS7843E device yet */ -} - #endif /* CONFIG_INPUT && CONFIG_INPUT_ADS7843E */ diff --git a/configs/sama5d3x-ek/src/sam_touchscreen.c b/configs/sama5d3x-ek/src/sam_touchscreen.c index ba5126643a..ced5853522 100644 --- a/configs/sama5d3x-ek/src/sam_touchscreen.c +++ b/configs/sama5d3x-ek/src/sam_touchscreen.c @@ -142,25 +142,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen yet */ -} - #endif /* CONFIG_INPUT_ADS7843E */ diff --git a/configs/sama5d4-ek/src/sam_maxtouch.c b/configs/sama5d4-ek/src/sam_maxtouch.c index 1511c7a662..f64f661836 100644 --- a/configs/sama5d4-ek/src/sam_maxtouch.c +++ b/configs/sama5d4-ek/src/sam_maxtouch.c @@ -290,27 +290,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen maXTouch device. It will - * continue to run and process touch interrupts in the background. - */ -} - #endif /* HAVE_MAXTOUCH */ diff --git a/configs/samv71-xult/src/sam_maxtouch.c b/configs/samv71-xult/src/sam_maxtouch.c index e6e97de0e5..42cd74a16e 100644 --- a/configs/samv71-xult/src/sam_maxtouch.c +++ b/configs/samv71-xult/src/sam_maxtouch.c @@ -289,27 +289,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen maXTouch device. It will - * continue to run and process touch interrupts in the background. - */ -} - #endif /* HAVE_MAXTOUCH */ diff --git a/configs/shenzhou/src/stm32_touchscreen.c b/configs/shenzhou/src/stm32_touchscreen.c index 99b3971df8..c499f33a27 100644 --- a/configs/shenzhou/src/stm32_touchscreen.c +++ b/configs/shenzhou/src/stm32_touchscreen.c @@ -281,26 +281,5 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen ADS7843E device yet */ -} - #endif /* CONFIG_INPUT_ADS7843E */ diff --git a/configs/sim/src/sim_touchscreen.c b/configs/sim/src/sim_touchscreen.c index 0f45d5300d..229b5a79d6 100644 --- a/configs/sim/src/sim_touchscreen.c +++ b/configs/sim/src/sim_touchscreen.c @@ -263,23 +263,3 @@ errout: return ret; } -/**************************************************************************** - * Name: board_tsc_teardown() - * - * Description: - * Perform architecuture-specific un-initialization of the touchscreen - * hardware. This interface must be provided by all configurations - * using apps/examples/touchscreen - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* Shut down the touchscreen driver */ - - sim_tsc_uninitialize(); - - /* Close NX */ - - nx_disconnect(g_simtc.hnx); -} diff --git a/configs/stm3220g-eval/src/stm32_stmpe811.c b/configs/stm3220g-eval/src/stm32_stmpe811.c index ec79a31864..716761235c 100644 --- a/configs/stm3220g-eval/src/stm32_stmpe811.c +++ b/configs/stm3220g-eval/src/stm32_stmpe811.c @@ -336,26 +336,5 @@ int board_tsc_setup(int minor) #endif } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen STMPE811 device yet */ -} - #endif /* CONFIG_INPUT_STMPE811 */ diff --git a/configs/stm3240g-eval/src/stm32_stmpe811.c b/configs/stm3240g-eval/src/stm32_stmpe811.c index b1b8126c57..1a03197263 100644 --- a/configs/stm3240g-eval/src/stm32_stmpe811.c +++ b/configs/stm3240g-eval/src/stm32_stmpe811.c @@ -336,26 +336,5 @@ int board_tsc_setup(int minor) #endif } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen STMPE811 device yet */ -} - #endif /* CONFIG_INPUT_STMPE811 */ diff --git a/configs/stm32f429i-disco/src/stm32_stmpe811.c b/configs/stm32f429i-disco/src/stm32_stmpe811.c index 29fb9284a8..c089990ee7 100644 --- a/configs/stm32f429i-disco/src/stm32_stmpe811.c +++ b/configs/stm32f429i-disco/src/stm32_stmpe811.c @@ -339,26 +339,5 @@ int board_tsc_setup(int minor) #endif } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen STMPE811 device yet */ -} - #endif /* CONFIG_INPUT_STMPE811 */ diff --git a/configs/viewtool-stm32f107/src/stm32_touchscreen.c b/configs/viewtool-stm32f107/src/stm32_touchscreen.c index 8d6bc3c259..17539fc9b5 100644 --- a/configs/viewtool-stm32f107/src/stm32_touchscreen.c +++ b/configs/viewtool-stm32f107/src/stm32_touchscreen.c @@ -304,27 +304,4 @@ int board_tsc_setup(int minor) return OK; } -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - ****************************************************************************/ - -void board_tsc_teardown(void) -{ - /* No support for un-initializing the touchscreen XPT2046 device. It will - * continue to run and process touch interrupts in the background. - */ -} - #endif /* CONFIG_INPUT_ADS7843E */ diff --git a/include/nuttx/board.h b/include/nuttx/board.h index af120a8808..b2b39d5c88 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/board.h * - * Copyright (C) 2015-2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -312,31 +312,6 @@ FAR void *board_composite_connect(int port, int configid); int board_tsc_setup(int minor); -/**************************************************************************** - * Name: board_tsc_teardown - * - * Description: - * Each board that supports a touchscreen device must provide this function. - * This function is called by application-specific, setup logic to - * uninitialize the touchscreen device. - * - * This is an internal OS interface but may be invoked indirectly from - * application-level touchscreen testing logic (perhaps by - * apps/examples/touchscreen). If CONFIG_LIB_BOARDCTL=y and - * CONFIG_BOARDCTL_TSCTEST=y, then this functions will be invoked via the - * (non-standard) boardctl() interface using the BOARDIOC_TSCTEST_TEARDOWN - * command. - * - * Input Parameters: - * None - * - * Returned Value: - * None. - * - ****************************************************************************/ - -void board_tsc_teardown(void); - /**************************************************************************** * Name: board_graphics_setup * diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index d059b9f828..84d828f8a2 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/sys/boardctl.h * - * Copyright (C) 2015-2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -120,12 +120,6 @@ * ARG: Touch controller device minor number * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST * DEPENDENCIES: Board logic must provide board_tsc_setup() - * - * CMD: BOARDIOC_TSCTEST_TEARDOWN - * DESCRIPTION: Touchscreen controller test configuration - * ARG: None - * CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST - * DEPENDENCIES: Board logic must provide board_tsc_teardown() */ #define BOARDIOC_INIT _BOARDIOC(0x0001) @@ -137,7 +131,6 @@ #define BOARDIOC_USBDEV_CONTROL _BOARDIOC(0x0007) #define BOARDIOC_NX_START _BOARDIOC(0x0008) #define BOARDIOC_TSCTEST_SETUP _BOARDIOC(0x0009) -#define BOARDIOC_TSCTEST_TEARDOWN _BOARDIOC(0x000a) /* If CONFIG_BOARDCTL_IOCTL=y, then board-specific commands will be support. * In this case, all commands not recognized by boardctl() will be forwarded @@ -146,7 +139,7 @@ * User defined board commands may begin with this value: */ -#define BOARDIOC_USER _BOARDIOC(0x000b) +#define BOARDIOC_USER _BOARDIOC(0x000a) /**************************************************************************** * Public Type Definitions