diff options
author | Cristina Moraru <cristina.moraru09@gmail.com> | 2016-02-15 00:37:39 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-24 20:40:39 +0000 |
commit | 7247645f686584552ec0f8ade7267bf7a4907624 (patch) | |
tree | ea9105eab9e0c8562637656dabcd03e8fa26bb38 | |
parent | 7b7a1c38d1d2e91cf68f3cfd4e0ac3cfa0936c4e (diff) |
iio: hmc5843: Move hmc5843 out of staging
This patch moves hmc5843 driver from staging/iio/magnetometer
to iio/magnetometer, updates the corresponding Makefiles and
moves the hmc5843* entries to the 'Industrial I/O support ->
Magnetometer sensors' menu.
Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Cc: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/magnetometer/Kconfig | 33 | ||||
-rw-r--r-- | drivers/iio/magnetometer/Makefile | 4 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hmc5843.h (renamed from drivers/staging/iio/magnetometer/hmc5843.h) | 0 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hmc5843_core.c (renamed from drivers/staging/iio/magnetometer/hmc5843_core.c) | 7 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hmc5843_i2c.c (renamed from drivers/staging/iio/magnetometer/hmc5843_i2c.c) | 0 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hmc5843_spi.c (renamed from drivers/staging/iio/magnetometer/hmc5843_spi.c) | 0 | ||||
-rw-r--r-- | drivers/staging/iio/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/iio/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/iio/magnetometer/Kconfig | 40 | ||||
-rw-r--r-- | drivers/staging/iio/magnetometer/Makefile | 7 |
10 files changed, 40 insertions, 53 deletions
diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig index 868abada3409..021dc5361f53 100644 --- a/drivers/iio/magnetometer/Kconfig +++ b/drivers/iio/magnetometer/Kconfig @@ -105,4 +105,37 @@ config IIO_ST_MAGN_SPI_3AXIS depends on IIO_ST_MAGN_3AXIS depends on IIO_ST_SENSORS_SPI +config SENSORS_HMC5843 + tristate + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + +config SENSORS_HMC5843_I2C + tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer (I2C)" + depends on I2C + select SENSORS_HMC5843 + select REGMAP_I2C + help + Say Y here to add support for the Honeywell HMC5843, HMC5883 and + HMC5883L 3-Axis Magnetometer (digital compass). + + This driver can also be compiled as a set of modules. + If so, these modules will be created: + - hmc5843_core (core functions) + - hmc5843_i2c (support for HMC5843, HMC5883, HMC5883L and HMC5983) + +config SENSORS_HMC5843_SPI + tristate "Honeywell HMC5983 3-Axis Magnetometer (SPI)" + depends on SPI_MASTER + select SENSORS_HMC5843 + select REGMAP_SPI + help + Say Y here to add support for the Honeywell HMC5983 3-Axis Magnetometer + (digital compass). + + This driver can also be compiled as a set of modules. + If so, these modules will be created: + - hmc5843_core (core functions) + - hmc5843_spi (support for HMC5983) + endmenu diff --git a/drivers/iio/magnetometer/Makefile b/drivers/iio/magnetometer/Makefile index 2c72df458ec2..dd03fe524481 100644 --- a/drivers/iio/magnetometer/Makefile +++ b/drivers/iio/magnetometer/Makefile @@ -15,3 +15,7 @@ st_magn-$(CONFIG_IIO_BUFFER) += st_magn_buffer.o obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o + +obj-$(CONFIG_SENSORS_HMC5843) += hmc5843_core.o +obj-$(CONFIG_SENSORS_HMC5843_I2C) += hmc5843_i2c.o +obj-$(CONFIG_SENSORS_HMC5843_SPI) += hmc5843_spi.o diff --git a/drivers/staging/iio/magnetometer/hmc5843.h b/drivers/iio/magnetometer/hmc5843.h index 76a5d7484d8d..76a5d7484d8d 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.h +++ b/drivers/iio/magnetometer/hmc5843.h diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c index ebc22b19c60d..77882b466e0f 100644 --- a/drivers/staging/iio/magnetometer/hmc5843_core.c +++ b/drivers/iio/magnetometer/hmc5843_core.c @@ -18,7 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * */ #include <linux/module.h> @@ -595,9 +594,9 @@ static int hmc5843_init(struct hmc5843_data *data) static const struct iio_info hmc5843_info = { .attrs = &hmc5843_group, - .read_raw = hmc5843_read_raw, - .write_raw = hmc5843_write_raw, - .write_raw_get_fmt = hmc5843_write_raw_get_fmt, + .read_raw = &hmc5843_read_raw, + .write_raw = &hmc5843_write_raw, + .write_raw_get_fmt = &hmc5843_write_raw_get_fmt, .driver_module = THIS_MODULE, }; diff --git a/drivers/staging/iio/magnetometer/hmc5843_i2c.c b/drivers/iio/magnetometer/hmc5843_i2c.c index 3de7f4426ac4..3de7f4426ac4 100644 --- a/drivers/staging/iio/magnetometer/hmc5843_i2c.c +++ b/drivers/iio/magnetometer/hmc5843_i2c.c diff --git a/drivers/staging/iio/magnetometer/hmc5843_spi.c b/drivers/iio/magnetometer/hmc5843_spi.c index 535f03a70d63..535f03a70d63 100644 --- a/drivers/staging/iio/magnetometer/hmc5843_spi.c +++ b/drivers/iio/magnetometer/hmc5843_spi.c diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig index 0e044cb0def8..8abc1ab3c0c7 100644 --- a/drivers/staging/iio/Kconfig +++ b/drivers/staging/iio/Kconfig @@ -12,7 +12,6 @@ source "drivers/staging/iio/frequency/Kconfig" source "drivers/staging/iio/gyro/Kconfig" source "drivers/staging/iio/impedance-analyzer/Kconfig" source "drivers/staging/iio/light/Kconfig" -source "drivers/staging/iio/magnetometer/Kconfig" source "drivers/staging/iio/meter/Kconfig" source "drivers/staging/iio/resolver/Kconfig" source "drivers/staging/iio/trigger/Kconfig" diff --git a/drivers/staging/iio/Makefile b/drivers/staging/iio/Makefile index 3e616b4437f5..0cfd05d5bf49 100644 --- a/drivers/staging/iio/Makefile +++ b/drivers/staging/iio/Makefile @@ -10,7 +10,6 @@ obj-y += frequency/ obj-y += gyro/ obj-y += impedance-analyzer/ obj-y += light/ -obj-y += magnetometer/ obj-y += meter/ obj-y += resolver/ obj-y += trigger/ diff --git a/drivers/staging/iio/magnetometer/Kconfig b/drivers/staging/iio/magnetometer/Kconfig deleted file mode 100644 index dec814a7a073..000000000000 --- a/drivers/staging/iio/magnetometer/Kconfig +++ /dev/null @@ -1,40 +0,0 @@ -# -# Magnetometer sensors -# -menu "Magnetometer sensors" - -config SENSORS_HMC5843 - tristate - select IIO_BUFFER - select IIO_TRIGGERED_BUFFER - -config SENSORS_HMC5843_I2C - tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer (I2C)" - depends on I2C - select SENSORS_HMC5843 - select REGMAP_I2C - help - Say Y here to add support for the Honeywell HMC5843, HMC5883 and - HMC5883L 3-Axis Magnetometer (digital compass). - - This driver can also be compiled as a set of modules. - If so, these modules will be created: - - hmc5843_core (core functions) - - hmc5843_i2c (support for HMC5843, HMC5883, HMC5883L and HMC5983) - -config SENSORS_HMC5843_SPI - tristate "Honeywell HMC5983 3-Axis Magnetometer (SPI)" - depends on SPI_MASTER - select SENSORS_HMC5843 - select REGMAP_SPI - help - Say Y here to add support for the Honeywell HMC5983 3-Axis Magnetometer - (digital compass). - - This driver can also be compiled as a set of modules. - If so, these modules will be created: - - hmc5843_core (core functions) - - hmc5843_spi (support for HMC5983) - - -endmenu diff --git a/drivers/staging/iio/magnetometer/Makefile b/drivers/staging/iio/magnetometer/Makefile deleted file mode 100644 index 33761a19a956..000000000000 --- a/drivers/staging/iio/magnetometer/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# Makefile for industrial I/O Magnetometer sensors -# - -obj-$(CONFIG_SENSORS_HMC5843) += hmc5843_core.o -obj-$(CONFIG_SENSORS_HMC5843_I2C) += hmc5843_i2c.o -obj-$(CONFIG_SENSORS_HMC5843_SPI) += hmc5843_spi.o |