Skip to content

samples: timers: hpet_example: Improve user experience

Akhilesh Patil lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2samples: timers: hpet_example: Improve argument parsingsamples/timers/hpet_example.c+9 -20 replies
2/2samples: Kconfig: Add help for CONFIG_SAMPLE_TIMERsamples/Kconfig+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] samples: timers: hpet_example: Improve user experience

Hi all,
This patch series improves user experience for
samples/timers/hpet_example

PATCH 1/2 --> Add support to print help text if user does not provide required arguments.

PATCH 2/2 --> add help text in timers Kconfig

Testing:
I have tested the changes on x86 with hpet device as follows.

1. Build the sample program

$ gcc hpet_example.c -o hpet_example

2. Run hpet program with no args

$ ./hpet_example
-hpet: requires command
Format: hpet_example <command> </dev/device_name>
Supported commands:
        open-close
        info
        poll
        fasync

Example: $ ./hpet_example info /dev/hpet

3. Run and verify hpet commands on /dev/hpet

$ sudo ./hpet_example info /dev/hpet
-hpet: executing info
hpet_info: hi_irqfreq 0x0 hi_flags 0x10 hi_hpet 0 hi_timer 0

Akhilesh Patil (2):
samples: timers: hpet_example: Improve argument parsing
samples: Kconfig: Add help for CONFIG_SAMPLE_TIMER

 samples/Kconfig               |  3 +++
 samples/timers/hpet_example.c | 11 +++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1