Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304530
b: refs/heads/master
c: f316983
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Apr 30, 2012
1 parent 41eeea4 commit b287af6
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 949fd38c7b22168bc16fea100a51c8d4a3eab144
refs/heads/master: f316983fe033ba090b2f82fb9912aae9412d2372
12 changes: 6 additions & 6 deletions trunk/drivers/staging/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ config AD7606
depends on GPIOLIB
select IIO_BUFFER
select IIO_TRIGGER
select IIO_SW_RING
select IIO_KFIFO_BUF
help
Say yes here to build support for Analog Devices:
ad7606, ad7606-6, ad7606-4 analog to digital converters (ADC).
Expand Down Expand Up @@ -63,7 +63,7 @@ config AD799X_RING_BUFFER
bool "Analog Devices AD799x: use ring buffer"
depends on AD799X
select IIO_BUFFER
select IIO_SW_RING
select IIO_KFIFO_BUF
help
Say yes here to include ring buffer support in the AD799X
ADC driver.
Expand All @@ -72,7 +72,7 @@ config AD7476
tristate "Analog Devices AD7475/6/7/8 AD7466/7/8 and AD7495 ADC driver"
depends on SPI
select IIO_BUFFER
select IIO_SW_RING
select IIO_KFIFO_BUF
select IIO_TRIGGER
help
Say yes here to build support for Analog Devices
Expand All @@ -87,7 +87,7 @@ config AD7887
tristate "Analog Devices AD7887 ADC driver"
depends on SPI
select IIO_BUFFER
select IIO_SW_RING
select IIO_KFIFO_BUF
select IIO_TRIGGER
help
Say yes here to build support for Analog Devices
Expand All @@ -113,7 +113,7 @@ config AD7793
tristate "Analog Devices AD7792 AD7793 ADC driver"
depends on SPI
select IIO_BUFFER
select IIO_SW_RING
select IIO_KFIFO_BUF
select IIO_TRIGGER
help
Say yes here to build support for Analog Devices
Expand All @@ -135,7 +135,7 @@ config AD7192
tristate "Analog Devices AD7190 AD7192 AD7195 ADC driver"
depends on SPI
select IIO_BUFFER
select IIO_SW_RING
select IIO_KFIFO_BUF
select IIO_TRIGGER
help
Say yes here to build support for Analog Devices AD7190,
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/staging/iio/adc/ad7192.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AD7190 AD7192 AD7195 SPI ADC driver
*
* Copyright 2011 Analog Devices Inc.
* Copyright 2011-2012 Analog Devices Inc.
*
* Licensed under the GPL-2.
*/
Expand All @@ -20,7 +20,7 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger.h>
#include <linux/iio/trigger_consumer.h>

Expand Down Expand Up @@ -544,7 +544,7 @@ static int ad7192_register_ring_funcs_and_init(struct iio_dev *indio_dev)
{
int ret;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
goto error_ret;
Expand All @@ -557,7 +557,7 @@ static int ad7192_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->id);
if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_deallocate_sw_rb;
goto error_deallocate_kfifo;
}

/* Ring buffer functions - here trigger setup related */
Expand All @@ -567,16 +567,16 @@ static int ad7192_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
return 0;

error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer);
error_deallocate_kfifo:
iio_kfifo_free(indio_dev->buffer);
error_ret:
return ret;
}

static void ad7192_ring_cleanup(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}

/**
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/staging/iio/adc/ad7298_ring.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AD7298 SPI ADC driver
*
* Copyright 2011 Analog Devices Inc.
* Copyright 2011-2012 Analog Devices Inc.
*
* Licensed under the GPL-2.
*/
Expand All @@ -13,7 +13,7 @@

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger_consumer.h>

#include "ad7298.h"
Expand Down Expand Up @@ -118,7 +118,7 @@ int ad7298_register_ring_funcs_and_init(struct iio_dev *indio_dev)
{
int ret;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
goto error_ret;
Expand All @@ -132,7 +132,7 @@ int ad7298_register_ring_funcs_and_init(struct iio_dev *indio_dev)

if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_deallocate_sw_rb;
goto error_deallocate_kfifo;
}

/* Ring buffer functions - here trigger setup related */
Expand All @@ -143,14 +143,14 @@ int ad7298_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
return 0;

error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer);
error_deallocate_kfifo:
iio_kfifo_free(indio_dev->buffer);
error_ret:
return ret;
}

void ad7298_ring_cleanup(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}
14 changes: 7 additions & 7 deletions trunk/drivers/staging/iio/adc/ad7476_ring.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010 Analog Devices Inc.
* Copyright 2010-2012 Analog Devices Inc.
* Copyright (C) 2008 Jonathan Cameron
*
* Licensed under the GPL-2 or later.
Expand All @@ -15,7 +15,7 @@

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger_consumer.h>

#include "ad7476.h"
Expand Down Expand Up @@ -63,7 +63,7 @@ int ad7476_register_ring_funcs_and_init(struct iio_dev *indio_dev)
struct ad7476_state *st = iio_priv(indio_dev);
int ret = 0;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
goto error_ret;
Expand All @@ -78,7 +78,7 @@ int ad7476_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->id);
if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_deallocate_sw_rb;
goto error_deallocate_kfifo;
}

/* Ring buffer functions - here trigger setup related */
Expand All @@ -89,14 +89,14 @@ int ad7476_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
return 0;

error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer);
error_deallocate_kfifo:
iio_kfifo_free(indio_dev->buffer);
error_ret:
return ret;
}

void ad7476_ring_cleanup(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}
16 changes: 8 additions & 8 deletions trunk/drivers/staging/iio/adc/ad7606_ring.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2011 Analog Devices Inc.
* Copyright 2011-2012 Analog Devices Inc.
*
* Licensed under the GPL-2.
*
Expand All @@ -13,7 +13,7 @@

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger_consumer.h>

#include "ad7606.h"
Expand Down Expand Up @@ -102,7 +102,7 @@ int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev)
struct ad7606_state *st = iio_priv(indio_dev);
int ret;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
goto error_ret;
Expand All @@ -117,28 +117,28 @@ int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->id);
if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_deallocate_sw_rb;
goto error_deallocate_kfifo;
}

/* Ring buffer functions - here trigger setup related */

indio_dev->setup_ops = &ad7606_ring_setup_ops;
indio_dev->buffer->scan_timestamp = true ;
indio_dev->buffer->scan_timestamp = true;

INIT_WORK(&st->poll_work, &ad7606_poll_bh_to_ring);

/* Flag that polled ring buffering is possible */
indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
return 0;

error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer);
error_deallocate_kfifo:
iio_kfifo_free(indio_dev->buffer);
error_ret:
return ret;
}

void ad7606_ring_cleanup(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}
14 changes: 7 additions & 7 deletions trunk/drivers/staging/iio/adc/ad7793.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AD7792/AD7793 SPI ADC driver
*
* Copyright 2011 Analog Devices Inc.
* Copyright 2011-2012 Analog Devices Inc.
*
* Licensed under the GPL-2.
*/
Expand All @@ -21,7 +21,7 @@
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger.h>
#include <linux/iio/trigger_consumer.h>

Expand Down Expand Up @@ -409,7 +409,7 @@ static int ad7793_register_ring_funcs_and_init(struct iio_dev *indio_dev)
{
int ret;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
goto error_ret;
Expand All @@ -422,7 +422,7 @@ static int ad7793_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->id);
if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_deallocate_sw_rb;
goto error_deallocate_kfifo;
}

/* Ring buffer functions - here trigger setup related */
Expand All @@ -432,16 +432,16 @@ static int ad7793_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
return 0;

error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer);
error_deallocate_kfifo:
iio_kfifo_free(indio_dev->buffer);
error_ret:
return ret;
}

static void ad7793_ring_cleanup(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}

/**
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/staging/iio/adc/ad7887_ring.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2011 Analog Devices Inc.
* Copyright 2010-2012 Analog Devices Inc.
* Copyright (C) 2008 Jonathan Cameron
*
* Licensed under the GPL-2.
Expand All @@ -14,7 +14,7 @@

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger_consumer.h>

#include "ad7887.h"
Expand Down Expand Up @@ -114,7 +114,7 @@ int ad7887_register_ring_funcs_and_init(struct iio_dev *indio_dev)
{
int ret;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
goto error_ret;
Expand All @@ -127,7 +127,7 @@ int ad7887_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->id);
if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_deallocate_sw_rb;
goto error_deallocate_kfifo;
}
/* Ring buffer functions - here trigger setup related */
indio_dev->setup_ops = &ad7887_ring_setup_ops;
Expand All @@ -136,14 +136,14 @@ int ad7887_register_ring_funcs_and_init(struct iio_dev *indio_dev)
indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
return 0;

error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer);
error_deallocate_kfifo:
iio_kfifo_free(indio_dev->buffer);
error_ret:
return ret;
}

void ad7887_ring_cleanup(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}
Loading

0 comments on commit b287af6

Please sign in to comment.