Skip to content

Commit

Permalink
staging:iio: Move adis library out of staging
Browse files Browse the repository at this point in the history
Now that the adis library no longer depends on the sw_ring buffer implementation
we can move it out of staging.

While we are at it also sort the entries in the iio Kconfig and Makefile to be
in alphabetical order.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Nov 19, 2012
1 parent aacff89 commit ec04cb0
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 36 deletions.
7 changes: 4 additions & 3 deletions drivers/iio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ config IIO_CONSUMERS_PER_TRIGGER
source "drivers/iio/accel/Kconfig"
source "drivers/iio/adc/Kconfig"
source "drivers/iio/amplifiers/Kconfig"
source "drivers/iio/light/Kconfig"
source "drivers/iio/frequency/Kconfig"
source "drivers/iio/dac/Kconfig"
source "drivers/iio/common/Kconfig"
source "drivers/iio/dac/Kconfig"
source "drivers/iio/frequency/Kconfig"
source "drivers/iio/gyro/Kconfig"
source "drivers/iio/imu/Kconfig"
source "drivers/iio/light/Kconfig"
source "drivers/iio/magnetometer/Kconfig"

endif # IIO
7 changes: 4 additions & 3 deletions drivers/iio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ obj-$(CONFIG_IIO_KFIFO_BUF) += kfifo_buf.o
obj-y += accel/
obj-y += adc/
obj-y += amplifiers/
obj-y += light/
obj-y += frequency/
obj-y += dac/
obj-y += common/
obj-y += dac/
obj-y += gyro/
obj-y += frequency/
obj-y += imu/
obj-y += light/
obj-y += magnetometer/
11 changes: 11 additions & 0 deletions drivers/iio/imu/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config IIO_ADIS_LIB
tristate
help
A set of IO helper functions for the Analog Devices ADIS* device family.

config IIO_ADIS_LIB_BUFFER
bool
select IIO_TRIGGERED_BUFFER
help
A set of buffer helper functions for the Analog Devices ADIS* device
family.
8 changes: 8 additions & 0 deletions drivers/iio/imu/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Makefile for Inertial Measurement Units
#

adis_lib-y += adis.o
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_trigger.o
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o
3 changes: 1 addition & 2 deletions drivers/staging/iio/imu/adis.c → drivers/iio/imu/adis.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>

#include "adis.h"
#include <linux/iio/imu/adis.h>

#define ADIS_MSC_CTRL_DATA_RDY_EN BIT(2)
#define ADIS_MSC_CTRL_DATA_RDY_POL_HIGH BIT(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>

#include "adis.h"
#include <linux/iio/imu/adis.h>

int adis_update_scan_mode(struct iio_dev *indio_dev,
const unsigned long *scan_mask)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

#include <linux/iio/iio.h>
#include <linux/iio/trigger.h>

#include "adis.h"
#include <linux/iio/imu/adis.h>

static int adis_data_rdy_trigger_set_state(struct iio_trigger *trig,
bool state)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/adis16201_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/imu/adis.h>

#include "adis16201.h"
#include "../imu/adis.h"

static const u8 adis16201_addresses[] = {
[ADIS16201_SCAN_ACC_X] = ADIS16201_XACCL_OFFS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/adis16203_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/imu/adis.h>

#include "adis16203.h"
#include "../imu/adis.h"

#define DRIVER_NAME "adis16203"

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/adis16204_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/imu/adis.h>

#include "adis16204.h"
#include "../imu/adis.h"

/* Unique to this driver currently */

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/adis16209_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/imu/adis.h>

#include "adis16209.h"
#include "../imu/adis.h"

static const u8 adis16209_addresses[8][1] = {
[ADIS16209_SCAN_SUPPLY] = { },
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/adis16220.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SPI_ADIS16220_H_
#define SPI_ADIS16220_H_

#include "../imu/adis.h"
#include <linux/iio/imu/adis.h>

#define ADIS16220_STARTUP_DELAY 220 /* ms */

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/adis16240_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/imu/adis.h>

#include "adis16240.h"
#include "../imu/adis.h"

static ssize_t adis16240_spi_read_signed(struct device *dev,
struct device_attribute *attr,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/gyro/adis16260.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define SPI_ADIS16260_H_

#include "adis16260_platform_data.h"
#include "../imu/adis.h"
#include <linux/iio/imu/adis.h>

#define ADIS16260_STARTUP_DELAY 220 /* ms */

Expand Down
12 changes: 0 additions & 12 deletions drivers/staging/iio/imu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,3 @@ config ADIS16400
(adis16400 series also have magnetometers).

endmenu

config IIO_ADIS_LIB
tristate
help
A set of IO helper functions for the Analog Devices ADIS* device family.

config IIO_ADIS_LIB_BUFFER
bool
select IIO_TRIGGERED_BUFFER
help
A set of buffer helper functions for the Analog Devices ADIS* device
family.
5 changes: 0 additions & 5 deletions drivers/staging/iio/imu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,3 @@
adis16400-y := adis16400_core.o
adis16400-$(CONFIG_IIO_BUFFER) += adis16400_ring.o adis16400_trigger.o
obj-$(CONFIG_ADIS16400) += adis16400.o

adis_lib-y += adis.o
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_trigger.o
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o
File renamed without changes.

0 comments on commit ec04cb0

Please sign in to comment.