aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorCheah Kok Cheong <thrust73@gmail.com>2017-02-16 22:05:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-16 10:14:45 -0800
commit9ff7400bd38c0d0bbcd02ed79cca2e51e10f0958 (patch)
tree6015f89236117595dcc41b5476b3672f08935840 /drivers/staging/lustre
parentstaging: comedi: fixed multiple line dereference (diff)
downloadlinux-dev-9ff7400bd38c0d0bbcd02ed79cca2e51e10f0958.tar.xz
linux-dev-9ff7400bd38c0d0bbcd02ed79cca2e51e10f0958.zip
Staging: comedi: drivers: comedi_test: Add auto-configuration capability
Currently this module needs to be manually configured by COMEDI userspace tool before the test waveform can be read by a COMEDI compatible application. This patch adds auto-configuration capability and makes it the default loading option. This is achieved by creating a device during init to stand in for a real hardware device. This allows comedi_auto_config() to perform auto-configuration. With this patch, the test waveform can be read by a COMEDI compatible application without needing manual configuration. Previous behaviour is still selectable via module loading parameter. Module loading without passing any parameter will default to auto-configuration with the same default waveform amplitude and period values. For auto-configuration, different amplitude and period values can be set via module loading parameters. Tested on Xubuntu 16.04 using Xoscope ver: 2.0 which is available in the Ubuntu repository. Xoscope is a COMEDI compatible digital oscilloscope application. For manual configuration, only module loading/unloading is tested. Here are the truncated dmesg output. [sudo modprobe comedi_test] comedi_test: 1000000 microvolt, 100000 microsecond waveform attached driver 'comedi_test' has successfully auto-configured 'comedi_test'. [sudo modprobe comedi_test amplitude=2500000 period=150000] comedi_test: 2500000 microvolt, 150000 microsecond waveform attached driver 'comedi_test' has successfully auto-configured 'comedi_test'. [sudo modprobe comedi_test noauto=1] comedi_test: module is from the staging directory, the quality is unknown, you have been warned. For those without an actual hardware, the comedi_test module is as close as one can get to test the COMEDI system. Having both auto and manual configuration capability will broaden the test function of this module. Hopefully this will make it easier for people to check out the COMEDI system and contribute to its development. Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
0 files changed, 0 insertions, 0 deletions