diff options
| author | Eric Tashakkor <w36098@motorola.com> | 2014-07-22 10:25:18 -0500 |
|---|---|---|
| committer | ERIC TASHAKKOR <w36098@motorola.com> | 2014-07-22 15:31:27 +0000 |
| commit | 6e74ce6e77c84f13db8fbc0a339d34438b0671b5 (patch) | |
| tree | 10f175fba7f8d65ce28306d9010254935925b18d /drivers/misc/m4sensorhub_gesture.c | |
| parent | f8cde617fe75279d90d66f96744d8282d49a872e (diff) | |
| download | olio-linux-3.10-6e74ce6e77c84f13db8fbc0a339d34438b0671b5.tar.xz olio-linux-3.10-6e74ce6e77c84f13db8fbc0a339d34438b0671b5.zip | |
IKXCLOCK-3040 Remove Unnecessary IIO Parameters
Removed IIO settings that caused an unused sysfs file to be created, which causes a kernel panic when read.
Added a gesture count to the gesture driver to differentiate new gestures.
Change-Id: I0e88c88356560c276867388b057ac0a9bb76167e
Signed-off-by: Eric Tashakkor <w36098@motorola.com>
Diffstat (limited to 'drivers/misc/m4sensorhub_gesture.c')
| -rw-r--r-- | drivers/misc/m4sensorhub_gesture.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/misc/m4sensorhub_gesture.c b/drivers/misc/m4sensorhub_gesture.c index 5257ab439d1..6ef8daacebc 100644 --- a/drivers/misc/m4sensorhub_gesture.c +++ b/drivers/misc/m4sensorhub_gesture.c @@ -49,6 +49,7 @@ struct m4ges_driver_data { struct m4sensorhub_gesture_iio_data iiodat; int16_t samplerate; int16_t latest_samplerate; + uint32_t gesture_count; uint16_t status; }; @@ -116,6 +117,7 @@ static void m4ges_isr(enum m4sensorhub_irqs int_event, void *handle) dd->iiodat.timestamp = iio_get_time_ns(); iio_push_to_buffers(iio, (unsigned char *)&(dd->iiodat)); + dd->gesture_count++; m4ges_isr_fail: if (err < 0) @@ -237,10 +239,11 @@ static ssize_t m4ges_iiodata_show(struct device *dev, mutex_lock(&(dd->mutex)); size = snprintf(buf, PAGE_SIZE, - "%s%hhu\n%s%hhu\n%s%hhd\n", + "%s%hhu\n%s%hhu\n%s%hhd\n%s%u\n", "gesture_type: ", dd->iiodat.gesture_type, "gesture_confidence: ", dd->iiodat.gesture_confidence, - "gesture_value: ", dd->iiodat.gesture_value); + "gesture_value: ", dd->iiodat.gesture_value, + "gesture_count: ", dd->gesture_count); mutex_unlock(&(dd->mutex)); return size; } @@ -264,9 +267,6 @@ static const struct iio_info m4ges_iio_info = { static const struct iio_chan_spec m4ges_iio_channels[] = { { .type = IIO_GESTURE, - .indexed = 1, - .channel = 0, - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = { .sign = 'u', |