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>
diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
index 868abad..021dc53 100644
--- a/drivers/iio/magnetometer/Kconfig
+++ b/drivers/iio/magnetometer/Kconfig
@@ -105,4 +105,37 @@
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 2c72df4..dd03fe5 100644
--- a/drivers/iio/magnetometer/Makefile
+++ b/drivers/iio/magnetometer/Makefile
@@ -15,3 +15,7 @@
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
similarity index 100%
rename from drivers/staging/iio/magnetometer/hmc5843.h
rename to drivers/iio/magnetometer/hmc5843.h
diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c
similarity index 99%
rename from drivers/staging/iio/magnetometer/hmc5843_core.c
rename to drivers/iio/magnetometer/hmc5843_core.c
index ebc22b1..77882b4 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 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
similarity index 100%
rename from drivers/staging/iio/magnetometer/hmc5843_i2c.c
rename to drivers/iio/magnetometer/hmc5843_i2c.c
diff --git a/drivers/staging/iio/magnetometer/hmc5843_spi.c b/drivers/iio/magnetometer/hmc5843_spi.c
similarity index 100%
rename from drivers/staging/iio/magnetometer/hmc5843_spi.c
rename to drivers/iio/magnetometer/hmc5843_spi.c
diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig
index 0e044cb..8abc1ab 100644
--- a/drivers/staging/iio/Kconfig
+++ b/drivers/staging/iio/Kconfig
@@ -12,7 +12,6 @@
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 3e616b4..0cfd05d 100644
--- a/drivers/staging/iio/Makefile
+++ b/drivers/staging/iio/Makefile
@@ -10,7 +10,6 @@
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 dec814a..0000000
--- 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 33761a1..0000000
--- 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