Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: hhornbacher on February 17, 2013, 01:11:00 AM

Title: UPDATE: Made a kernel module for UEXT MOD-IO (for A13 sunxi 3.0)
Post by: hhornbacher on February 17, 2013, 01:11:00 AM
I made today a kernel driver module for the UEXT IO module. Maybe someone is interested in this... (I would also appreciate some tipps, cause this is my first kernel module)

At the moment it supports reading digital io and adc, as well as reading/controlling relay states over procfs.

To read you can use
cat /proc/mod-io/adc/1

To write
echo "1" > /proc/mod-io/relay/2

Here is the download link:
https://docs.google.com/file/d/0BxI9HwY3GzeuUXZqdzNIQUhVRzA/edit?usp=sharing (https://docs.google.com/file/d/0BxI9HwY3GzeuUXZqdzNIQUhVRzA/edit?usp=sharing)


EDIT:
Now you can get all my module sources from:
https://github.com/hhornbacher/a13-kernel-modules (https://github.com/hhornbacher/a13-kernel-modules)

Would be cool, if some poeple who have the MOD-IO can test it and write some feedback ;D
Title: Re: Made a kernel module for UEXT MOD-IO (for A13 sunxi 3.0)
Post by: drspastic on February 17, 2013, 04:03:06 AM
looks good enough to get put in the kernel as standard. essential stuff
Title: Re: Made a kernel module for UEXT MOD-IO (for A13 sunxi 3.0)
Post by: hhornbacher on February 17, 2013, 04:49:45 PM
thanks, this encourages me to do some further testing and optimisation, and maybe then i start the effort to get it put in kernel
Title: Re: Made a kernel module for UEXT MOD-IO (for A13 sunxi 3.0)
Post by: olimex on February 17, 2013, 11:24:42 PM
very nice! :)
Title: Re: UPDATE: Made a kernel module for UEXT MOD-IO (for A13 sunxi 3.0)
Post by: vinifr on February 19, 2013, 01:59:03 PM
Interesting, very good!

I also wrote some device drivers: https://github.com/vinifr/drivers-sunxi (https://github.com/vinifr/drivers-sunxi)
Title: Re: UPDATE: Made a kernel module for UEXT MOD-IO (for A13 sunxi 3.0)
Post by: hhornbacher on February 19, 2013, 05:48:01 PM
thanks, and your drivers are good reference material, very interesting, too!