diff options
author | Song Qiang <songqiang1304521@gmail.com> | 2018-11-08 17:27:49 +0800 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-11-16 18:32:31 +0000 |
commit | 121354b2eceb2669ebdffa76b105ad6c03413966 (patch) | |
tree | 7db7ed0542f64298ff6d0ee04e543de636f8ba32 /drivers/iio/magnetometer/rm3100.h | |
parent | 9a8d64fa97206eb68ec741b5c52436f32286b7fd (diff) |
iio: magnetometer: Add driver support for PNI RM3100
PNI RM3100 is a high resolution, large signal immunity magnetometer,
composed of 3 single sensors and a processing chip with a MagI2C
interface.
Following functions are available:
- Single-shot measurement from
/sys/bus/iio/devices/iio:deviceX/in_magn_{axis}_raw
- Triggerd buffer measurement.
- DRDY pin for data ready trigger.
- Both i2c and spi interface are supported.
- Both interrupt and polling measurement is supported, depends on if
the 'interrupts' in DT is declared.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer/rm3100.h')
-rw-r--r-- | drivers/iio/magnetometer/rm3100.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/rm3100.h b/drivers/iio/magnetometer/rm3100.h new file mode 100644 index 000000000000..c3508218bc77 --- /dev/null +++ b/drivers/iio/magnetometer/rm3100.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 Song Qiang <songqiang1304521@gmail.com> + */ + +#ifndef RM3100_CORE_H +#define RM3100_CORE_H + +#include <linux/regmap.h> + +extern const struct regmap_access_table rm3100_readable_table; +extern const struct regmap_access_table rm3100_writable_table; +extern const struct regmap_access_table rm3100_volatile_table; + +int rm3100_common_probe(struct device *dev, struct regmap *regmap, int irq); + +#endif /* RM3100_CORE_H */ |