linux/drivers/iio/pressure/hp03.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016 Marek Vasut <[email protected]>
 *
 * Driver for Hope RF HP03 digital temperature and pressure sensor.
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

/*
 * The HP03 sensor occupies two fixed I2C addresses:
 *  0x50 ... read-only EEPROM with calibration data
 *  0x77 ... read-write ADC for pressure and temperature
 */
#define HP03_EEPROM_ADDR
#define HP03_ADC_ADDR

#define HP03_EEPROM_CX_OFFSET
#define HP03_EEPROM_AB_OFFSET
#define HP03_EEPROM_CD_OFFSET

#define HP03_ADC_WRITE_REG
#define HP03_ADC_READ_REG
#define HP03_ADC_READ_PRESSURE
#define HP03_ADC_READ_TEMP

struct hp03_priv {};

static const struct iio_chan_spec hp03_channels[] =;

static bool hp03_is_writeable_reg(struct device *dev, unsigned int reg)
{}

static bool hp03_is_volatile_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_config hp03_regmap_config =;

static int hp03_get_temp_pressure(struct hp03_priv *priv, const u8 reg)
{}

static int hp03_update_temp_pressure(struct hp03_priv *priv)
{}

static int hp03_read_raw(struct iio_dev *indio_dev,
			 struct iio_chan_spec const *chan,
			 int *val, int *val2, long mask)
{}

static const struct iio_info hp03_info =;

static int hp03_probe(struct i2c_client *client)
{}

static const struct i2c_device_id hp03_id[] =;
MODULE_DEVICE_TABLE(i2c, hp03_id);

static const struct of_device_id hp03_of_match[] =;
MODULE_DEVICE_TABLE(of, hp03_of_match);

static struct i2c_driver hp03_driver =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();