aboutsummaryrefslogtreecommitdiff
path: root/tools/counter (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tools/counter: Remove unneeded semicolonYang Li2023-12-201-3/+3
| | | | | | | | | | | | | ./tools/counter/counter_watch_events.c:233:3-4: Unneeded semicolon ./tools/counter/counter_watch_events.c:234:2-3: Unneeded semicolon ./tools/counter/counter_watch_events.c:333:2-3: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7782 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20231220005143.84987-1-yang.lee@linux.alibaba.com Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
* tools/counter: Fix spelling mistake "componend" -> "component"Colin Ian King2023-12-201-2/+2
| | | | | | | | | There are two spelling mistakes in the help text. Fix them. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20231219133015.365943-1-colin.i.king@gmail.com Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
* tools/counter: add a flexible watch events toolFabrice Gasnier2023-12-183-2/+417
| | | | | | | | | | | | | | | | | | | | | | | This adds a new counter tool to be able to test various watch events. A flexible watch array can be populated from command line, each field may be tuned with a dedicated command line sub-option in "--watch" string. Several watch events can be defined, each can have specific watch options, by using "--watch <watch 1 options> --watch <watch 2 options>". Watch options is a comma separated list. It also comes with a simple default watch (to monitor overflow/underflow events), used when no watch parameters are provided. It's equivalent to: counter_watch_events -w comp_count,scope_count,evt_ovf_udf The print_usage() routine proposes another example, from the command line, which generates a 2 elements watch array, to monitor: - overflow underflow events - capture events, on channel 3, that reads read captured data by specifying the component id (capture3_component_id being 7 here). Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20231213173117.4174511-2-fabrice.gasnier@foss.st.com Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
* tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failureAnh Tuan Phan2023-07-241-1/+2
| | | | | | | | | | | Use rm -df instead of rmdir -p since rmdir requires the directory exist so it causes "make -C tools clean" failed if someone only builds other tools but not counter. Fixes: 228354ed692f ("tools/counter: Makefile: Remove lingering 'include' directories on make clean") Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com> Link: https://lore.kernel.org/r/d4080db5-1825-2848-079a-8bb674d8ee44@gmail.com/ Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
* tools/counter: Makefile: Remove lingering 'include' directories on make cleanRong Tao2023-05-091-0/+1
| | | | | | | | | `make` creates 'include' directories where necessary, so remove them as appropriate on `make clean`. Signed-off-by: Rong Tao <rongtao@cestc.cn> Link: https://lore.kernel.org/r/tencent_F85E314661100B0CE2845EB27E2E2F558C09@qq.com/ Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
* tools/counter: Add .gitignoreRong Tao2023-05-091-0/+2
| | | | | | | | Ignore counter_example and include/linux/counter.h. Signed-off-by: Rong Tao <rongtao@cestc.cn> Link: https://lore.kernel.org/r/tencent_3E0341A1C9AC8FCB7915E7D791D117445707@qq.com/ Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
* kbuild: replace $(if A,A,B) with $(or A,B)Masahiro Yamada2022-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | $(or ...) is available since GNU Make 3.81, and useful to shorten the code in some places. Covert as follows: $(if A,A,B) --> $(or A,B) This patch also converts: $(if A, A, B) --> $(or A, B) Strictly speaking, the latter is not an equivalent conversion because GNU Make keeps spaces after commas; if A is not empty, $(if A, A, B) expands to " A", while $(or A, B) expands to "A". Anyway, preceding spaces are not significant in the code hunks I touched. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
* tools/counter: Create Counter toolsWilliam Breathitt Gray2021-10-173-0/+146
This creates an example Counter program under tools/counter/* to exemplify the Counter character device interface. Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/7c0f975ba098952122302d258ec9ffdef04befaf.1632884256.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>