Skip to content

zeoio/ms5611-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MS5611-01BA03 Barometric Pressure Sensor Driver

MS5611-01BA03 Barometric Pressure Sensor, with statinless steel cap.

Building the source

  1. Clone driver code
git clone https://github.com/Sarlor/ms5611-driver.git
cd ms5611-driver/src
  1. Edit Makefile file, set the correct kernel directory 'KERN_DIR'
vim Makefile
  1. Copy the driver files to the 'hwmon' directory
make cp
  1. Add board-level support code to the appropriate place
vim arch/arm/plat-s5p4418/realarm/device.c
#if defined(CONFIG_SENSORS_MS561101BA) || defined(CONFIG_SENSORS_MS561101BA_MODULE)
#include <linux/i2c.h>

/* CODEC */
static struct i2c_board_info __initdata ms561101ba_i2c_bdi = {
	.type   = "ms561101ba",
	.addr   = 0x77
};
#endif

#if defined(CONFIG_SENSORS_MS561101BA) || defined(CONFIG_SENSORS_MS561101BA_MODULE)
	printk("plat: add pressure MS5611-01BA03\n");
	i2c_register_board_info(1, &ms561101ba_i2c_bdi, 1);
#endif
  1. Modify the kernel configuration file for ms5611, and add the code to the appropriate place
vim drivers/hwmon/Kconfig
config SENSORS_MS561101BA
	tristate "MS5611-01BA03 Barometric Pressure Sensor"
        depends on I2C
        default n
        help
		Say Y here to enable the pressure sensor.

                If unsure, say N.
  1. Edit Makefile for add ms5611 driver module
vim drivers/hwmon/Makefile
obj-$(CONFIG_SENSORS_MS561101BA)        += ms561101ba.o
  1. Configure the kernel for required submodule, then save config
make menuconfig
Device Drivers -> Hardware Monitoring support -> MS5611-01BA03 Barometric Pressure Sensor

About

MS5611-01BA03 Barometric Pressure Sensor Driver

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published