* [PATCH 0/2] iio:kxsd9 basic driver move out of staging
@ 2013-01-06 15:10 Jonathan Cameron
2013-01-06 15:10 ` [PATCH 1/2] staging:iio:accel:kxsd9 Jonathan Cameron
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jonathan Cameron @ 2013-01-06 15:10 UTC (permalink / raw)
To: linux-iio; +Cc: Jonathan Cameron
This is a simple driver I wrote as a proof of concept a long
time ago. Whilst it only supports the basics, it might as
well move out of staging as there is nothing particularly
interesting or controversial in it!
The first patch does a bit of trivial cleanup and avoids
a theoretical race condition.
Jonathan Cameron (2):
staging:iio:accel:kxsd9
iio:accel:kxsd9 move out of staging
drivers/iio/accel/Kconfig | 7 +++++++
drivers/iio/accel/Makefile | 1 +
drivers/{staging => }/iio/accel/kxsd9.c | 10 +++++-----
drivers/staging/iio/accel/Kconfig | 7 -------
drivers/staging/iio/accel/Makefile | 2 --
5 files changed, 13 insertions(+), 14 deletions(-)
rename drivers/{staging => }/iio/accel/kxsd9.c (99%)
--
1.8.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] staging:iio:accel:kxsd9
2013-01-06 15:10 [PATCH 0/2] iio:kxsd9 basic driver move out of staging Jonathan Cameron
@ 2013-01-06 15:10 ` Jonathan Cameron
2013-01-06 15:10 ` [PATCH 2/2] iio:accel:kxsd9 move out of staging Jonathan Cameron
2013-01-20 12:06 ` [PATCH 0/2] iio:kxsd9 basic driver " Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2013-01-06 15:10 UTC (permalink / raw)
To: linux-iio; +Cc: Jonathan Cameron
Remove an unneeded initialization and trivial reorder to ensure
the device is ready when the device is registered.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
drivers/staging/iio/accel/kxsd9.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/accel/kxsd9.c b/drivers/staging/iio/accel/kxsd9.c
index 318331f..4a24c2e 100644
--- a/drivers/staging/iio/accel/kxsd9.c
+++ b/drivers/staging/iio/accel/kxsd9.c
@@ -226,7 +226,7 @@ static int kxsd9_probe(struct spi_device *spi)
{
struct iio_dev *indio_dev;
struct kxsd9_state *st;
- int ret = 0;
+ int ret;
indio_dev = iio_device_alloc(sizeof(*st));
if (indio_dev == NULL) {
@@ -245,14 +245,14 @@ static int kxsd9_probe(struct spi_device *spi)
indio_dev->info = &kxsd9_info;
indio_dev->modes = INDIO_DIRECT_MODE;
- ret = iio_device_register(indio_dev);
- if (ret)
- goto error_free_dev;
-
spi->mode = SPI_MODE_0;
spi_setup(spi);
kxsd9_power_up(st);
+ ret = iio_device_register(indio_dev);
+ if (ret)
+ goto error_free_dev;
+
return 0;
error_free_dev:
--
1.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] iio:accel:kxsd9 move out of staging
2013-01-06 15:10 [PATCH 0/2] iio:kxsd9 basic driver move out of staging Jonathan Cameron
2013-01-06 15:10 ` [PATCH 1/2] staging:iio:accel:kxsd9 Jonathan Cameron
@ 2013-01-06 15:10 ` Jonathan Cameron
2013-01-20 12:06 ` [PATCH 0/2] iio:kxsd9 basic driver " Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2013-01-06 15:10 UTC (permalink / raw)
To: linux-iio; +Cc: Jonathan Cameron
This is a very simple driver giving basic access to this part over an
spi bus.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
drivers/iio/accel/Kconfig | 7 +++++++
drivers/iio/accel/Makefile | 1 +
drivers/{staging => }/iio/accel/kxsd9.c | 0
drivers/staging/iio/accel/Kconfig | 7 -------
drivers/staging/iio/accel/Makefile | 2 --
5 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
index fe4bcd7..a588764 100644
--- a/drivers/iio/accel/Kconfig
+++ b/drivers/iio/accel/Kconfig
@@ -13,4 +13,11 @@ config HID_SENSOR_ACCEL_3D
Say yes here to build support for the HID SENSOR
accelerometers 3D.
+config KXSD9
+ tristate "Kionix KXSD9 Accelerometer Driver"
+ depends on SPI
+ help
+ Say yes here to build support for the Kionix KXSD9 accelerometer.
+ Currently this only supports the device via an SPI interface.
+
endmenu
diff --git a/drivers/iio/accel/Makefile b/drivers/iio/accel/Makefile
index 5bc6855..4e1c859 100644
--- a/drivers/iio/accel/Makefile
+++ b/drivers/iio/accel/Makefile
@@ -3,3 +3,4 @@
#
obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o
+obj-$(CONFIG_KXSD9) += kxsd9.o
diff --git a/drivers/staging/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
similarity index 100%
rename from drivers/staging/iio/accel/kxsd9.c
rename to drivers/iio/accel/kxsd9.c
diff --git a/drivers/staging/iio/accel/Kconfig b/drivers/staging/iio/accel/Kconfig
index 2b54430..d10c7ad 100644
--- a/drivers/staging/iio/accel/Kconfig
+++ b/drivers/staging/iio/accel/Kconfig
@@ -56,13 +56,6 @@ config ADIS16240
Say yes here to build support for Analog Devices adis16240 programmable
impact Sensor and recorder.
-config KXSD9
- tristate "Kionix KXSD9 Accelerometer Driver"
- depends on SPI
- help
- Say yes here to build support for the Kionix KXSD9 accelerometer.
- Currently this only supports the device via an SPI interface.
-
config LIS3L02DQ
tristate "ST Microelectronics LIS3L02DQ Accelerometer Driver"
depends on SPI
diff --git a/drivers/staging/iio/accel/Makefile b/drivers/staging/iio/accel/Makefile
index 8e7ee03..1ed137f 100644
--- a/drivers/staging/iio/accel/Makefile
+++ b/drivers/staging/iio/accel/Makefile
@@ -20,8 +20,6 @@ obj-$(CONFIG_ADIS16220) += adis16220.o
adis16240-y := adis16240_core.o
obj-$(CONFIG_ADIS16240) += adis16240.o
-obj-$(CONFIG_KXSD9) += kxsd9.o
-
lis3l02dq-y := lis3l02dq_core.o
lis3l02dq-$(CONFIG_IIO_BUFFER) += lis3l02dq_ring.o
obj-$(CONFIG_LIS3L02DQ) += lis3l02dq.o
--
1.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] iio:kxsd9 basic driver move out of staging
2013-01-06 15:10 [PATCH 0/2] iio:kxsd9 basic driver move out of staging Jonathan Cameron
2013-01-06 15:10 ` [PATCH 1/2] staging:iio:accel:kxsd9 Jonathan Cameron
2013-01-06 15:10 ` [PATCH 2/2] iio:accel:kxsd9 move out of staging Jonathan Cameron
@ 2013-01-20 12:06 ` Jonathan Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2013-01-20 12:06 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio
On 01/06/2013 03:10 PM, Jonathan Cameron wrote:
> This is a simple driver I wrote as a proof of concept a long
> time ago. Whilst it only supports the basics, it might as
> well move out of staging as there is nothing particularly
> interesting or controversial in it!
>
> The first patch does a bit of trivial cleanup and avoids
> a theoretical race condition.
>
These have sat on the list on enough. I guess everyone
who cares is happy ;)
Added to togreg branch of iio.git
> Jonathan Cameron (2):
> staging:iio:accel:kxsd9
> iio:accel:kxsd9 move out of staging
>
> drivers/iio/accel/Kconfig | 7 +++++++
> drivers/iio/accel/Makefile | 1 +
> drivers/{staging => }/iio/accel/kxsd9.c | 10 +++++-----
> drivers/staging/iio/accel/Kconfig | 7 -------
> drivers/staging/iio/accel/Makefile | 2 --
> 5 files changed, 13 insertions(+), 14 deletions(-)
> rename drivers/{staging => }/iio/accel/kxsd9.c (99%)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-20 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-06 15:10 [PATCH 0/2] iio:kxsd9 basic driver move out of staging Jonathan Cameron
2013-01-06 15:10 ` [PATCH 1/2] staging:iio:accel:kxsd9 Jonathan Cameron
2013-01-06 15:10 ` [PATCH 2/2] iio:accel:kxsd9 move out of staging Jonathan Cameron
2013-01-20 12:06 ` [PATCH 0/2] iio:kxsd9 basic driver " Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).