beagleboard / linux

The official Read Only BeagleBoard and BeagleBone kernel repository https://git.beagleboard.org/beagleboard/linux
http://beagleboard.org/source
Other
707 stars 565 forks source link

Drivers for BeagleConnect/Greybus air-quality-demo #257

Open jadonk opened 3 years ago

jadonk commented 3 years ago

Hey @RobertCNelson and @vaishnav98, is this good to merge here?

vaishnavachath commented 3 years ago

Hi @jadonk , https://github.com/vaishnav98/mikrobus/issues/3 mikroBUS driver uses PROPERTY_ENTRY_ARRAY_LEN() which was introduced from 5.5+ only (https://elixir.bootlin.com/linux/v5.5/source/include/linux/property.h#L276) , will it be possible to try on a more recent kernel?

jadonk commented 3 years ago

If all the goodness is there, sure. I just want all the BeagleConnect support bits merged. No idea where @RobertCNelson is with newer kernels.

vaishnavachath commented 3 years ago

tried both mikroBUS and wpanusb on 5.7.x and 5.8.x and everything works nicely, hope the hm3301 driver should also be good. there will be some greybus patches also coming soon, tried the I2C EEPROM Click ID version of mikroBUS driver with Greybus over UART(https://github.com/cfriedt/greybus-for-zephyr/pull/62) and everything works perfectly, https://github.com/vaishnav98/greybus/commit/e7f3af7523067e239cb391b6bfa301744b5426ed

RobertCNelson commented 3 years ago

i've got the first 3 patches merged...

jadonk commented 3 years ago

whoops.

RobertCNelson commented 3 years ago

and i need to drop #1 and #2..

 drivers/misc/mikrobus/mikrobus_manifest.c: In function ‘mikrobus_property_entry_get’:
drivers/misc/mikrobus/mikrobus_manifest.c:208:21: error: implicit declaration of function ‘PROPERTY_ENTRY_U8_ARRAY_LEN’; did you mean ‘PROPERTY_ENTRY_U8_ARRAY’? [-Werror=implicit-function-declaration]
     properties[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(prop_name,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                     PROPERTY_ENTRY_U8_ARRAY
drivers/misc/mikrobus/mikrobus_manifest.c:208:19: error: incompatible types when assigning to type ‘struct property_entry’ from type ‘int’
     properties[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(prop_name,
                   ^
drivers/misc/mikrobus/mikrobus_manifest.c:217:21: error: implicit declaration of function ‘PROPERTY_ENTRY_U16_ARRAY_LEN’; did you mean ‘PROPERTY_ENTRY_U16_ARRAY’? [-Werror=implicit-function-declaration]
     properties[i] = PROPERTY_ENTRY_U16_ARRAY_LEN(prop_name,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     PROPERTY_ENTRY_U16_ARRAY
drivers/misc/mikrobus/mikrobus_manifest.c:217:19: error: incompatible types when assigning to type ‘struct property_entry’ from type ‘int’
     properties[i] = PROPERTY_ENTRY_U16_ARRAY_LEN(prop_name,
                   ^
drivers/misc/mikrobus/mikrobus_manifest.c:226:21: error: implicit declaration of function ‘PROPERTY_ENTRY_U32_ARRAY_LEN’; did you mean ‘PROPERTY_ENTRY_U32_ARRAY’? [-Werror=implicit-function-declaration]
     properties[i] = PROPERTY_ENTRY_U32_ARRAY_LEN(prop_name,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     PROPERTY_ENTRY_U32_ARRAY
drivers/misc/mikrobus/mikrobus_manifest.c:226:19: error: incompatible types when assigning to type ‘struct property_entry’ from type ‘int’
     properties[i] = PROPERTY_ENTRY_U32_ARRAY_LEN(prop_name,
                   ^
drivers/misc/mikrobus/mikrobus_manifest.c:235:21: error: implicit declaration of function ‘PROPERTY_ENTRY_U64_ARRAY_LEN’; did you mean ‘PROPERTY_ENTRY_U64_ARRAY’? [-Werror=implicit-function-declaration]
     properties[i] = PROPERTY_ENTRY_U64_ARRAY_LEN(prop_name,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     PROPERTY_ENTRY_U64_ARRAY
drivers/misc/mikrobus/mikrobus_manifest.c:235:19: error: incompatible types when assigning to type ‘struct property_entry’ from type ‘int’
     properties[i] = PROPERTY_ENTRY_U64_ARRAY_LEN(prop_name,
                   ^
jadonk commented 3 years ago

Did I still miss wpanusb.c? Brain not really working well.

The hm3301 driver seems to be breaking iio_info, so @Pillar1989 is looking at it. https://github.com/Seeed-Studio/seeed-linux-dtoverlays/issues/14

Eventually, I'll need scd30 as well. Anyway, this tells me that my out-of-tree build process wasn't the problem. The Balena guys did eventually build this tree. https://forums.balena.io/t/install-linux-headers-for-kernel-module-development/2590/28

jadonk commented 3 years ago

For the HM3301 driver.... https://github.com/Seeed-Studio/seeed-linux-dtoverlays/issues/14

jadonk commented 3 years ago

Driver patches at https://github.com/jadonk/beagleconnect/tree/master/sw/linux have been updated quite a bit.