summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/mcp4725.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 4.5-rc3 into staging-nextGreg Kroah-Hartman2016-02-071-0/+1
|\ | | | | | | | | | | We want the upstream staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio: dac: mcp4725: set iio name property in sysfsYong Li2016-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | Without this change, the name entity for mcp4725 is missing in /sys/bus/iio/devices/iio\:device*/name With this change, name is reported correctly Signed-off-by: Yong Li <sdliyong@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: dac: mcp4725: Add basic support for MCP4726Akinobu Mita2016-01-031-20/+67
|/ | | | | | | | | | | | | | | | | | | | | | MCP4726 is a single channel 12-bit DAC. We can support MCP4726 with a little changes to mcp4725 driver. In power-down mode, they have different selection of VOUT pull-down registers. MCP4726 also has features: - Output gain options: 1x, 2x - Voltage reference selection: VDD, VREF (Unbuffered or Buffered) But these are not supported in this change. (1x gain, VDD is selected) datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/22272C.pdf Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald <pmeerw@pmeerw.net> Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-111-1/+0
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:mcp4725 drop specification of scan type as unused in this driver.Jonathan Cameron2013-12-171-1/+0
| | | | | | | | IIO_ST is going away as it is a pain to maintain so the simplest path with this driver is to not specify the unused scan type. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
* iio: dac: mcp4725: Remove redundant codeSachin Kamat2013-10-241-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>
* iio:mcp4725: Report scale as fractional valueLars-Peter Clausen2013-10-011-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>
* Merge 3.12-rc2 into staging-next.Greg Kroah-Hartman2013-09-251-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>
| * iio: Fix mcp4725 dev-to-indio_dev conversion in suspend/resumePeter Meerwald2013-09-211-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>
* | iio: refactor info mask and ext_info attribute creation.Jonathan Cameron2013-09-151-1/+2
|/ | | | | | | | | | | | | | | | 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>
* iio:mcp4725: Use devm_iio_device_allocPeter Meerwald2013-08-031-19/+7
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:mcp4725 wrong return type of attribute _show functionJonathan Cameron2013-08-031-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>
* iio: add powerdown to mcp4725 dac drivePeter Meerwald2013-08-031-2/+85
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: add store_eeprom to mcp4725 dac driverPeter Meerwald2013-08-031-2/+62
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:mcp4725 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-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>
* Drivers: iio: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-4/+4
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio: add mcp4725 I2C DAC driverPeter Meerwald2012-06-121-0/+227
v5: * fix warnings (Jonathan Cameron) v4: * remove unused indio_dev pointer in mcp4725_data (Jonathan Cameron) * use u16 instead of unsigned short in mcp4725_data (Jonathan Cameron) * #include mcp4725.h from linux/iio/dac/ v3: * move from staging to drivers/iio * switch to chan_spec * dev_get_drvdata() -> dev_to_iio_dev() * annotate probe() and remove() with __devinit and __devexit v2 (based on comments from Jonathan Cameron and Lars-Peter Clausen): * did NOT switch to chan_spec yet * rebase to staging-next tree, update iio header locations * dropped dac.h #include, not needed * strict_strtol() -> kstrtol() * call iio_device_unregister() in remove() * everything in one patch Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>