diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-29 15:53:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-29 15:53:42 +0200 |
commit | ca9280d1f82a7a0165a683dc09f182329ebec352 (patch) | |
tree | 201ebf8240be3cc1e423e6ed6a5001d729e0f739 /drivers/iio/dac | |
parent | 13253d808d42dee88a53aa0fa57c5de4e6a460ed (diff) | |
parent | 7e87d11c9bda75816ced8d0895e8d24e5c52833a (diff) | |
download | talos-obmc-linux-ca9280d1f82a7a0165a683dc09f182329ebec352.tar.gz talos-obmc-linux-ca9280d1f82a7a0165a683dc09f182329ebec352.zip |
Merge tag 'iio-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First set of new device support, features and cleanups for IIO in the 4.13 cycle
Two entirely new drivers in here plus the usual range of cleanups and features.
New device support
* ad5064
- add ltc2631, ltc2633 and ltc2635 support.
* bma180
- trivial support for bma250e (new id)
* hid-sensor-rotation
- add relative orientation and geometric orientation support.
* isl29028
- add isl29030 support (its effectively the same part from a driver point of
view)
* maxim_thermocouple
- add max31856 id.
* meson-saradc
- add meson8b SoC adc support.
* ti-adc084s021
- new driver and bindings.
* ti-adc108s102
- new driver and bindings.
Staging graduations
* isl29028
Features
* bma180
- ACPI enumeration for BMA250E which is used in various x86 tablets.
* hi8453
- add raw access rather than only events.
* hid-sensor-hub
- Implement batch mode in which we can set a threshold on the amount of time
between data coming from the fifos. This is the first device to do this
rather than use a watershed on the number of samples.
* hts221
- power management support
* lsm6dsx
- add system power management support.
* rpr0521
- sampling frequency read / write
* stm32-trigger
- add support for TRG02 triggers.
* tsl2583
- runtime power management support.
Cleanups
* core
- inkern: fix a double unlock in iio_read_available_channel_raw when raw
value doesn't appear to be raw (error path).
- fixup accidental sizeof pointer in iio_device_add_mask_type.
* docs
- fix an accidental duplicated line in sysfs-bus-iio-meas-spec.
* tools
- use local include/uapi headers to ensure always up to date.
- increase length of allowed trigger names.
* ad9834
- symbolic to octal permissions.
* ade7753
- symbolic to octal permissions.
- fix indentation
* ade7754
- symbolic to octal permissions.
* ade7758
- symbolic to octal permissions.
- ade7854
- symbolic to octal permissions.
* as3935
- move out of storm check to given consistent results for raw and processed
values.
* bmp280
- fix bme280 naming in Kconfig help.
* hi8435
- avoid garbage on event after enable.
- add missing in_voltage_sensing_mode_available to list possible enum options.
- handle the reset gpio with the obvious polarity rather than relying on
DT to provide it correctly.
* hid-sensors
- fix a wrong error path scrubbing of return values.
* hid-sensors-accel
- drop static on a local variable
* hid-sensors-rotation
- Add missing scale and offset property parsing support.
* ina2xx
- Fix a bad use of GENMASK and some typos and whitespace issues.
* isl29018
- only declare the ACPI table when ACPI is enabled.
* isl29028
- fix proximity sleep times.
* lsm6dsx
- replace ifdef CONFIG_PM with __maybe_unused to avoid the complexity of
dealing with the various PM config variables.
* meson-saradc
- mark meson_sar_adc_data static and const.
* rcar-gyroadc
- derive the interface clock speed from the fck clock on the basis they are
the same actual clock.
- drop the now unused if clock from the bindings.
* rpr0521
- disable sensor when marked as such rather than always enabling it.
- poweroff if probe fails and we can talk to device.
- make sure device powered off when it doesn't need to be on.
- use sizeof rather than hardcoded size on value read.
- whitespace fixup.
- reorder channel numbers ready for buffered support which didn't quite
make this pull request.
* st-accel
- fix platform data initialization to allow remove and reprobe.
* st-pressure
- fix platform data initialization to allow remove and reprobe.
* tsl2x7x
- S_IRUGO, S_IWUSR to octal values
- rename driver for consistency with more recent drivers
- drop FSF mailing address
- replace DEVICE_ATTR macros with the shorter DEVICE_ATTR_RW form and
relevant function renames.
* zpa2326
- report an error for consistency with other error paths.
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/Kconfig | 3 | ||||
-rw-r--r-- | drivers/iio/dac/ad5064.c | 71 |
2 files changed, 71 insertions, 3 deletions
diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig index df5abc46cd3f..25bed2d7d2b9 100644 --- a/drivers/iio/dac/Kconfig +++ b/drivers/iio/dac/Kconfig @@ -13,7 +13,8 @@ config AD5064 AD5045, AD5064, AD5064-1, AD5065, AD5625, AD5625R, AD5627, AD5627R, AD5628, AD5629R, AD5645R, AD5647R, AD5648, AD5665, AD5665R, AD5666, AD5667, AD5667R, AD5668, AD5669R, LTC2606, LTC2607, LTC2609, LTC2616, - LTC2617, LTC2619, LTC2626, LTC2627, LTC2629 Digital to Analog Converter. + LTC2617, LTC2619, LTC2626, LTC2627, LTC2629, LTC2631, LTC2633, LTC2635 + Digital to Analog Converter. To compile this driver as a module, choose M here: the module will be called ad5064. diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c index 6803e4a137cd..3f9399c27869 100644 --- a/drivers/iio/dac/ad5064.c +++ b/drivers/iio/dac/ad5064.c @@ -2,8 +2,8 @@ * AD5024, AD5025, AD5044, AD5045, AD5064, AD5064-1, AD5065, AD5625, AD5625R, * AD5627, AD5627R, AD5628, AD5629R, AD5645R, AD5647R, AD5648, AD5665, AD5665R, * AD5666, AD5667, AD5667R, AD5668, AD5669R, LTC2606, LTC2607, LTC2609, LTC2616, - * LTC2617, LTC2619, LTC2626, LTC2627, LTC2629 Digital to analog converters - * driver + * LTC2617, LTC2619, LTC2626, LTC2627, LTC2629, LTC2631, LTC2633, LTC2635 + * Digital to analog converters driver * * Copyright 2011 Analog Devices Inc. * @@ -168,6 +168,24 @@ enum ad5064_type { ID_LTC2626, ID_LTC2627, ID_LTC2629, + ID_LTC2631_L12, + ID_LTC2631_H12, + ID_LTC2631_L10, + ID_LTC2631_H10, + ID_LTC2631_L8, + ID_LTC2631_H8, + ID_LTC2633_L12, + ID_LTC2633_H12, + ID_LTC2633_L10, + ID_LTC2633_H10, + ID_LTC2633_L8, + ID_LTC2633_H8, + ID_LTC2635_L12, + ID_LTC2635_H12, + ID_LTC2635_L10, + ID_LTC2635_H10, + ID_LTC2635_L8, + ID_LTC2635_H8, }; static int ad5064_write(struct ad5064_state *st, unsigned int cmd, @@ -425,6 +443,19 @@ static DECLARE_AD5064_CHANNELS(ad5669_channels, 16, 0, ad5064_ext_info); static DECLARE_AD5064_CHANNELS(ltc2607_channels, 16, 0, ltc2617_ext_info); static DECLARE_AD5064_CHANNELS(ltc2617_channels, 14, 2, ltc2617_ext_info); static DECLARE_AD5064_CHANNELS(ltc2627_channels, 12, 4, ltc2617_ext_info); +#define ltc2631_12_channels ltc2627_channels +static DECLARE_AD5064_CHANNELS(ltc2631_10_channels, 10, 6, ltc2617_ext_info); +static DECLARE_AD5064_CHANNELS(ltc2631_8_channels, 8, 8, ltc2617_ext_info); + +#define LTC2631_INFO(vref, pchannels, nchannels) \ + { \ + .shared_vref = true, \ + .internal_vref = vref, \ + .channels = pchannels, \ + .num_channels = nchannels, \ + .regmap_type = AD5064_REGMAP_LTC, \ + } + static const struct ad5064_chip_info ad5064_chip_info_tbl[] = { [ID_AD5024] = { @@ -724,6 +755,24 @@ static const struct ad5064_chip_info ad5064_chip_info_tbl[] = { .num_channels = 4, .regmap_type = AD5064_REGMAP_LTC, }, + [ID_LTC2631_L12] = LTC2631_INFO(2500000, ltc2631_12_channels, 1), + [ID_LTC2631_H12] = LTC2631_INFO(4096000, ltc2631_12_channels, 1), + [ID_LTC2631_L10] = LTC2631_INFO(2500000, ltc2631_10_channels, 1), + [ID_LTC2631_H10] = LTC2631_INFO(4096000, ltc2631_10_channels, 1), + [ID_LTC2631_L8] = LTC2631_INFO(2500000, ltc2631_8_channels, 1), + [ID_LTC2631_H8] = LTC2631_INFO(4096000, ltc2631_8_channels, 1), + [ID_LTC2633_L12] = LTC2631_INFO(2500000, ltc2631_12_channels, 2), + [ID_LTC2633_H12] = LTC2631_INFO(4096000, ltc2631_12_channels, 2), + [ID_LTC2633_L10] = LTC2631_INFO(2500000, ltc2631_10_channels, 2), + [ID_LTC2633_H10] = LTC2631_INFO(4096000, ltc2631_10_channels, 2), + [ID_LTC2633_L8] = LTC2631_INFO(2500000, ltc2631_8_channels, 2), + [ID_LTC2633_H8] = LTC2631_INFO(4096000, ltc2631_8_channels, 2), + [ID_LTC2635_L12] = LTC2631_INFO(2500000, ltc2631_12_channels, 4), + [ID_LTC2635_H12] = LTC2631_INFO(4096000, ltc2631_12_channels, 4), + [ID_LTC2635_L10] = LTC2631_INFO(2500000, ltc2631_10_channels, 4), + [ID_LTC2635_H10] = LTC2631_INFO(4096000, ltc2631_10_channels, 4), + [ID_LTC2635_L8] = LTC2631_INFO(2500000, ltc2631_8_channels, 4), + [ID_LTC2635_H8] = LTC2631_INFO(4096000, ltc2631_8_channels, 4), }; static inline unsigned int ad5064_num_vref(struct ad5064_state *st) @@ -982,6 +1031,24 @@ static const struct i2c_device_id ad5064_i2c_ids[] = { {"ltc2626", ID_LTC2626}, {"ltc2627", ID_LTC2627}, {"ltc2629", ID_LTC2629}, + {"ltc2631-l12", ID_LTC2631_L12}, + {"ltc2631-h12", ID_LTC2631_H12}, + {"ltc2631-l10", ID_LTC2631_L10}, + {"ltc2631-h10", ID_LTC2631_H10}, + {"ltc2631-l8", ID_LTC2631_L8}, + {"ltc2631-h8", ID_LTC2631_H8}, + {"ltc2633-l12", ID_LTC2633_L12}, + {"ltc2633-h12", ID_LTC2633_H12}, + {"ltc2633-l10", ID_LTC2633_L10}, + {"ltc2633-h10", ID_LTC2633_H10}, + {"ltc2633-l8", ID_LTC2633_L8}, + {"ltc2633-h8", ID_LTC2633_H8}, + {"ltc2635-l12", ID_LTC2635_L12}, + {"ltc2635-h12", ID_LTC2635_H12}, + {"ltc2635-l10", ID_LTC2635_L10}, + {"ltc2635-h10", ID_LTC2635_H10}, + {"ltc2635-l8", ID_LTC2635_L8}, + {"ltc2635-h8", ID_LTC2635_H8}, {} }; MODULE_DEVICE_TABLE(i2c, ad5064_i2c_ids); |