From c984b9cbbd17d3eb602de3802e25d975182474fa Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Sat, 16 Jan 2016 01:00:03 +0900 Subject: iio: pressure: mpl115: support MPL115A1 mpl115 driver currently supports i2c interface (MPL115A2). There is also SPI version (MPL115A1). The difference between them is only physical transport so we can easily support both while sharing most of the code. Split the driver into a core support module and one module each for I2C and SPI support. Signed-off-by: Akinobu Mita Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron --- drivers/iio/pressure/mpl115.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 drivers/iio/pressure/mpl115.h (limited to 'drivers/iio/pressure/mpl115.h') diff --git a/drivers/iio/pressure/mpl115.h b/drivers/iio/pressure/mpl115.h new file mode 100644 index 000000000000..01b652774dc3 --- /dev/null +++ b/drivers/iio/pressure/mpl115.h @@ -0,0 +1,24 @@ +/* + * Freescale MPL115A pressure/temperature sensor + * + * Copyright (c) 2014 Peter Meerwald + * Copyright (c) 2016 Akinobu Mita + * + * This file is subject to the terms and conditions of version 2 of + * the GNU General Public License. See the file COPYING in the main + * directory of this archive for more details. + */ + +#ifndef _MPL115_H_ +#define _MPL115_H_ + +struct mpl115_ops { + int (*init)(struct device *); + int (*read)(struct device *, u8); + int (*write)(struct device *, u8, u8); +}; + +int mpl115_probe(struct device *dev, const char *name, + const struct mpl115_ops *ops); + +#endif -- cgit v1.2.3