diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-04 15:31:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-04 15:31:05 -0400 |
commit | eb7bfed901b9fea6e48bec10009dc8c8641e36e7 (patch) | |
tree | e03df0b64ecdfc3c51bf0bbdd2f96cd2a6348a7a /tools | |
parent | 56d118c243fbc62d95a79183bb6bcfc38a398da5 (diff) | |
parent | 486294f184c05cff116160bb731cbb679f047621 (diff) |
Merge tag 'iio-for-4.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of IIO new device support, features and cleanups for the 4.7 cycle.
New core support
* UV light modifier (for intensity)
* UV light index channel type.
New device support
* hp206c barometer and altimeter
- new driver.
* mcp4131 potentiometer
- new driver supporting lots of parts from Microchip.
* mma8452
- FXLS8471Q support
- NXP LPC18XX SOC ADC
- new driver.
- NXP LPC18XX SOC DAC
- new driver.
- rockchip_saradc
- support rk3399
* st accel
- h3lis331dl support
Staging driver removals
* adis16204
- obsolete part making it hard to get parts to test the driver in order
to clean it up.
* adis16220
- obsolete part making it hard to get the parts test the driver in order
to clean it up.
Features
* core
- convenience functions to claim / release direct access to the device.
Makes more consistent handling of this corner easier. Used in ad7192 driver.
* ak8975
- power regulator support.
* at91-sama5d2
- differential channel support.
* mma8452
- runtime pm support
- drop device specific autosleep and use the runtime pm one instead.
* ms5611
- DT bindings
- oversampling ratio support
Cleanups and minor fixes
* MAINTAINERS
- Peter got married - hence name change!
* Documentation
- Fix a typo in in_proximity_raw description.
- Add some missing docs for iio_buffer_access_funcs.
* Tools
- update iio_event_monitor names to match new stuff.
- make generic_buffer look for triggers ending in -trigger as we let these in
for a number of drivers a long time back and now it is a fairly common
option.
Drivers
* staging wide
- convert bare unsigned usage to unsigned int to comply with coding style.
* non staging wide:
- since boiler plate gpio handling of interrupts has been moved into the
ACPI core we don't need to include gpio/consumer.h in a load of drivers so
drop it.
* ad7606
- fix an endian casting sparse warning.
* ak8975
- fix a possible unitialized warning from gcc.
- drop and unused field left over from earlier cleanups
- fix a missing regulator_disable on exit.
* at91-sama5d2
- typo and indentation
- missing IOMEM dependency.
- cleanup mode register usage by avoidling erasing whole thing when changing
the sampling frequency.
* bmc150
- use the core demux and available_scan_masks to simplify buffer handling
- optimize the transfers in the trigger handler now we have a magic function
to emulate bulk reads (under circumstances met here). This matters with some
rather dumb i2c adapters in particular.
- use a single regmap_conf for all bus types as they were all the same.
* bmg160
- use the core demux and available_scan_masks to simplify the buffer handling
- optimize the transfers in the trigger handler now we have a magic funciton
to emulate bulk rads (under circumstances met here).
- drop gpio interrupt probing from the driver (ACPI) as now handled by the
ACPI core.
* ina2xx-adc
- update the CALIB register when RShunt changes.
- fix scale for VShunt - in reality this error canceled out when used.
* isl29028
- use regmap to retrieve the struct device instead of carrying a second
copy of it around.
* kxcjk-1013
- use core demux
- optimize i2c transfers in the trigger handler.
* mcp4531
- refactor to use a pointer to access model parameters instead of indexing
into the array each time.
* mma8452
- style fixes
- avoid swtiching to active whenever the config changes
- add missin i2c_device_id for mma8451
* mpu6050
- fix possible NULL dereference.
- fix the name / chip_id used when ACPI used (otherwise reports as NULL).
* ms5611
- fix a missing regulator_disable that left the regulator on during removal.
* mxc4005
- drop gpio interrupt handling for ACPI case from driver as the core now
handles this case.
* st-sensors
- note that there are only ever a maximum of 3 axis on current st-sensors
so just allocate a fixed sized buffer big enough for that.
* tpl0102
- change the i2c_check_functionality condition to bring it inline with other
IIO users as EOPNOTSUPP.
* tsl2563
- replace deprecated flush_scheduled_work
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iio/generic_buffer.c | 14 | ||||
-rw-r--r-- | tools/iio/iio_event_monitor.c | 18 |
2 files changed, 31 insertions, 1 deletions
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c index 01c4f67801e0..c42b7f836b48 100644 --- a/tools/iio/generic_buffer.c +++ b/tools/iio/generic_buffer.c | |||
@@ -304,7 +304,19 @@ int main(int argc, char **argv) | |||
304 | } | 304 | } |
305 | } | 305 | } |
306 | 306 | ||
307 | /* Verify the trigger exists */ | 307 | /* Look for this "-devN" trigger */ |
308 | trig_num = find_type_by_name(trigger_name, "trigger"); | ||
309 | if (trig_num < 0) { | ||
310 | /* OK try the simpler "-trigger" suffix instead */ | ||
311 | free(trigger_name); | ||
312 | ret = asprintf(&trigger_name, | ||
313 | "%s-trigger", device_name); | ||
314 | if (ret < 0) { | ||
315 | ret = -ENOMEM; | ||
316 | goto error_free_dev_dir_name; | ||
317 | } | ||
318 | } | ||
319 | |||
308 | trig_num = find_type_by_name(trigger_name, "trigger"); | 320 | trig_num = find_type_by_name(trigger_name, "trigger"); |
309 | if (trig_num < 0) { | 321 | if (trig_num < 0) { |
310 | fprintf(stderr, "Failed to find the trigger %s\n", | 322 | fprintf(stderr, "Failed to find the trigger %s\n", |
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index d51eb04202e9..d9b7e0f306c6 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c | |||
@@ -53,6 +53,10 @@ static const char * const iio_chan_type_name_spec[] = { | |||
53 | [IIO_ENERGY] = "energy", | 53 | [IIO_ENERGY] = "energy", |
54 | [IIO_DISTANCE] = "distance", | 54 | [IIO_DISTANCE] = "distance", |
55 | [IIO_VELOCITY] = "velocity", | 55 | [IIO_VELOCITY] = "velocity", |
56 | [IIO_CONCENTRATION] = "concentration", | ||
57 | [IIO_RESISTANCE] = "resistance", | ||
58 | [IIO_PH] = "ph", | ||
59 | [IIO_UVINDEX] = "uvindex", | ||
56 | }; | 60 | }; |
57 | 61 | ||
58 | static const char * const iio_ev_type_text[] = { | 62 | static const char * const iio_ev_type_text[] = { |
@@ -90,6 +94,7 @@ static const char * const iio_modifier_names[] = { | |||
90 | [IIO_MOD_LIGHT_RED] = "red", | 94 | [IIO_MOD_LIGHT_RED] = "red", |
91 | [IIO_MOD_LIGHT_GREEN] = "green", | 95 | [IIO_MOD_LIGHT_GREEN] = "green", |
92 | [IIO_MOD_LIGHT_BLUE] = "blue", | 96 | [IIO_MOD_LIGHT_BLUE] = "blue", |
97 | [IIO_MOD_LIGHT_UV] = "uv", | ||
93 | [IIO_MOD_QUATERNION] = "quaternion", | 98 | [IIO_MOD_QUATERNION] = "quaternion", |
94 | [IIO_MOD_TEMP_AMBIENT] = "ambient", | 99 | [IIO_MOD_TEMP_AMBIENT] = "ambient", |
95 | [IIO_MOD_TEMP_OBJECT] = "object", | 100 | [IIO_MOD_TEMP_OBJECT] = "object", |
@@ -102,6 +107,10 @@ static const char * const iio_modifier_names[] = { | |||
102 | [IIO_MOD_WALKING] = "walking", | 107 | [IIO_MOD_WALKING] = "walking", |
103 | [IIO_MOD_STILL] = "still", | 108 | [IIO_MOD_STILL] = "still", |
104 | [IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)", | 109 | [IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)", |
110 | [IIO_MOD_I] = "i", | ||
111 | [IIO_MOD_Q] = "q", | ||
112 | [IIO_MOD_CO2] = "co2", | ||
113 | [IIO_MOD_VOC] = "voc", | ||
105 | }; | 114 | }; |
106 | 115 | ||
107 | static bool event_is_known(struct iio_event_data *event) | 116 | static bool event_is_known(struct iio_event_data *event) |
@@ -136,6 +145,10 @@ static bool event_is_known(struct iio_event_data *event) | |||
136 | case IIO_ENERGY: | 145 | case IIO_ENERGY: |
137 | case IIO_DISTANCE: | 146 | case IIO_DISTANCE: |
138 | case IIO_VELOCITY: | 147 | case IIO_VELOCITY: |
148 | case IIO_CONCENTRATION: | ||
149 | case IIO_RESISTANCE: | ||
150 | case IIO_PH: | ||
151 | case IIO_UVINDEX: | ||
139 | break; | 152 | break; |
140 | default: | 153 | default: |
141 | return false; | 154 | return false; |
@@ -162,6 +175,7 @@ static bool event_is_known(struct iio_event_data *event) | |||
162 | case IIO_MOD_LIGHT_RED: | 175 | case IIO_MOD_LIGHT_RED: |
163 | case IIO_MOD_LIGHT_GREEN: | 176 | case IIO_MOD_LIGHT_GREEN: |
164 | case IIO_MOD_LIGHT_BLUE: | 177 | case IIO_MOD_LIGHT_BLUE: |
178 | case IIO_MOD_LIGHT_UV: | ||
165 | case IIO_MOD_QUATERNION: | 179 | case IIO_MOD_QUATERNION: |
166 | case IIO_MOD_TEMP_AMBIENT: | 180 | case IIO_MOD_TEMP_AMBIENT: |
167 | case IIO_MOD_TEMP_OBJECT: | 181 | case IIO_MOD_TEMP_OBJECT: |
@@ -174,6 +188,10 @@ static bool event_is_known(struct iio_event_data *event) | |||
174 | case IIO_MOD_WALKING: | 188 | case IIO_MOD_WALKING: |
175 | case IIO_MOD_STILL: | 189 | case IIO_MOD_STILL: |
176 | case IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z: | 190 | case IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z: |
191 | case IIO_MOD_I: | ||
192 | case IIO_MOD_Q: | ||
193 | case IIO_MOD_CO2: | ||
194 | case IIO_MOD_VOC: | ||
177 | break; | 195 | break; |
178 | default: | 196 | default: |
179 | return false; | 197 | return false; |