OldMan Posted February 21, 2017 Posted February 21, 2017 Hi all, I'm trying to get some sensors working with latest Armbian on a NanoPi Neo ... 1st thing is that there are a bunch of modules loaded where I have no hardware for, f.e. pcf8591 and bmp085: root@nanopineo:~# uname -a Linux nanopineo 3.4.113-sun8i #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 armv7l GNU/Linux root@nanopineo:~# lsmod Module Size Used by ir_lirc_codec 3650 0 lirc_dev 7834 1 ir_lirc_codec ir_mce_kbd_decoder 2885 0 ir_sanyo_decoder 1480 0 ir_sony_decoder 1422 0 ir_jvc_decoder 1452 0 ir_rc6_decoder 1941 0 ir_rc5_decoder 1412 0 ir_nec_decoder 1556 0 sunxi_cir 1601 0 rc_core 12727 10 ir_lirc_codec,ir_rc5_decoder,ir_nec_decoder,ir_sony_decoder,sunxi_cir,ir_mce_kbd_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_sanyo_decoder bmp085 3487 0 pcf8591 3363 0 g_serial 27617 0 btrfs 712409 0 root@nanopineo:~# cat /etc/modules #w1-sunxi #w1-gpio #w1-therm #sunxi-cir g_serial root@nanopineo:~# dmesg | grep plat [ 0.115079] plat: add bmp085 device [ 0.115079] plat: add pcf8591 device except for g_serial which seems loaded from /etc/modules I cant find from where the rest gets loaded ...? Then when trying to delete the instance of pcf8591 (I need address 0x48 for a lm75a ) I get: root@nanopineo:~# ll /sys/bus/i2c/devices/i2c-0/ total 0 drwxr-xr-x 4 root root 0 Jan 1 1970 0-0048 drwxr-xr-x 3 root root 0 Feb 19 19:18 0-004f drwxr-xr-x 3 root root 0 Jan 1 1970 0-0077 --w------- 1 root root 4096 Feb 21 11:02 delete_device lrwxrwxrwx 1 root root 0 Feb 19 19:17 device -> ../../twi.0 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev -r--r--r-- 1 root root 4096 Feb 19 19:17 name --w------- 1 root root 4096 Feb 19 19:18 new_device drwxr-xr-x 2 root root 0 Feb 19 19:11 power lrwxrwxrwx 1 root root 0 Feb 19 19:11 subsystem -> ../../../../bus/i2c -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent root@nanopineo:~# echo 0x48 > /sys/bus/i2c/devices/i2c-0/delete_device -bash: echo: write error: Invalid argument root@nanopineo:~# echo 0x4f > /sys/bus/i2c/devices/i2c-0/delete_device -bash: echo: write error: Invalid argument root@nanopineo:~# echo 0x77 > /sys/bus/i2c/devices/i2c-0/delete_device -bash: echo: write error: Invalid argument here the device at 0x4f is another lm75a which I have self instantiated and which works fine - though even that I cant remove ... so my questions are: 1) from where get all those modules (pcf8591, bmp085, ir* and related) loaded and why? 2) why does deleting of devices not work? I've have an older version of Armbian running on a BPI and there I can delete instantiated devices just fine ... Excuse me if this has already been asked/answered in another thread but I have heavily searched but wasnt successful :-(
Recommended Posts