Open barbieri opened 8 years ago
Hi not yet, I will keep you updated on that.
The driver is fully functional it's just that the interface will change. The reason is that I want to contribute it to Linux mainline and that's what they suggested (see posts on kernelnewbies).
I know that :)
I'm a huge supporter of the IIO. I'm the engineering manager of two projects targeting IoT:
They complement each other and pushes IIO as the sensor interface, then yesterday we got such sensor for a demo and noticed it was lacking the driver, Google shows your github :) at the same time we got a request for proximity sensor! See:
Then once you have it converted, let me know so we include a back port to kernel 4.4 we use now. We can also help with development and testing.
Thanks for letting me know. That actually boosts the priority of finishing it soon. I am currently in a project until May 10 and then I will port the driver to IIO. I will get back to you as soon I am finished.
Please note that currently the driver just supports HC-SRO4 since this is all I have, however it could be extended to support other sensors as well.
Hi, I've created a branch iio where I work on IIO support for the driver. It is work in progress but it works for me (c). If you or one of your colleagues would give it a try that would help me a lot.
Please see the shell scripts setup.sh and test.sh for how to use the new interface. Looking forward to hear you, please message me with comments and bug reports.
Thanks,
@yongli3 can you look into this driver?
@johannesthoma l tested the kernel module using Ostro OS, Since Ostro is using kernel 4.4, there are several changes, the build failed fatal error: linux/iio/sw_trigger.h: No such file or directory, Using Kernel 4.6, build is okay. When I execute the mkdir sensor0 command, I received the below error message(I did not connect the real sensor). Could you let me know if you are using a raspberry pi boards for the module test? which kernel version are you using?
[ 9021.869336] ------------[ cut here ]------------
[ 9021.874846] WARNING: CPU: 0 PID: 980 at /home/yongli/ostro-os/build/tmp-glibc/work-shared/intel-corei7-64/kernel-source/include/linux/kref.h:46 config_item_get+0x4d/0x60 [configfs]
[ 9021.893427] Modules linked in: hc_sro4(O) industrialio_sw_trigger industrialio_configfs configfs 8021q xt_connmark iptable_nat nf_nat_ipv4 nf_nat iptable_mangle intel_soc_dts_iosf intel_powerclamp coretemp efivars i2c_designware_platform i2c_i801 snd_hda_codec_hdmi i2c_designware_core snd_hda_intel snd_hda_codec snd_hda_core mei_txe mei dw_dmac dw_dmac_core snd_soc_sst_acpi snd_soc_sst_match spi_pxa2xx_platform pwm_lpss_platform pwm_lpss nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_ipv6 nf_defrag_ipv6 xt_tcpudp uio xt_conntrack nf_conntrack iptable_filter iwlwifi cfg80211 iio_trig_sysfs industrialio ip6table_filter ip6_tables efivarfs ip_tables x_tables
[ 9021.959259] CPU: 0 PID: 980 Comm: mkdir Tainted: G O 4.6.0-yocto-standard #1
[ 9021.968423] Hardware name: Circuitco Minnowboard Max B3 PLATFORM/MinnowBoard MAX, BIOS MNW2MAX1.X64.0082.R02.1507271125 07/27/2015
[ 9021.981574] 0000000000000286 00000000f03f2eb4 ffff880076e6bdc0 ffffffff92e2b01d
[ 9021.989874] 0000000000000000 0000000000000000 ffff880076e6be00 ffffffff92a7d01b
[ 9021.998181] 0000002e00000018 ffff880076dce890 ffff880076dce890 ffff880077483560
[ 9022.006491] Call Trace:
[ 9022.009239] [
Hi,
Thanks for your bug report. I am using a raspberry Pi 1: kernel version is:
Linux camRaspi 4.6.0+ #15 Mon May 23 15:38:09 CEST 2016 armv6l GNU/Linux
from the raspberry kernel at:
https://github.com/raspberrypi/linux.git
Can you point me to the git repo of the kernel you are using? Then I will be able to reproduce the error.
Best,
PS: Sorry for the delay, I've expected to get an eMail from github when something is going on on the issue.
Please note that there is a newer version of the driver in the iio branch, but this probably won't fix the issue.
@johannesthoma Thanks for your update! I am using the linux-yocto-dev: git://git.yoctoproject.org/linux-yocto-dev. I have a Pi 3 board, let me test it using it too.
@yongli3: Thanks for the info, I will try to reproduce the error using your kernel version.
@yongli3: I just tried to reproduce the error with the most up-to-date yocto kernel, unfortunately without success. The git hash of the kernel I've used is
248edfa0de0fce4f4e88a8d9a0ccc326ac532fa9
Which one did you use?
Note that with this kernel there is an issue with gpio_to_desc() - it just doesn't work with numbers on the Raspberry. This may be an issue in the device tree GPIO descriptors (echo 23 > /sys/class/gpio/export doesn't work as well).
Note also that I've just posted the driver to linux-iio kernel mailing list and just wait for responses.
Thanks @johannesthoma. When you tested the linux-yocto-dev kernel, did you connected the hardware?
Since the linux-yocto-dev is changing, let me re-test it using 248edfa0de0fce4f4e88a8d9a0ccc326ac532fa9
@yongli3 yes I connected the hardware, however this should not make any difference since at device creation time the hardware is not accessed.
Just because I am curious: which time zone are you in?
@johannesthoma Since it is not hardware related, let me test it using my Pi3 and Minnowmax boards. I am in Shanghai China, GMT+8
Hi,
in a forum you mention IIO interface, did you get to do it?