Back porting bmg160 driver to 3.10.9 kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to back port the bmg160 driver to the 3.10.9 kernel to work on an Android 4.4.x device.

The API for in ii_info has changed quite a bit between the 3.18 and the 3.10 kernel.  So this function won’t compile

static int bmg160_read_event(struct iio_dev *indio_dev,
                             const struct iio_chan_spec *chan,
                             enum iio_event_type type,
                             enum iio_event_direction dir,
                             enum iio_event_info info,
                             int *val, int *val2)
{
        struct bmg160_data *data = iio_priv(indio_dev);

        *val2 = 0;
        switch (info) {
        case IIO_EV_INFO_VALUE:
                *val = data->slope_thres & BMG160_SLOPE_THRES_MASK;
                break;
        default:
                return -EINVAL;
        }

        return IIO_VAL_INT;
}

The 3.10 prototype for this function is
        int (*read_event_value)(struct iio_dev *indio_dev,
                                u64 event_code,
                                int *val);

My question is what does IIO_EV_INFO_VALUE map to in the old event_code in the 3.10.9 kernel

Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux