iio: pressure: bmp280: split off an I2C Kconfig entry
This creates a separate BMP280_I2C Kconfig entry that gets selected
by BMP280 for I2C transport. As we currently only support I2C
transport there is not much practical change other than getting
a separate object file (or module) for the I2C driver part. The
old Kconfig symbol BMP280 will still select the stuff we need so
that oldconfig and old defconfigs works fine.
Tested-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c
index 83b96fe..f1b5f8c 100644
--- a/drivers/iio/pressure/bmp280-core.c
+++ b/drivers/iio/pressure/bmp280-core.c
@@ -16,6 +16,7 @@
#define pr_fmt(fmt) "bmp280: " fmt
#include <linux/device.h>
+#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/delay.h>
#include <linux/iio/iio.h>
@@ -955,6 +956,7 @@
regulator_disable(data->vddd);
return ret;
}
+EXPORT_SYMBOL(bmp280_common_probe);
int bmp280_common_remove(struct device *dev)
{
@@ -966,3 +968,8 @@
regulator_disable(data->vddd);
return 0;
}
+EXPORT_SYMBOL(bmp280_common_remove);
+
+MODULE_AUTHOR("Vlad Dogaru <vlad.dogaru@intel.com>");
+MODULE_DESCRIPTION("Driver for Bosch Sensortec BMP180/BMP280 pressure and temperature sensor");
+MODULE_LICENSE("GPL v2");