summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/exynos_adc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 3.15-rc6 into staging-next.Greg Kroah-Hartman2014-05-221-3/+3
|\ | | | | | | | | | | | | | | This resolves the conflicts in the files: drivers/iio/adc/Kconfig drivers/staging/rtl8723au/os_dep/usb_ops_linux.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio: exynos_adc: use indio_dev->dev structure to handle child nodesNaveen Krishna Ch2014-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using pdev->dev with device_for_each_child() would iterate over all of the children of the platform device and delete them. Thus, causing crashes during module unload. We should be using the indio_dev->dev structure for registering/unregistering child nodes. Reported-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Tested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: exynos_adc: do a reinit_completion before the conversionNaveen Krishna Chatradhi2014-04-301-0/+1
| | | | | | | | | | | | | | | | | | Add reinit_completion() before the wait_for_completion_timeout in raw_read() call. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: exynos_adc: do a soft reset in case of timeoutNaveen Krishna Chatradhi2014-04-301-24/+26
| | | | | | | | | | | | | | | | | | Do a soft reset software if a timeout happens. This is applicable only for ADC_V2. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: exynos_adc: reduce timeout and use wait_for_completion_timeoutNaveen Krishna Chatradhi2014-04-301-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | ADC module on Exynos5 SoCs runs at 600KSPS. At this conversion rate, waiting for 1000 msecs is wasteful (incase of h/w failure). Hence, reduce the time out to 100msecs and use wait_for_completion_timeout() instead of wait_for_completion_interruptible_timeout() Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: exynos_adc: rearrange clk and regulator enable/disable callsNaveen Krishna Ch2014-04-301-29/+33
|/ | | | | | | | | | | | | | | | | This patch maintains the following order in probe(), remove(), resume() and suspend() calls regulator enable, clk prepare enable ... clk disable unprepare, regulator disable While at it, 1. enable the regulator before the iio_device_register() 2. handle the return values for enable/disable calls Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: exynos_adc: Use devm_iio_device_allocSachin Kamat2013-08-031-15/+8
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge 3.10-rc3 into staging-nextGreg Kroah-Hartman2013-05-271-4/+4
|\ | | | | | | | | | | | | We want the changes here, and we resolve the merge conflict that was happening in the nvec_kbd.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio: exynos_adc: fix wrong structure extration in suspend and resumeNaveen Krishna Chatradhi2013-05-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The exynos_adc device structure was wrongly extracted from the dev* correcting the same. Using the regular conversion of struct device* -> struct platform_device* -> struct exynos_adc* seems wrong. Instead we should be doing struct device* -> struct iio_dev* -> struct exynos_adc* Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | adc: exynos_adc: Convert to devm_ioremap_resource()Sachin Kamat2013-05-221-6/+6
|/ | | | | | | | Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: exynos_adc: Remove redundant of_match_ptr macroSachin Kamat2013-03-291-1/+1
| | | | | | | | exynos_adc is a DT only driver and exynos_adc_match table is always compiled in. Hence remove the macro. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: Add dt support for turning on the phy in exynos-adcDoug Anderson2013-03-171-1/+13
| | | | | | | | | | Without this change the exynos adc controller needed to have its phy enabled in some out-of-driver C code. Add support for specifying the phy enable register by listing it in the reg list. Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:exynos move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-1/+1
| | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
* iio: adc: add exynos adc driver under iio framworkNaveen Krishna Chatradhi2013-03-161-0/+440
This patch adds New driver to support: 1. Supports ADC IF found on EXYNOS4412/EXYNOS5250 and future SoCs from Samsung 2. Add ADC driver under iio/adc framework 3. Also adds the Documentation for device tree bindings Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud