Hi,

comments inline

On 29/06/2014 10:13, Sergey Korolew wrote:
> Hello !
> 
> Bosch Sensortec is one of most popular pressure sensors for
> building home weather stations, its cheap and easy to use. I
> decided to add two packages for each bus type because device
> usually have only one barometer and we does no need to waste
> firmware space for unused bus. Tested on trunk, ar71xx (ML2030)
> with kernel 3.10, i2c only (due absent of spi version), but I added
> patch files for all current kernels.
> 
> =============================================================== ---
> a/target/linux/generic/patches-3.6/263-bmp085_dynamic.patch
> 1970-01-01 04:00:00.000000000 +0400 +++
> b/target/linux/generic/patches-3.6/263-bmp085_dynamic.patch
> 2014-06-08 14:42:38.000000000 +0400 @@ -0,0 +1,11 @@ +---
> a/drivers/misc/Kconfig        2014-04-03 23:01:22.000000000 +0400 ++++
> b/drivers/misc/Kconfig        2014-06-08 14:40:09.129048438 +0400 +@@
> -453,7 +453,7 @@ +      still useful. + + config BMP085 +-    bool ++
> tristate "BMP085 digital pressure sensor generic support" +
> depends on SYSFS +

i just had a look at the kernel Kconfig and it seems weird that the
actual driver is bool while the busses are tristate. i would like to
not carry your patches in trunk for future releases, so could please
send this upstream aswell ?

........



> --- a/package/kernel/linux/modules/other.mk   2014-05-30
> 13:53:34.000000000 +0400 +++
> b/package/kernel/linux/modules/other.mk       2014-06-08
> 16:47:48.315028290 +0400 @@ -698,6 +698,43 @@
> 
> $(eval $(call KernelPackage,regmap))
> 
> +define KernelPackage/bmp085-i2c +  SUBMENU:=$(OTHER_MENU) +
> TITLE:=BMP085 digital pressure sensor on I2C +
> KCONFIG:=CONFIG_BMP085_I2C \ +           CONFIG_BMP085 +
> DEPENDS:=+kmod-regmap +  FILES:= \ +
> $(LINUX_DIR)/drivers/misc/bmp085-i2c.ko \ +
> $(LINUX_DIR)/drivers/misc/bmp085.ko +  AUTOLOAD:=$(call
> AutoLoad,55,bmp085 bmp085-i2c) +endef

please make bmp085.ko an extra package. it does not need the AUTOLOAD
line. and for the i2c and spi package use AutoProbe instead of
AutoLoad, that will tell kmodloader to figure out itself, that
bmp085.ko needs to be loaded.

        John

> + +define KernelPackage/bmp085-i2c/description + Kernel module for
> BOSCH Sensortec pressure sensor on I2C +endef + +$(eval $(call
> KernelPackage,bmp085-i2c)) + +define KernelPackage/bmp085-spi +
> SUBMENU:=$(OTHER_MENU) +  TITLE:=BMP085 digital pressure sensor on
> SPI +  KCONFIG:=CONFIG_BMP085_SPI \ +    CONFIG_BMP085 +
> DEPENDS:=+kmod-regmap +  FILES:= \ +
> $(LINUX_DIR)/drivers/misc/bmp085-spi.ko \ +
> $(LINUX_DIR)/drivers/misc/bmp085.ko +  AUTOLOAD:=$(call
> AutoLoad,55,bmp085 bmp085-spi) +endef + +define
> KernelPackage/bmp085-spi/description + Kernel module for BOSCH
> Sensortec pressure sensor on SPI +endef + +$(eval $(call
> KernelPackage,bmp085-spi)) + + define KernelPackage/ikconfig 
> SUBMENU:=$(OTHER_MENU) TITLE:=Kernel configuration via
> /proc/config.gz 
> ===============================================================
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to