Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337690
b: refs/heads/master
c: fc8850c
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Nov 4, 2012
1 parent 36ca4f6 commit d22871d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 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: ea2ccb3e0271067ae8ed213b306d7545f5d1f8ce
refs/heads/master: fc8850c0a1fcbbf75cf37969be54a5c01445d9aa
1 change: 0 additions & 1 deletion trunk/drivers/staging/iio/imu/adis16400.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
struct adis16400_chip_info {
const struct iio_chan_spec *channels;
const int num_channels;
const int product_id;
const long flags;
unsigned int gyro_scale_micro;
unsigned int accel_scale_micro;
Expand Down
13 changes: 6 additions & 7 deletions trunk/drivers/staging/iio/imu/adis16400_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ static int adis16400_initial_setup(struct iio_dev *indio_dev)
{
int ret;
u16 prod_id, smp_prd;
unsigned int device_id;
struct adis16400_state *st = iio_priv(indio_dev);

/* use low spi speed for init if the device has a slow mode */
Expand Down Expand Up @@ -454,8 +455,11 @@ static int adis16400_initial_setup(struct iio_dev *indio_dev)
if (ret)
goto err_ret;

if ((prod_id & 0xF000) != st->variant->product_id)
dev_warn(&indio_dev->dev, "incorrect id");
sscanf(indio_dev->name, "adis%u\n", &device_id);

if (prod_id != device_id)
dev_warn(&indio_dev->dev, "Device ID(%u) and product ID(%u) do not match.",
device_id, prod_id);

dev_info(&indio_dev->dev, "%s: prod_id 0x%04x at CS%d (irq %d)\n",
indio_dev->name, prod_id,
Expand Down Expand Up @@ -1149,7 +1153,6 @@ static struct adis16400_chip_info adis16400_chips[] = {
.channels = adis16350_channels,
.num_channels = ARRAY_SIZE(adis16350_channels),
.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE,
.product_id = 0x3FE8,
.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
.accel_scale_micro = IIO_G_TO_M_S_2(3333), /* 3.333 mg */
.temp_scale_nano = 136000000, /* 0.136 C */
Expand All @@ -1162,7 +1165,6 @@ static struct adis16400_chip_info adis16400_chips[] = {
.channels = adis16350_channels,
.num_channels = ARRAY_SIZE(adis16350_channels),
.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE,
.product_id = 0x3FEA,
.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
.accel_scale_micro = IIO_G_TO_M_S_2(333), /* 0.333 mg */
.temp_scale_nano = 136000000, /* 0.136 C */
Expand All @@ -1175,7 +1177,6 @@ static struct adis16400_chip_info adis16400_chips[] = {
.channels = adis16350_channels,
.num_channels = ARRAY_SIZE(adis16350_channels),
.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE,
.product_id = 0x3FEC,
.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
.accel_scale_micro = IIO_G_TO_M_S_2(1000), /* 1 mg */
.temp_scale_nano = 136000000, /* 0.136 C */
Expand All @@ -1188,7 +1189,6 @@ static struct adis16400_chip_info adis16400_chips[] = {
.channels = adis16350_channels,
.num_channels = ARRAY_SIZE(adis16350_channels),
.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE,
.product_id = 0x3FED,
.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
.accel_scale_micro = IIO_G_TO_M_S_2(1000), /* 1 mg */
.temp_scale_nano = 136000000, /* 0.136 C */
Expand All @@ -1201,7 +1201,6 @@ static struct adis16400_chip_info adis16400_chips[] = {
.channels = adis16400_channels,
.num_channels = ARRAY_SIZE(adis16400_channels),
.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE,
.product_id = 0x4015,
.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
.accel_scale_micro = IIO_G_TO_M_S_2(3333), /* 3.333 mg */
.default_scan_mask = 0xFFF,
Expand Down

0 comments on commit d22871d

Please sign in to comment.