Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Cristina Moraru and committed by
Jonathan Cameron
7247645f 7b7a1c38

+40 -53
+33
drivers/iio/magnetometer/Kconfig
··· 105 105 depends on IIO_ST_MAGN_3AXIS 106 106 depends on IIO_ST_SENSORS_SPI 107 107 108 + config SENSORS_HMC5843 109 + tristate 110 + select IIO_BUFFER 111 + select IIO_TRIGGERED_BUFFER 112 + 113 + config SENSORS_HMC5843_I2C 114 + tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer (I2C)" 115 + depends on I2C 116 + select SENSORS_HMC5843 117 + select REGMAP_I2C 118 + help 119 + Say Y here to add support for the Honeywell HMC5843, HMC5883 and 120 + HMC5883L 3-Axis Magnetometer (digital compass). 121 + 122 + This driver can also be compiled as a set of modules. 123 + If so, these modules will be created: 124 + - hmc5843_core (core functions) 125 + - hmc5843_i2c (support for HMC5843, HMC5883, HMC5883L and HMC5983) 126 + 127 + config SENSORS_HMC5843_SPI 128 + tristate "Honeywell HMC5983 3-Axis Magnetometer (SPI)" 129 + depends on SPI_MASTER 130 + select SENSORS_HMC5843 131 + select REGMAP_SPI 132 + help 133 + Say Y here to add support for the Honeywell HMC5983 3-Axis Magnetometer 134 + (digital compass). 135 + 136 + This driver can also be compiled as a set of modules. 137 + If so, these modules will be created: 138 + - hmc5843_core (core functions) 139 + - hmc5843_spi (support for HMC5983) 140 + 108 141 endmenu
+4
drivers/iio/magnetometer/Makefile
··· 15 15 16 16 obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o 17 17 obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o 18 + 19 + obj-$(CONFIG_SENSORS_HMC5843) += hmc5843_core.o 20 + obj-$(CONFIG_SENSORS_HMC5843_I2C) += hmc5843_i2c.o 21 + obj-$(CONFIG_SENSORS_HMC5843_SPI) += hmc5843_spi.o
-1
drivers/staging/iio/Kconfig
··· 12 12 source "drivers/staging/iio/gyro/Kconfig" 13 13 source "drivers/staging/iio/impedance-analyzer/Kconfig" 14 14 source "drivers/staging/iio/light/Kconfig" 15 - source "drivers/staging/iio/magnetometer/Kconfig" 16 15 source "drivers/staging/iio/meter/Kconfig" 17 16 source "drivers/staging/iio/resolver/Kconfig" 18 17 source "drivers/staging/iio/trigger/Kconfig"
-1
drivers/staging/iio/Makefile
··· 10 10 obj-y += gyro/ 11 11 obj-y += impedance-analyzer/ 12 12 obj-y += light/ 13 - obj-y += magnetometer/ 14 13 obj-y += meter/ 15 14 obj-y += resolver/ 16 15 obj-y += trigger/
-40
drivers/staging/iio/magnetometer/Kconfig
··· 1 - # 2 - # Magnetometer sensors 3 - # 4 - menu "Magnetometer sensors" 5 - 6 - config SENSORS_HMC5843 7 - tristate 8 - select IIO_BUFFER 9 - select IIO_TRIGGERED_BUFFER 10 - 11 - config SENSORS_HMC5843_I2C 12 - tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer (I2C)" 13 - depends on I2C 14 - select SENSORS_HMC5843 15 - select REGMAP_I2C 16 - help 17 - Say Y here to add support for the Honeywell HMC5843, HMC5883 and 18 - HMC5883L 3-Axis Magnetometer (digital compass). 19 - 20 - This driver can also be compiled as a set of modules. 21 - If so, these modules will be created: 22 - - hmc5843_core (core functions) 23 - - hmc5843_i2c (support for HMC5843, HMC5883, HMC5883L and HMC5983) 24 - 25 - config SENSORS_HMC5843_SPI 26 - tristate "Honeywell HMC5983 3-Axis Magnetometer (SPI)" 27 - depends on SPI_MASTER 28 - select SENSORS_HMC5843 29 - select REGMAP_SPI 30 - help 31 - Say Y here to add support for the Honeywell HMC5983 3-Axis Magnetometer 32 - (digital compass). 33 - 34 - This driver can also be compiled as a set of modules. 35 - If so, these modules will be created: 36 - - hmc5843_core (core functions) 37 - - hmc5843_spi (support for HMC5983) 38 - 39 - 40 - endmenu
-7
drivers/staging/iio/magnetometer/Makefile
··· 1 - # 2 - # Makefile for industrial I/O Magnetometer sensors 3 - # 4 - 5 - obj-$(CONFIG_SENSORS_HMC5843) += hmc5843_core.o 6 - obj-$(CONFIG_SENSORS_HMC5843_I2C) += hmc5843_i2c.o 7 - obj-$(CONFIG_SENSORS_HMC5843_SPI) += hmc5843_spi.o
drivers/staging/iio/magnetometer/hmc5843.h drivers/iio/magnetometer/hmc5843.h
+3 -4
drivers/staging/iio/magnetometer/hmc5843_core.c drivers/iio/magnetometer/hmc5843_core.c
··· 18 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 20 * GNU General Public License for more details. 21 - * 22 21 */ 23 22 24 23 #include <linux/module.h> ··· 594 595 595 596 static const struct iio_info hmc5843_info = { 596 597 .attrs = &hmc5843_group, 597 - .read_raw = hmc5843_read_raw, 598 - .write_raw = hmc5843_write_raw, 599 - .write_raw_get_fmt = hmc5843_write_raw_get_fmt, 598 + .read_raw = &hmc5843_read_raw, 599 + .write_raw = &hmc5843_write_raw, 600 + .write_raw_get_fmt = &hmc5843_write_raw_get_fmt, 600 601 .driver_module = THIS_MODULE, 601 602 }; 602 603
drivers/staging/iio/magnetometer/hmc5843_i2c.c drivers/iio/magnetometer/hmc5843_i2c.c
drivers/staging/iio/magnetometer/hmc5843_spi.c drivers/iio/magnetometer/hmc5843_spi.c