sgp30: New kernel module package
PATCH v2 1/1 sgp30: New kernel module package
From: David De Grave <[email protected]>
Kernel module for the Sensirion sgp30 / sgpc2 chemical sensors.
[yann.morin.1998 at free.fr:
- fix coding style after check-package
- enable required linux options
]
---
Changes v1 -> v2 (Yann):
- fix coding style with check-package
- enable the required linux options
--- linux/linux.mk | 3 +++ package/Config.in | 1 + package/sgp30/Config.in | 13 +++++++++++++ package/sgp30/sgp30.hash | 1 + package/sgp30/sgp30.mk | 18 ++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 package/sgp30/Config.in create mode 100644 package/sgp30/sgp30.hash create mode 100644 package/sgp30/sgp30.mk
linux/linux.mk +3 -0
@@ -385,6 +385,9 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) $(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config)) + $(if $(BR2_PACKAGE_SGP30), + $(call KCONFIG_ENABLE_OPT,CONFIG_CRC8,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_IIO,$(@D)/.config)) $(if $(LINUX_KERNEL_CUSTOM_LOGO_PATH), $(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO,$(@D)/.config)
package/Config.in +1 -0
@@ -518,6 +518,7 @@ endmenu source "package/sedutil/Config.in" source "package/setserial/Config.in" source "package/sg3_utils/Config.in" + source "package/sgp30/Config.in" source "package/sigrok-cli/Config.in" source "package/sispmctl/Config.in" source "package/smartmontools/Config.in"
package/sgp30/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_SGP30 + bool "sgp30" + depends on BR2_LINUX_KERNEL + help + I2C interface support for the following + Sensirion SGP multi-pixel gas sensors: + * SGP30 gas sensor + * SGPC3 low power gas sensor + + This module will be called sgp30. + +comment "sgp30/sgpc3 needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL
package/sgp30/sgp30.hash new file +1 -0
@@ -0,0 +1 @@ +sha256 f8d619046589eee93dbce091be5dc3059a2e37513e50b3c61eada9c3b6fc7c0f Sensirion_Gas_Sensors_SGP30_Linux_Driver.zip
package/sgp30/sgp30.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# sgp30 +# +################################################################################ + +SGP30_SOURCE = Sensirion_Gas_Sensors_SGP30_Linux_Driver.zip +SGP30_SITE = https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/13_Sample_Codes_Software/Gas_Sensors +SGP30_LICENSE = GPL-2.0+ +SGP30_LICENSE_FILE = LICENSE +SGP30_MODULE_SUBDIRS = sgp30 + +define SGP30_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(SGP30_DL_DIR)/$(SGP30_SOURCE) +endef + +$(eval $(kernel-module)) +$(eval $(generic-package))
Signature · 1 line
2.20.1
PATCH v2 1/1 sgp30: New kernel module package
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
From: David De Grave <[email protected]>
Kernel module for the Sensirion sgp30 / sgpc2 chemical sensors.Signed-off-by David De Grave <[email protected]>[yann.morin.1998 at free.fr:
- fix coding style after check-package
- enable required linux options
]Signed-off-by Yann E. MORIN <[email protected]>---
Changes v1 -> v2 (Yann):
- fix coding style with check-package
- enable the required linux options
Quoted 6 lines
--- linux/linux.mk | 3 +++ package/Config.in | 1 + package/sgp30/Config.in | 13 +++++++++++++ package/sgp30/sgp30.hash | 1 + package/sgp30/sgp30.mk | 18 ++++++++++++++++++
A DEVELOPERS entry is missing.
I see the kernel now has a sgp30 driver since 5.1, is there any reason to use this over the mainline driver?
Author: Andreas Brauchli <[email protected]> Date: Thu Dec 13 15:43:23 2018 +0100
iio: chemical: sgp30: Support Sensirion SGP30/SGPC3 sensors
Support Sensirion SGP30 and SGPC3 multi-pixel I2C gas sensors
Supported Features:
* Indoor Air Quality (IAQ) concentrations for
- tVOC (in_concentration_voc_input)
- CO2eq (in_concentration_co2_input) - SGP30 only
IAQ concentrations are periodically read out by a background thread to allow the sensor to maintain its internal baseline.
* Gas concentration signals
- Ethanol (in_concentration_ethanol_raw)
- H2 (in_concentration_h2_raw) - SGP30 only
https://www.sensirion.com/file/datasheet_sgp30
https://www.sensirion.com/file/datasheet_sgpc3
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 sgp30: New kernel module package
Hi Peter,
Not anymore. I sent that patch 8 months ago... In the meantime, it was indeed added so.
Just forget about this patch and keep using the mainline.
Thanks.
Regards,
David.
Quoted 54 lines · Peter Korsgaard
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
From: David De Grave <[email protected]>
Kernel module for the Sensirion sgp30 / sgpc2 chemical sensors.Signed-off-by David De Grave <[email protected]>[yann.morin.1998 at free.fr:
- fix coding style after check-package
- enable required linux options
]Signed-off-by Yann E. MORIN <[email protected]>---
Changes v1 -> v2 (Yann):
- fix coding style with check-package
- enable the required linux optionsQuoted 6 lines
--- linux/linux.mk | 3 +++ package/Config.in | 1 + package/sgp30/Config.in | 13 +++++++++++++ package/sgp30/sgp30.hash | 1 + package/sgp30/sgp30.mk | 18 ++++++++++++++++++A DEVELOPERS entry is missing.
I see the kernel now has a sgp30 driver since 5.1, is there any reason to use this over the mainline driver?
Author: Andreas Brauchli <[email protected]> Date: Thu Dec 13 15:43:23 2018 +0100iio: chemical: sgp30: Support Sensirion SGP30/SGPC3 sensors
Support Sensirion SGP30 and SGPC3 multi-pixel I2C gas sensors
Supported Features:
* Indoor Air Quality (IAQ) concentrations for
- tVOC (in_concentration_voc_input)
- CO2eq (in_concentration_co2_input) - SGP30 onlyIAQ concentrations are periodically read out by a background
thread
to allow the sensor to maintain its internal baseline.* Gas concentration signals
- Ethanol (in_concentration_ethanol_raw)
- H2 (in_concentration_h2_raw) - SGP30 onlyhttps://www.sensirion.com/file/datasheet_sgp30
https://www.sensirion.com/file/datasheet_sgpc3Signed-off-by Andreas Brauchli <[email protected]>Signed-off-by Jonathan Cameron <[email protected]>