|
Revision 7 as of 2014-09-25 07:27:01
Size: 1420
Comment: Roberta will take care of staging/iio/light cleanup
|
Revision 23 as of 2015-03-05 11:39:15
Size: 3308
Comment: /* remove completed tasks */
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| = checkpatch.pl cleanups = | = Experimenting with IIO subsystem = |
| Line 5: | Line 5: |
| Use `scripts/checkpatch.pl` to align code in `staging/drivers/iio` to Linux kernel coding style. | For this we will use two kernel modules found in {{{drivers/staging/iio}}}: |
| Line 7: | Line 7: |
| * accel/ * status: assigned to Tapasweni Pathak (irc: tapasweni) * adc/ * status: assigned to Vaishali Thakkar (irc: vaishu) * addac/ * status: not assigned * cdc/ * status: '''clean''' * frequency/ * status: assigned to Roxana Blaj (irc: roxana) * gyro/ * status: not assigned * impedance-analyzer/ * status: '''clean''' * light/ * status: assigned to Roberta Dobrescu (irc: roberta) * magnetometer/ * status: '''clean''' (there is one line over 80 chars but we won't fix it because it makes code harder to read) * meter/ * status: not assigned * resolver/ * status: not assigned * trigger/ * status: not assigned |
* {{{iio_dummy_evgen.ko}}} - generates ''fake'' events interrupts to be used by the {{{iio_dummy}}} example driver * implementation for this module is in {{{iio_dummy_evgen.c}}} * {{{iio_dummy.ko}}} - example IIO driver to demonstrate existing functionality * core implementation can be found in {{{iio_simple_dummy.c}}} * buffer functionality is implemented in {{{iio_simple_dummy_buffer.c}}} * events functionality is implemented in {{{iio_simple_dummy_events.c}}} |
| Line 32: | Line 14: |
| A directory (e.g. `accel`) is considered clean in the context of checkpatch.pl if running the following commands results in no warnings or errors: * {{{scripts/checkpatch.pl -f drivers/staging/iio/accel/*.c}}} * {{{scripts/checkpatch.pl -f drivers/staging/iio/accel/*.h}}} * {{{scripts/checkpatch.pl -f drivers/staging/iio/accel/Kconfig}}} |
== Dummy modules compilation == |
| Line 37: | Line 16: |
| Please send us an email with the directory you want to work on. Don't forget to specify your full name and IRC handle. | You need to select the following config options: * {{{CONFIG_IIO_DUMMY_EVGEN}}} - for building {{{iio_dummy_evgen}}} kernel module * {{{CONFIG_IIO_SIMPLE_DUMMY}}} - for building {{{iio_dummy}}} kernel module * {{{CONFIG_IIO_SIMPLE_DUMMY_EVENTS}}}, {{{CONFIG_IIO_SIMPLE_DUMMY_BUFFER}}} should be selected for events and buffer functionality. Use the following commands for modules compilation: * {{{$ make drivers/staging/iio/iio_dummy_evgen.ko}}} * {{{$ make drivers/staging/iio/iio_dummy.ko}}} Use the following commands for module loading: * {{{$ insmod iio_dummy_evgen.ko}}} * {{{$ insmod iio_dummy.ko}}} Task 01: * Show that the modules were successfully loaded . Send an email to mentors listed at the top of the page, with the output of the following commands * lsmod * ls -l /sys/bus/iio/devices/ * ls -l /sys/bus/iio/devices/iio:device0/ * ls -l /sys/bus/iio/devices/iio_evgen/ == IIO event monitor == IIO event monitor is an user space example application which reads events from IIO layer and pretty prints the results. Implementation can be found in {{{iio_event_monitor.c}}} under {{{iio/drivers/staging/iio/Documentation}}}. [[BR]] Task 02: * compile {{{iio_event_monitor.c}}} to obtain an executable called {{{iio_event_monitor}}}. Send an email with the command used for compilation to mentors listed at the top of the page. == IIO sysfs attributes == IIO sysfs attributes should all be documented in {{{Documentation/ABI/testing/sysfs-bus-iio}}}. Have a look at this file, with a focus on the following entries: * /sys/bus/iio/devices/iio:deviceX * /sys/bus/iio/devices/triggerX * /sys/bus/iio/devices/iio:deviceX/buffer * /sys/bus/iio/devices/iio:deviceX/events Task 03: Add missing ABI Documentation * this task asks you to find missing ABI documentation in {{{Documentation/ABI/testing/sysfs-bus-iio}}} (for example look at this [http://www.spinics.net/lists/linux-iio/msg15203.html patch]) * the key structure to be analyzed is [http://lxr.free-electrons.com/source/include/linux/iio/iio.h#L217 struct iio_chan_spec] * use {{{drivers/staging/iio/iio_simple_dummy.c}}} for testing adding new channels to {{{iio_dummy_channels[]}}} array. Then look for the attributes names in {{{/sys/bus/iio/devices/iio:device0}}} and check to see if they are documented in {{{Documentation/ABI/testing/sysfs-bus-iio}}} * make sure that the undocumented ABI has at least one user driver in {{{drivers/iio/}}} or {{{drivers/staging/iio/}}} |
Mentors: [http://kernelnewbies.org/OctavianPurdila Octavian Purdila], [http://kernelnewbies.org/DanielBaluta Daniel Baluta]
Experimenting with IIO subsystem
For this we will use two kernel modules found in drivers/staging/iio:
iio_dummy_evgen.ko - generates fake events interrupts to be used by the iio_dummy example driver
implementation for this module is in iio_dummy_evgen.c
iio_dummy.ko - example IIO driver to demonstrate existing functionality
core implementation can be found in iio_simple_dummy.c
buffer functionality is implemented in iio_simple_dummy_buffer.c
events functionality is implemented in iio_simple_dummy_events.c
Dummy modules compilation
You need to select the following config options:
CONFIG_IIO_DUMMY_EVGEN - for building iio_dummy_evgen kernel module
CONFIG_IIO_SIMPLE_DUMMY - for building iio_dummy kernel module
CONFIG_IIO_SIMPLE_DUMMY_EVENTS, CONFIG_IIO_SIMPLE_DUMMY_BUFFER should be selected for events and buffer functionality.
Use the following commands for modules compilation:
$ make drivers/staging/iio/iio_dummy_evgen.ko
$ make drivers/staging/iio/iio_dummy.ko
Use the following commands for module loading:
$ insmod iio_dummy_evgen.ko
$ insmod iio_dummy.ko
Task 01:
- Show that the modules were successfully loaded . Send an email to mentors listed at the top of the page, with the output of the following commands
- lsmod
- ls -l /sys/bus/iio/devices/
- ls -l /sys/bus/iio/devices/iio:device0/
- ls -l /sys/bus/iio/devices/iio_evgen/
IIO event monitor
IIO event monitor is an user space example application which reads events from IIO layer and pretty prints the results. Implementation can be found in iio_event_monitor.c under iio/drivers/staging/iio/Documentation. BR
Task 02:
compile iio_event_monitor.c to obtain an executable called iio_event_monitor. Send an email with the command used for compilation to mentors listed at the top of the page.
IIO sysfs attributes
IIO sysfs attributes should all be documented in Documentation/ABI/testing/sysfs-bus-iio. Have a look at this file, with a focus on the following entries:
- /sys/bus/iio/devices/iio:deviceX
- /sys/bus/iio/devices/triggerX
- /sys/bus/iio/devices/iio:deviceX/buffer
- /sys/bus/iio/devices/iio:deviceX/events
Task 03: Add missing ABI Documentation
this task asks you to find missing ABI documentation in Documentation/ABI/testing/sysfs-bus-iio (for example look at this [http://www.spinics.net/lists/linux-iio/msg15203.html patch])
the key structure to be analyzed is [http://lxr.free-electrons.com/source/include/linux/iio/iio.h#L217 struct iio_chan_spec]
use drivers/staging/iio/iio_simple_dummy.c for testing adding new channels to iio_dummy_channels[] array. Then look for the attributes names in /sys/bus/iio/devices/iio:device0 and check to see if they
are documented in Documentation/ABI/testing/sysfs-bus-iio
make sure that the undocumented ABI has at least one user driver in drivers/iio/ or drivers/staging/iio/