aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-10-24iio: dac: mcp4725: Remove redundant codeSachin Kamat1-7/+1
Remove an inconsequential print message and return directly thereby cleaning up some code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-24iio: dac: max517: Remove redundant variableSachin Kamat1-8/+1
Remove an inconsequential print message and return directly thereby eliminating an intermediate variable. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-24iio: dac: ad5755: Remove redundant codeSachin Kamat1-7/+1
The if check is redundant as the value obtained from iio_device_register() is already in the required format. Error messages are already printed by iio_device_register(); hence not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-24iio: dac: ad5421: Remove redundant codeSachin Kamat1-7/+1
The if check is redundant as the value obtained from iio_device_register() is already in the required format. Hence return the function directly. Error messages are already printed by iio_device_register(); hence not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12iio:ad5421: Switch to new event config interfaceLars-Peter Clausen1-18/+44
Switch the ad5421 driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-05iio:ad5449: Use spi_sync_transfer()Lars-Peter Clausen1-6/+1
Use the spi_sync_transfer() helper function instead of open-coding it. Makes the code a bit shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:mcp4725: Report scale as fractional valueLars-Peter Clausen1-5/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:max517: Report scale as fractional valueLars-Peter Clausen1-5/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5791: Report scale as fractional valueLars-Peter Clausen1-3/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5764: Report scale as fractional valueLars-Peter Clausen1-6/+4
Move the complexity of calculating the fixed point scale to the core. Also fix a off by one error in the comment describing the transfer function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5755: Report scale as fractional valueLars-Peter Clausen1-12/+5
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5686: Report scale as fractional valueLars-Peter Clausen1-7/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5624r: Report scale as fractional valueLars-Peter Clausen1-6/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5504: Report scale as fractional valueLars-Peter Clausen1-6/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5446: Report scale as fractional valueLars-Peter Clausen1-6/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5421: Report scale as fractional valueLars-Peter Clausen1-11/+5
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5380: Report scale as fractional valueLars-Peter Clausen1-21/+19
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5360: Report scale as fractional valueLars-Peter Clausen1-6/+5
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-01iio:ad5064: Report scale as fractional valueLars-Peter Clausen1-4/+3
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-29Merge tag 'iio-for-3.13b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman2-1/+7
Jonathan writes: Second set of new functionality for IIO in the 3.13 cycle - with bug fixes for first set. This is a small, mainly to get a couple of compile bug related fixes into the tree ASAP. New device support: 1) Add ad5446 dac support to the ad5641 driver. New functionality and cleanups: 1) Optional power supply regulators for the st pressure sensors drivers using the new optional regulator interface. 2) Bit of tidying up of naming in the sysfs trigger. Bug fixes from the previous series: 1) Missing select IIO_BUFFER for ti_am335x_adc 2) Drop a bonus bracket in iio-trig-bfin-timmer
2013-09-25Merge 3.12-rc2 into staging-next.Greg Kroah-Hartman1-6/+6
This resolves the merge problem with two iio drivers that Stephen Rothwell pointed out. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-23iio: dac: ad5446: Add support for AD5641Aida Mynzhasova2-1/+7
This patch adds support for the AD5641 single channel, 14-bit, buffered voltage output DAC. Signed-off-by: Aida Mynzhasova <aida.mynzhasova@skitlab.ru> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-21iio: Fix mcp4725 dev-to-indio_dev conversion in suspend/resumePeter Meerwald1-6/+6
dev_to_iio_dev() is a false friend Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-15iio: refactor info mask and ext_info attribute creation.Jonathan Cameron10-9/+22
Introduce an enum to specify whether the attribute is separate or shared. Factor out the bitmap handling for loop into a separate function. Tidy up error handling and add a NULL assignment to squish a false positive warning from GCC. Change ext_info shared type from boolean to enum and update in all drivers. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2013-09-14iio: dac: ad5686: Remove redundant breakSachin Kamat1-1/+0
'break' after return is redundant. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: max517: Use devm_iio_device_allocSachin Kamat1-13/+4
Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad7303: Use devm_* APIsSachin Kamat1-23/+8
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5791: Use devm_* APIsSachin Kamat1-26/+9
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5764: Use devm_* APIsSachin Kamat1-15/+5
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5755: Use devm_iio_device_allocSachin Kamat1-10/+4
Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5686: Use devm_* APIsSachin Kamat1-13/+4
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5624r_spi: Use devm_* APIsSachin Kamat1-16/+6
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5504: Use devm_* APIsSachin Kamat1-23/+8
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5449: Use devm_* APIsSachin Kamat1-11/+4
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5446: Use devm_* APIsSachin Kamat1-14/+5
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5421: Use devm_* APIsSachin Kamat1-15/+4
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5380: Use devm_* APIsSachin Kamat1-14/+4
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5360: Use devm_* APIsSachin Kamat1-11/+4
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-19iio: dac: ad5064: Use devm_* APIsSachin Kamat1-15/+6
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio:mcp4725: Use devm_iio_device_allocPeter Meerwald1-19/+7
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio: Add a comment to about alphabetical order to Kconfigs and MakefilesLars-Peter Clausen2-18/+21
Keeping Makefile and Kconfig entries in alphabetical order usually works better than just appending new entries at the end, since it reduces the amount of conflicts. This patch adds a comment to the IIO Kconfig and Makefile files to document that the entries should be kept in alphabetical order. Also reorder those entries which weren't in alphabetical order yet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio:dac:mcp4725 wrong return type of attribute _show functionJonathan Cameron1-1/+1
Should be ssize_t and is int. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: Fengguan Wu <fengguang.wu@intel.com> Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-08-03iio: add powerdown to mcp4725 dac drivePeter Meerwald1-2/+85
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio: add store_eeprom to mcp4725 dac driverPeter Meerwald1-2/+62
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio: fix typos in dac KconfigPeter Meerwald1-3/+3
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-29iio: dac: ad7303: fix error return code in ad7303_probe()Wei Yongjun1-1/+3
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-11iio:dac: Add support for the AD7303Lars-Peter Clausen3-0/+326
This patch adds support for the AD7303. The AD7303 is a simple 2 channel 8 bit DAC with an SPI interface. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-05-22iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=mAxel Lin1-3/+3
This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m: drivers/built-in.o: In function `ad5064_i2c_write': drivers/iio/dac/ad5064.c:608: undefined reference to `i2c_master_send' drivers/built-in.o: In function `ad5064_i2c_register_driver': drivers/iio/dac/ad5064.c:646: undefined reference to `i2c_register_driver' drivers/built-in.o: In function `ad5064_i2c_unregister_driver': drivers/iio/dac/ad5064.c:651: undefined reference to `i2c_del_driver' make: *** [vmlinux] Error 1 When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support. Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m. The real fix though is to break the driver apart into a SPI part, an I2C part and a common part. But that's something for 3.11 while this is something for 3.10/stable. Reported-by: Wu Fengguang <fengguang.wu@intel.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-25Merge tag 'iio-for-3.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman14-44/+44
Jonathan writes: First set of IIO new drivers and cleanup for the 3.10 cycle. New stuff 1) Add OF support for specifying mappings between iio devices and their in kernel consumers. 2) Driver for AD7923 (extra functionality and support for ad7904, ad7914 and ad7924 added later in series) 3) Driver for Exynos adc (dt suppor for phy added later in series). 4) Make iio_push_event save IRQ context - necessary if it is to be used within an interrupt handler. Users of this functionality to follow. 5) For iio use the device tree node name to provide the hwmon name attribute if available. Removal and moves out of staging 1) Drop the adt7410 driver from IIO now that there is a hmwon driver with equivalent support. This device is very much targeted at hardware monitoring so hwmon is a more appropriate host for the driver. 2) Move iio_hwmon driver to drivers/hwmon. Cleanups 1) Minor cleanup in ST common library. 2) Large set of patches to break the info_mask element which previously used odd and even bits to specify if a channel attribute was either shared across similar channels or specific to only one. Now we have two bitmaps, one for those parameters that are specific to this channel and one for those shared by all channels with the same type as this one. This has no effect on the userspace abi. It simplifies the core code and provides more space for new channel parameters. It has been on the todo list for a long time! Conflicts: drivers/iio/dac/ad5064.c
2013-03-17iio:dac:mcp4725 move to info_mask_(shared_by_type/separate)Jonathan Cameron1-2/+2
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Peter Meerwald <pmeerw@pmeerw.net>