Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205888
b: refs/heads/master
c: f4658c8
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent 3f3cfb4 commit 4c41ab0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 85 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: 7b2c33b11ef003d83c87a58201ff42313e13eff4
refs/heads/master: f4658c898837ed2678422f3e69ee9d050e8e9cf8
17 changes: 3 additions & 14 deletions trunk/drivers/staging/iio/accel/adis16209_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
#include "../trigger.h"
#include "adis16209.h"

/**
* combine_8_to_16() utility function to munge to u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
u16 _lower = lower;
u16 _upper = upper;
return _lower | (_upper << 8);
}

static IIO_SCAN_EL_C(supply, ADIS16209_SCAN_SUPPLY, IIO_UNSIGNED(14),
ADIS16209_SUPPLY_OUT, NULL);
static IIO_SCAN_EL_C(accel_x, ADIS16209_SCAN_ACC_X, IIO_SIGNED(14),
Expand Down Expand Up @@ -139,10 +129,9 @@ static void adis16209_trigger_bh_to_ring(struct work_struct *work_s)

if (st->indio_dev->scan_count)
if (adis16209_read_ring_data(&st->indio_dev->dev, st->rx) >= 0)
for (; i < st->indio_dev->scan_count; i++) {
data[i] = combine_8_to_16(st->rx[i*2+1],
st->rx[i*2]);
}
for (; i < st->indio_dev->scan_count; i++)
data[i] = be16_to_cpup(
(__be16 *)&(st->rx[i*2]));

/* Guaranteed to be aligned with 8 byte boundary */
if (st->indio_dev->scan_timestamp)
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/staging/iio/accel/adis16240_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
#include "../trigger.h"
#include "adis16240.h"

/**
* combine_8_to_16() utility function to munge to u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
u16 _lower = lower;
u16 _upper = upper;
return _lower | (_upper << 8);
}

static IIO_SCAN_EL_C(supply, ADIS16240_SCAN_SUPPLY, IIO_UNSIGNED(10),
ADIS16240_SUPPLY_OUT, NULL);
static IIO_SCAN_EL_C(accel_x, ADIS16240_SCAN_ACC_X, IIO_SIGNED(10),
Expand Down Expand Up @@ -131,10 +121,9 @@ static void adis16240_trigger_bh_to_ring(struct work_struct *work_s)

if (st->indio_dev->scan_count)
if (adis16240_read_ring_data(&st->indio_dev->dev, st->rx) >= 0)
for (; i < st->indio_dev->scan_count; i++) {
data[i] = combine_8_to_16(st->rx[i*2+1],
st->rx[i*2]);
}
for (; i < st->indio_dev->scan_count; i++)
data[i] = be16_to_cpup(
(__be16 *)&(st->rx[i*2]));

/* Guaranteed to be aligned with 8 byte boundary */
if (st->indio_dev->scan_timestamp)
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/staging/iio/gyro/adis16260_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
#include "../trigger.h"
#include "adis16260.h"

/**
* combine_8_to_16() utility function to munge to u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
u16 _lower = lower;
u16 _upper = upper;
return _lower | (_upper << 8);
}

static IIO_SCAN_EL_C(supply, ADIS16260_SCAN_SUPPLY, IIO_UNSIGNED(12),
ADIS16260_SUPPLY_OUT, NULL);
static IIO_SCAN_EL_C(gyro, ADIS16260_SCAN_GYRO, IIO_SIGNED(14),
Expand Down Expand Up @@ -134,10 +124,9 @@ static void adis16260_trigger_bh_to_ring(struct work_struct *work_s)

if (st->indio_dev->scan_count)
if (adis16260_read_ring_data(&st->indio_dev->dev, st->rx) >= 0)
for (; i < st->indio_dev->scan_count; i++) {
data[i] = combine_8_to_16(st->rx[i*2+1],
st->rx[i*2]);
}
for (; i < st->indio_dev->scan_count; i++)
data[i] = be16_to_cpup(
(__be16 *)&(st->rx[i*2]));

/* Guaranteed to be aligned with 8 byte boundary */
if (st->indio_dev->scan_timestamp)
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/staging/iio/imu/adis16300_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
#include "../trigger.h"
#include "adis16300.h"

/**
* combine_8_to_16() utility function to munge to u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
u16 _lower = lower;
u16 _upper = upper;
return _lower | (_upper << 8);
}

static IIO_SCAN_EL_C(supply, ADIS16300_SCAN_SUPPLY, IIO_UNSIGNED(14),
ADIS16300_SUPPLY_OUT, NULL);

Expand Down Expand Up @@ -158,10 +148,9 @@ static void adis16300_trigger_bh_to_ring(struct work_struct *work_s)

if (st->indio_dev->scan_count)
if (adis16300_spi_read_burst(&st->indio_dev->dev, st->rx) >= 0)
for (; i < st->indio_dev->scan_count; i++) {
data[i] = combine_8_to_16(st->rx[i*2+1],
st->rx[i*2]);
}
for (; i < st->indio_dev->scan_count; i++)
data[i] = be16_to_cpup(
(__be16 *)&(st->rx[i*2]));

/* Guaranteed to be aligned with 8 byte boundary */
if (st->indio_dev->scan_timestamp)
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/staging/iio/imu/adis16350_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
#include "../trigger.h"
#include "adis16350.h"

/**
* combine_8_to_16() utility function to munge to u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
u16 _lower = lower;
u16 _upper = upper;
return _lower | (_upper << 8);
}

static IIO_SCAN_EL_C(supply, ADIS16350_SCAN_SUPPLY, IIO_UNSIGNED(12),
ADIS16350_SUPPLY_OUT, NULL);

Expand Down Expand Up @@ -158,10 +148,9 @@ static void adis16350_trigger_bh_to_ring(struct work_struct *work_s)

if (st->indio_dev->scan_count)
if (adis16350_spi_read_burst(&st->indio_dev->dev, st->rx) >= 0)
for (; i < st->indio_dev->scan_count; i++) {
data[i] = combine_8_to_16(st->rx[i*2+1],
st->rx[i*2]);
}
for (; i < st->indio_dev->scan_count; i++)
data[i] = be16_to_cpup(
(__be16 *)&(st->rx[i*2]));

/* Guaranteed to be aligned with 8 byte boundary */
if (st->indio_dev->scan_timestamp)
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/staging/iio/imu/adis16400_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
#include "../trigger.h"
#include "adis16400.h"

/**
* combine_8_to_16() utility function to munge to u8s into u16
**/
static inline u16 combine_8_to_16(u8 lower, u8 upper)
{
u16 _lower = lower;
u16 _upper = upper;
return _lower | (_upper << 8);
}

static IIO_SCAN_EL_C(supply, ADIS16400_SCAN_SUPPLY, IIO_SIGNED(14),
ADIS16400_SUPPLY_OUT, NULL);

Expand Down Expand Up @@ -167,10 +157,9 @@ static void adis16400_trigger_bh_to_ring(struct work_struct *work_s)

if (st->indio_dev->scan_count)
if (adis16400_spi_read_burst(&st->indio_dev->dev, st->rx) >= 0)
for (; i < st->indio_dev->scan_count; i++) {
data[i] = combine_8_to_16(st->rx[i*2+1],
st->rx[i*2]);
}
for (; i < st->indio_dev->scan_count; i++)
data[i] = be16_to_cpup(
(__be16 *)&(st->rx[i*2]));

/* Guaranteed to be aligned with 8 byte boundary */
if (st->indio_dev->scan_timestamp)
Expand Down

0 comments on commit 4c41ab0

Please sign in to comment.