summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/m62332.c
Commit message (Collapse)AuthorAgeFilesLines
* iio:dac: drop assignment of iio_info.driver_moduleJonathan Cameron2017-08-221-1/+0
| | | | | | | | | The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure element will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* iio:dac:m62332: use dynamic scaleHartmut Knaack2015-10-111-7/+6
| | | | | | | | Some regulators can supply multiple voltages. To take changing voltages into account, the scale needs to be calculated on every read access. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:m62332: address some style issuesHartmut Knaack2015-10-111-5/+11
| | | | | | | | Fix some indentation issues and separate returns by empty lines (IIO style). Also rename the channel mask in _read_raw() to mask. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:m62332: drop unrequired variableHartmut Knaack2015-10-111-6/+2
| | | | | | | | | A return variable is not required in _write_raw(), and dropping it reduces complexity, as well. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:m62332: use ARRAY_SIZEHartmut Knaack2015-10-111-3/+3
| | | | | | | | Make use of ARRAY_SIZE to prevent buffer issues. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:m62332: shutdown on removeHartmut Knaack2015-10-111-0/+2
| | | | | | | | | | | The regulator framework requests to balance regulator_enable() calls with regulator_disable() calls. To meet this requirement, set channels to 0 on remove, which implies a regulator_disable() call in case that channel was enabled. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:dac:m62332: share scale and offsetHartmut Knaack2015-10-111-9/+9
| | | | | | | | | | This device simply uses its Vcc as reference voltage, so the same scale applies for all channels. Also offset doesn't appear to be different for any channel. Represent this by switching these two attributes to info_mask_shared_by_type. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: add m62332 DAC driverDmitry Eremin-Solenikov2015-05-171-0/+269
m62332 is a simple 2-channel DAC used on several Sharp Zaurus boards to control LCD voltage, backlight and sound. The driver use regulators to control the reference voltage and enabling/disabling the DAC. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud