Release 4.11 drivers/iio/pressure/bmp280-regmap.c
#include <linux/device.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include "bmp280.h"
static bool bmp180_is_writeable_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case BMP280_REG_CTRL_MEAS:
case BMP280_REG_RESET:
return true;
default:
return false;
};
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Walleij | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
static bool bmp180_is_volatile_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case BMP180_REG_OUT_XLSB:
case BMP180_REG_OUT_LSB:
case BMP180_REG_OUT_MSB:
case BMP280_REG_CTRL_MEAS:
return true;
default:
return false;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Walleij | 40 | 100.00% | 1 | 100.00% |
Total | 40 | 100.00% | 1 | 100.00% |
const struct regmap_config bmp180_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = BMP180_REG_OUT_XLSB,
.cache_type = REGCACHE_RBTREE,
.writeable_reg = bmp180_is_writeable_reg,
.volatile_reg = bmp180_is_volatile_reg,
};
EXPORT_SYMBOL(bmp180_regmap_config);
static bool bmp280_is_writeable_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case BMP280_REG_CONFIG:
case BMP280_REG_CTRL_HUMIDITY:
case BMP280_REG_CTRL_MEAS:
case BMP280_REG_RESET:
return true;
default:
return false;
};
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Walleij | 41 | 100.00% | 1 | 100.00% |
Total | 41 | 100.00% | 1 | 100.00% |
static bool bmp280_is_volatile_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case BMP280_REG_HUMIDITY_LSB:
case BMP280_REG_HUMIDITY_MSB:
case BMP280_REG_TEMP_XLSB:
case BMP280_REG_TEMP_LSB:
case BMP280_REG_TEMP_MSB:
case BMP280_REG_PRESS_XLSB:
case BMP280_REG_PRESS_LSB:
case BMP280_REG_PRESS_MSB:
case BMP280_REG_STATUS:
return true;
default:
return false;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Walleij | 55 | 100.00% | 1 | 100.00% |
Total | 55 | 100.00% | 1 | 100.00% |
const struct regmap_config bmp280_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = BMP280_REG_HUMIDITY_LSB,
.cache_type = REGCACHE_RBTREE,
.writeable_reg = bmp280_is_writeable_reg,
.volatile_reg = bmp280_is_volatile_reg,
};
EXPORT_SYMBOL(bmp280_regmap_config);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Walleij | 267 | 100.00% | 2 | 100.00% |
Total | 267 | 100.00% | 2 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.