1
0
Fork 0
Commit Graph

90 Commits (34ff6c2fe366f389dbe45badb5d100bd3aa02bea)

Author SHA1 Message Date
Jonathan Cameron 0097e20e77 staging:iio:adc:lpc32xx Move out of staging.
There are a few more little cleanups that could be done on this driver, but
I don't think any are sufficient to justify not moving it out of staging.

It's a very simple driver (presumably for a simple part) so not much that can
go wrong.  I think it was only ever in staging because that's where IIO was
as a whole at the time and then we forgot about it!

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-02-11 11:19:25 +00:00
Jonathan Cameron af8f651b39 staging:iio:adc:spear Move out of staging.
There are some unanswered questions due to disagreements between the code
and various datasheets (including between different datasheets for the same
part).

I don't think that is necessarily a reason to keep it in staging however.
I'm partly posting this patch inorder to reignite debate and with a bit
of luck find someone who has one of these to test!

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-02-11 11:17:33 +00:00
Greg Kroah-Hartman d9750a2f9e 2nd round of new IIO device support, features and cleanups for the 4.6 cycle.
New Device Support
 * Apex stx104 DAC
   - new driver for this PC104 board. Right now DAC support only.
 * ADI ad5064
   - Add support for ad5625, ad5627, ad5645, ad5665, ad5667 DACs.
   - Add support for Linear Technology ltc2606, ltc2607, ltc2609, ltc2616,
     ltc2617, ltc2619, ltc2626, ltc2627 and ltc2629.
 * ADI ad7192
   - add support for the ad7193
 * Invensense mpu6050
   - substantial rework of driver to use regmap allowing SPI support extending
     the now split driver to cover the MPU6000.
 * TI adc0832
   - new driver supporting ADC0831, ADC0832, ADC0834 and ADC0838 ADCs.
 * TI ads1015
   - new driver, note that there is an existing hwmon driver. The long term
     intention is to probably remove the hwmon driver but for now we just have
     guards in place to ensure this driver is not built if that one is enabled.
 * TI afe4403
   - new driver for this heart rate monitor / pulse oximeter front end chip.
 * TI afe4404
   - new driver for this heart rate monitor / pulse oximeter front end chip.
 
 Staging Graduations
 * mxs-lradc
   - A combined general purpose and touch screen (input) device driver.
     Originally held in staging to allow reworking into and MFD but as
     that wasn't happening and isn't an absolute requirement we are moving
     it out of staging.
 
 Driver new features
 * ms5611
   - triggered buffer support
   - IIO_CHAN_INFO_SCALE to aid the triggered buffer support.
 
 Driver cleanups / reworks / fixes
 * ad5064
   - Use an enum for the register map layout to allow support of additional
     chips (precursor to the new support listed above).
   - Structural driver changes to allow support of the slightly different
     handling for the ltc parts above.
 * ad5933
   - drop an exceptional & unnecessary for a function pointer.
 * ad7606
   - Cleanup the repeated copies of pm ops.
   - consolidate the various channels specs via a sport of rearranging so only
     one version is needed.
 * atlas ph sensor
   - add select IRQ_WORK
 * hmc8543 (soon to move out of staging)
   - Comment style fixes
   - functionality of suspend and resume was swapped.
 * spear-adc
   - use devm_clk_dev instead of managing the clk lifetime by hand.
 
 Core
 * Use new dmaengine_terminate_sync call to avoid a theoretical race.
 * Fix docs for mlock in struct iio_dev as it is correctly taken in some
   drivers (docs used to say for core only).
 * Add a helper function for calculating the scan index storage size within
   the core cutting out some cut and paste versions of the same code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWwJeMAAoJEFSFNJnE9BaI9N8P/3nvhVTXXTkwl8UF22dAyRhP
 l6Szj8vk6M9yJ0z8sBPPzKRoPOESuZU/N8BndN5w17Em3fU9k3Qe6CaUYGTKziFt
 hzuL1ySpnrGphKZR6AfONKR6m+yfk+PYVPJlMG1EEdop2nkMyezoZxh9yjNXfm9H
 gekh41rz8LrAluG4n88XdJMzIGBRfup7PPt+sJ5Ao6AMrrQVrx4DA+dTaoVJ50ED
 rvh1DIwUDH158a27Wgc5QgxyA2dSL+65KiD6HR69XKq3exUZ6AlvXHCHwOZR8/xp
 /MtBNP7V9C0vO7PBNIxRQWIdsLRQdfaiCJSWEHH1lqxQK2S6DFYzSXFCA8lQ448Q
 1qH8G2JiYzbzPVX9noXvuQJJYnGa1xsKvdOGFzi/mRXEGTaygPVYEjn2JN4WzRho
 zgAdLdI6RkPVuqDp7Mliu8lsC9giQoLD22Ln2z9AzF1PDMrCD+p2Ff+q+1xQip/q
 8B8AMniPkK8Bn5mMAGPrN6FqUt5cqtnRkECC/Yzg8B21qLcefeFmcwSecmOrd331
 +7PWWDOWCmHVMweo9whZhaS3yZFNerl7G2DzwDI76So+eeBFikFvgitTMbuWWlyG
 SXMqUqfelBs3SpftKlAKXxZ4PK/MEo45LzNSfbi0J69zpIFTqICR9nnN8/rN9ew0
 KhZtcL9Q1H6yJwGuefdp
 =LIQe
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

2nd round of new IIO device support, features and cleanups for the 4.6 cycle.

New Device Support
* Apex stx104 DAC
  - new driver for this PC104 board. Right now DAC support only.
* ADI ad5064
  - Add support for ad5625, ad5627, ad5645, ad5665, ad5667 DACs.
  - Add support for Linear Technology ltc2606, ltc2607, ltc2609, ltc2616,
    ltc2617, ltc2619, ltc2626, ltc2627 and ltc2629.
* ADI ad7192
  - add support for the ad7193
* Invensense mpu6050
  - substantial rework of driver to use regmap allowing SPI support extending
    the now split driver to cover the MPU6000.
* TI adc0832
  - new driver supporting ADC0831, ADC0832, ADC0834 and ADC0838 ADCs.
* TI ads1015
  - new driver, note that there is an existing hwmon driver. The long term
    intention is to probably remove the hwmon driver but for now we just have
    guards in place to ensure this driver is not built if that one is enabled.
* TI afe4403
  - new driver for this heart rate monitor / pulse oximeter front end chip.
* TI afe4404
  - new driver for this heart rate monitor / pulse oximeter front end chip.

Staging Graduations
* mxs-lradc
  - A combined general purpose and touch screen (input) device driver.
    Originally held in staging to allow reworking into and MFD but as
    that wasn't happening and isn't an absolute requirement we are moving
    it out of staging.

Driver new features
* ms5611
  - triggered buffer support
  - IIO_CHAN_INFO_SCALE to aid the triggered buffer support.

Driver cleanups / reworks / fixes
* ad5064
  - Use an enum for the register map layout to allow support of additional
    chips (precursor to the new support listed above).
  - Structural driver changes to allow support of the slightly different
    handling for the ltc parts above.
* ad5933
  - drop an exceptional & unnecessary for a function pointer.
* ad7606
  - Cleanup the repeated copies of pm ops.
  - consolidate the various channels specs via a sport of rearranging so only
    one version is needed.
* atlas ph sensor
  - add select IRQ_WORK
* hmc8543 (soon to move out of staging)
  - Comment style fixes
  - functionality of suspend and resume was swapped.
* spear-adc
  - use devm_clk_dev instead of managing the clk lifetime by hand.

Core
* Use new dmaengine_terminate_sync call to avoid a theoretical race.
* Fix docs for mlock in struct iio_dev as it is correctly taken in some
  drivers (docs used to say for core only).
* Add a helper function for calculating the scan index storage size within
  the core cutting out some cut and paste versions of the same code.
2016-02-14 11:10:38 -08:00
Ksenija Stanojevic f836c45922 iio: adc: Move mxs-lradc out of staging
Move mxs-lradc driver from drivers/staging/iio/adc to drivers/iio/adc.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-10 19:29:37 +00:00
Lars-Peter Clausen d69051b401 staging:iio:ad7192: Add support for the AD7193
The AD7193 is mostly register map compatible to the AD7192. The main
difference is that it has 8 instead of 4 inputs, so the way the input
channels are selected is slightly different.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-09 22:03:43 +00:00
Greg Kroah-Hartman 5982557ac6 Second set of IIO fixes for the 4.5 cycle. These ones are mostly
dependent on patches from the recent merge cycle.
 
 * adc, imu and iio staging drivers
   - !HAS_IOMEM dependency fixes
 * dht11
   - use boottime clock for time measurement to avoid incorrect measurements
    due to clock updates.
 * lidar
   - correct a return value for short i2c transfers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWr72hAAoJEFSFNJnE9BaILWsP/3hVDegr+6TRoVgqqfk8USz2
 Jb3omDrxvb1LDlMgR5sbwYMQw3JKg9Dn6ACPtsFJ4kdOHvZ/xQ5dzwKXuUTe9MfB
 ij3gl1/wO6czUvdW0FYEKwMHORh/z5ILKaVS/lOPjeJnRPhFD4GNRo3nM6qQ/le8
 nl/Q1RB1ONml0EKzWgQrcFAzdRessPU3ALsvXrmJQVn6Ah1fYcig46/jn/PZ8/iO
 1/9lgROCo78vwHMvu1vuBI/pjfm0Ry/AB1WTGrjquMY4Q/kEwM18qE2I4lRfoQSd
 3N9DvGkfhkmLpnqag3ujC5uVtMJK/SUlK5DPaAsLT7PtTuQ75UQfFZpy0syANfbD
 lLVnKqMBbTWpetin8butW1OBgKaCWukq9zvFvsp1ZbbxJIEeYaIF6vdkcVyn66j/
 O3u45zdbL0WrhvPZrQRbTa3jdXLVMe4psaBWF1fhBW/+8tYEpPzddHuE2miyVHP8
 2uxg7H+UR7WRJyZ20BzF18G1AFjtAouzuVtWtPEAw2z8BbtMfAf9g+02xHhwYmVd
 USdPfVHhAmYgFsgfRLRZRmbiSlg/SzBHK0RVS9ZwXsh3nnPvuYflfT/bCXxGvBzI
 j8pVAAkfrnTItKuFQ2rTgQ23JUHdOdmwkYtrMa6bHuFCCN6kIH8BTVxwGexEhE5U
 tBTWNHQxx/N1VhtY7BQG
 =iF19
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-4.5b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

Second set of IIO fixes for the 4.5 cycle.  These ones are mostly
dependent on patches from the recent merge cycle.

* adc, imu and iio staging drivers
  - !HAS_IOMEM dependency fixes
* dht11
  - use boottime clock for time measurement to avoid incorrect measurements
   due to clock updates.
* lidar
  - correct a return value for short i2c transfers.
2016-02-01 13:08:26 -08:00
Richard Weinberger e884cebf9e staging: iio: Fix dependencies for !HAS_IOMEM archs
Not every arch has io memory.
So, unbreak the build by fixing the dependencies.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-01-30 15:47:51 +00:00
Michal Marek 0046a46a8f staging/ad7606: Actually build the interface modules
The ad7606_par and ad7606_spi drivers are not built if CONFIG_AD7606=m,
because kbuild does not currently support <objname>-m syntax. Even if we
add kbuild support, ad7606 fails to link, because of duplicate
module_init definitions. Make the two drivers separate modules, as the
Kconfig help text already suggests.

Also, CONFIG_IIO_BUFFER is a dependency of CONFIG_AD7606, so there is no
need to test for it in the Makefile.

Signed-off-by: Michal Marek <mmarek@suse.com>
2015-11-25 11:23:23 +01:00
Geert Uytterhoeven 9291766476 Staging: iio: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-10 20:31:43 +01:00
Vaishali Thakkar e245b90418 Staging: iio: adc: Update Kconfig entries adding module name information
This patch fixes the following checkpatch.pl warning:

WARNING: please write a paragraph that describes the config symbol fully

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 10:06:10 -07:00
Chen Gang 90c5f2d1b8 staging:iio:adc:Kconfig: Let MXS_LRADC depend on HAS_IOMEM
MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM

The related error (with allmodconfig under score):

    MODPOST 1365 modules
  ERROR: "devm_ioremap_resource" [drivers/staging/iio/adc/mxs-lradc.ko] undefined!

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-13 19:44:02 +01:00
Lars-Peter Clausen 3b1cae7c2c staging:iio:ad7291: Move out of staging
The ad7291 driver is in a reasonable shape. It does not use non-standard API/ABI
and there are no major style issues with the driver. So this patch moves it out
of staging.

There is one small warning from checkpatch which is also fixed in this patch.
The patch also sorts the #include directives in alphabetical order.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-08 21:17:30 +01:00
Lars-Peter Clausen bd75afaa31 staging:iio: Move ad799x driver out of staging
The driver is now at a reasonable quality level. Move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-16 18:00:34 +00:00
Lars-Peter Clausen 396590b3bc staging:iio:ad799x: Move ring functions to the main file
The ad799x_ring.c file is pretty much only one function these days. No need to
keep it in a separate file. Since there is then only one user of the header left
also move everything from the header to the main file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-16 18:00:33 +00:00
Richard Weinberger 5f53f52c02 staging,lpc32xx_adc: Add dependency on HAS_IOMEM
On archs like S390 or um this driver cannot build nor work.
Make it depend on HAS_IOMEM to bypass build failures.

drivers/built-in.o: In function `lpc32xx_adc_probe':
drivers/staging/iio/adc/lpc32xx_adc.c:149: undefined reference to `devm_ioremap'

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-15 14:51:22 -08:00
Richard Weinberger e4592fdd07 staging,spear_adc: Add dependency on HAS_IOMEM
On archs like S390 or um this driver cannot build nor work.
Make it depend on HAS_IOMEM to bypass build failures.

drivers/staging/iio/adc/spear_adc.c: In function ‘spear_adc_probe’:
drivers/staging/iio/adc/spear_adc.c:393:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-15 14:51:22 -08:00
Randy Dunlap 2ab61fa047 staging/iio/adc: MXS_LRADC depends on INPUT
mxs-lradc.c uses many input_() functions so it should
depend on INPUT to fix build errors.

drivers/built-in.o: In function `mxs_lradc_ts_unregister':
drivers/staging/iio/adc/mxs-lradc.c:905: undefined reference to `input_unregister_device'
drivers/staging/iio/adc/mxs-lradc.c:905: undefined reference to `input_unregister_device'
drivers/built-in.o: In function `input_report_abs':
include/linux/input.h:399: undefined reference to `input_event'
include/linux/input.h:399: undefined reference to `input_event'
include/linux/input.h:399: undefined reference to `input_event'
drivers/built-in.o: In function `input_report_key':
include/linux/input.h:389: undefined reference to `input_event'
drivers/built-in.o: In function `input_sync':
include/linux/input.h:414: undefined reference to `input_event'
drivers/built-in.o:include/linux/input.h:389: more undefined references to `input_event' follow

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-23 16:53:29 +01:00
Lars-Peter Clausen ef4d4d1b8f staging:iio: Allow to build SoC specific drivers when COMPILE_TEST is set
None of the SPEAr, LPC32XX or MXS ADC drivers have a compile time dependency on
their respective platform. So make it possible to build the drivers when
CONFIG_COMPILE_TEST is set. This makes it easier to compile test changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Lars-Peter Clausen 2cd1e1d8c1 staging:iio:mxs-lradc: Select STMP_DEVICE
The MXS ADC driver uses the stmp_reset_block() which is only provided when the
STMP_DEVICE Kconfig symbol is selected. Hence the driver should select this
symbol. So far this has not been a problem since the driver depends on ARCH_MXS,
which already selects STMP_DEVICE, but will become necessary once we allow the
driver to be built when COMPILE_TEST is selected.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Linus Torvalds 5647ac0ad4 Removal of GENERIC_GPIO for v3.10
GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any valid
 cases for enableing GENERIC_GPIO without GPIOLIB, even though it is
 possible to do so which has been causing confusion and breakage. This
 branch does the work to completely eliminate GENERIC_GPIO.
 
 However, it is not trivial to just create a branch to remove it. Over
 the course of the v3.9 cycle more code referencing GENERIC_GPIO has been
 added to linux-next that conflicts with this branch. The following must
 be done to resolve the conflicts when merging this branch into mainline:
 
 * "git grep CONFIG_GENERIC_GPIO" should return 0 hits. Matches should be
   replaced with CONFIG_GPIOLIB
 * "git grep '\bGENERIC_GPIO\b'" should return 1 hit in the Chinese
   documentation.
 * Selectors of GENERIC_GPIO should be turned into selectors of GPIOLIB
 * definitions of the option in architecture Kconfig code should be deleted.
 
 Stephen has 3 merge fixup patches[1] that do the above. They are currently
 applicable on mainline as of May 2nd.
 
 [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg428056.html
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRifUnAAoJEEFnBt12D9kBs2YP/0U6+ia+xYvkVaJc28PDVIzn
 OReZNcJOYU8D5voxz0voaRD0EdcPwjbMu9Kp9aXMHlk4VxevF+8jCc/us0bIjtO1
 VcB5VmSCIhMhxdnBlum11Mk7Vr5MCweyl9NBsypnPt8cl4obMBZHf2yzoodFktNb
 wtyYlOb6FALtc6iDbOO6dG3w9F7FAOLvskUFzdv89m8mupTsBu9jw9NqFDbJHOex
 rxq0Sdd+kWF/nkJVcV5Y6jIdletRlhpipefMJ9diexreHvwqh+c4kJEYZaXgB5+m
 ha95cPbReK1d+RqzM3A8d4irzSVSmq4k7ijI6QkFOr48+AH7XsgKv5so885LKzMN
 IIXg2Phm9i0H8+ecEvhcc4oIYBHJiEKK54Y0qUD9dqbFoDGPTCSqMHdSSMbpAY+J
 bIIXlVzj1En3PPNUJLPt8q8Qz6WxCT9mDST3QSGYnD4o90HT+1R9j92RxGL6McOq
 rUOyJDwmzFvpBvKK4raGdOU435M+ps2NPKKNIRaIGQPPY9rM1kN4YqvhXukEsC9L
 3a3+3cQLh7iKxBHncxeQsJfethP1CPkJnzvF9r+ZZLf2rcPH4pbQIE2uO0XnX/nd
 5/DKi0nGgAJ//GMMzdo3RiOA5zGFjIZ/KMvfhQldpP6qFJRhqdGi6FPlAcwr1z1n
 YnCByPwwlvfC4LTXFOGL
 =xodc
 -----END PGP SIGNATURE-----

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux

Pull removal of GENERIC_GPIO from Grant Likely:
 "GENERIC_GPIO now synonymous with GPIOLIB.  There are no longer any
  valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
  is possible to do so which has been causing confusion and breakage.
  This branch does the work to completely eliminate GENERIC_GPIO."

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
  gpio: update gpio Chinese documentation
  Remove GENERIC_GPIO config option
  Convert selectors of GENERIC_GPIO to GPIOLIB
  blackfin: force use of gpiolib
  m68k: coldfire: use gpiolib
  mips: pnx833x: remove requirement for GENERIC_GPIO
  openrisc: default GENERIC_GPIO to false
  avr32: default GENERIC_GPIO to false
  xtensa: remove explicit selection of GENERIC_GPIO
  sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
  powerpc: remove redundant GENERIC_GPIO selection
  unicore32: default GENERIC_GPIO to false
  unicore32: remove unneeded select GENERIC_GPIO
  arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
  arm: remove redundant GENERIC_GPIO selection
  mips: alchemy: require gpiolib
  mips: txx9: change GENERIC_GPIO to GPIOLIB
  mips: loongson: use GPIO driver on CONFIG_GPIOLIB
  mips: remove redundant GENERIC_GPIO select
2013-05-09 09:59:16 -07:00
Alexandre Courbot 76ec9d18b8 Convert selectors of GENERIC_GPIO to GPIOLIB
GENERIC_GPIO is now equivalent to GPIOLIB and features that depended on
GENERIC_GPIO can now depend on GPIOLIB to allow removal of this option.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
2013-04-16 18:47:14 +09:00
Lars-Peter Clausen cddc1424f3 staging:iio: Remove adt7410 driver
The adt7410 hwmon driver is feature wise more or less on par with the IIO
driver. So we can finally remove the IIO driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-03-16 10:17:57 +00:00
Marek Vasut 5e1f9aca0a iio: mxs: Add MX23 support into the IIO driver
This patch adds support for i.MX23 into the LRADC driver. The LRADC
block on MX23 is not much different from the one on MX28, thus this
is only a few changes fixing the parts that are specific to MX23.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-01-26 10:07:53 +00:00
Lars-Peter Clausen f87f1a2375 staging:iio: Move ad7793 driver out of staging
The driver does not expose any custom API to userspace and none of the standard
static code checker tools report any issues, so move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-30 12:57:08 +00:00
Lars-Peter Clausen 709ab36e95 staging:iio: Move the ad7298 driver out of staging
The driver does not expose any custom API to userspace and none of the standard
static code checker tools report any issues, so move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-19 22:22:15 +00:00
Lars-Peter Clausen dc4871adf9 staging:iio:ad7298: Squash everything into one file
The recent cleanups have decimated the drivers code size by quite a bit. It is
only a few hundred lines in total now. Putting everything into one file also
allows to reduce the code size a bit more by removing a few lines of boilerplate
code. The only functional change made by this patch is that we now always
include buffer support, instead of making it optional. This is more consistent
with what we do for other drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-19 22:22:14 +00:00
Jonathan Cameron 168c9d95a9 iio:adc:max1363 move from staging.
Now this driver is using kfifo we can move it out of staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-10 10:17:31 +00:00
Jonathan Cameron b3bcbfcfec staging:iio:adc:max1363 consolidate files.
For a long while now the max1363 core has selected the
buffer anyway. For a while I meant to make the separation
work again, but given how long it has been it is probably
time to conclude it will never happen and settle for tidying
up what we have.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-10 10:17:28 +00:00
Jonathan Cameron 0d331e4fd2 staging:iio:adc:max1363 ring_sw->kfifo conversion
We are moving towards scrapping ring_sw so this move
is necessary.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-10 10:17:28 +00:00
Lars-Peter Clausen 4eb3ccf157 staging:iio: Move the ad7887 driver out of staging
The driver does not expose any custom API to userspace and none of the standard
static code checker tools report any issues, so move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:54 +00:00
Lars-Peter Clausen 2b0c856ad9 staging:iio: Consolidate adt7310 and adt7410 driver
The adt7310 is the SPI version of the adt7410, so there is no need to have a
separate driver for it. The register map layout is a bit different, i.e. the
addresses of the register differ, but the individual register layouts are
identical. We solve this by adding a small look-up table, which translates
adt7410 register addresses to ad7310 register addresses.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-10-31 10:40:34 +00:00
Lars-Peter Clausen 7aecec986e staging:iio:ad7780: Add support for the ad7170/ad7171
The ad7170/ad7171 have a software interface similar to the ad7780. They do not
have an external pin which allows to change the internal gain and the what is
used for the gain bit in the ad7780/ad7781 becomes part of the check pattern.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-22 10:25:32 +01:00
Lars-Peter Clausen 968f3d5ba0 iio: Move ad7476 driver out of staging
The ad7476 driver is a driver for simple single channel ADCs. The driver does
not export any experimental or custom ABI files nor do the static code check
tools report any issues, so move the driver out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:02:14 +01:00
Lars-Peter Clausen 8c29ecd362 staging:iio:ad7793: Add ad7785 support
The ad7785 is similar to the ad7792/ad7793, but has 20 bit wide data samples.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-27 18:10:55 +01:00
Lars-Peter Clausen 525e643e48 staging:iio:ad7793: Add support for ad7794/ad7795
The ad7794/ad7795 are similar to the ad7792/ad7793, but have 6 channels instead
of 3.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-27 18:10:42 +01:00
Lars-Peter Clausen 3f7c3306cf staging:iio:ad7192: Use common Sigma Delta library
Convert the ad7192 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-27 18:10:40 +01:00
Lars-Peter Clausen 1abec6ac69 staging:iio:ad7793: Use common Sigma Delta library
Convert the ad7793 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-27 18:10:36 +01:00
Lars-Peter Clausen 32e0e7e08c staging:iio:ad7780: Use common Sigma Delta library
Convert the ad7780 driver to make use of the new common code for devices from
the Analog Devices Sigma Delta family.

As a bonus the ad7780 driver gains support for buffered mode. Although this is a
bit tricky. The ad7780 reports in the lower 4 unused bits of the data word the
internal gain used. The driver will update the scale attribute value depending
on the gain accordingly, but obviously this will only work if the gain does not
change while sampling. This is not perfect, but since we store the raw value in
the buffer an application which is aware of this can extract the gain factor
from the buffer as well an apply it accordingly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-27 17:53:24 +01:00
Marek Vasut bc2c90c974 IIO: Add basic MXS LRADC driver
This driver is very basic. It supports userland trigger, buffer and
raw access to channels. The support for delay channels is missing
altogether.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Juergen Beisert <jbe@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Wolfgang Denk <wd@denx.de>
2012-08-16 20:18:38 +01:00
Lars-Peter Clausen ae3805c3ae staging:iio:adc:ad799x: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:10 -07:00
Lars-Peter Clausen cc4dd03a6a staging:iio:adc:ad7887: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:10 -07:00
Lars-Peter Clausen 82796edca9 staging:iio:adc:ad7793: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:10 -07:00
Lars-Peter Clausen 74ed964931 staging:iio:adc:ad7606: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:10 -07:00
Lars-Peter Clausen 397b85dd86 staging:iio:adc:ad7476: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:10 -07:00
Lars-Peter Clausen d045b9d21b staging:iio:adc:ad7298: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

The previous code was not passing the temperature channel to iio_buffer_register
since the temperature channel can not be used in buffered mode. With the new
helper functions it is not possible to do this, instead the scan index for the
temperature channel is set to -1 which will cause iio_buffer_register to ignore
the channel. (Also While we are at it also assign the symbolic constant instead
of the raw value to the channel address for the temperature channel).

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:09 -07:00
Lars-Peter Clausen a648232dc5 staging:iio:adc:ad7192: Use new triggered buffer setup helper function
Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:26:09 -07:00
Lars-Peter Clausen 33735a94af staging:iio:ad7298: Fix linker error due to missing IIO kfifo buffer
The ad7298 drivers buffer implementation uses the IIO kfifo buffer, so it needs
to select IIO_KFIFO_BUF. Otherwise (if no other driver selects the symbol) the
following linker error will occur:

drivers/built-in.o: In function `ad7298_register_ring_funcs_and_init':
	(.text+0x245cf2): undefined reference to `iio_kfifo_allocate'
drivers/built-in.o: In function `ad7298_register_ring_funcs_and_init':
	(.text+0x245d7d): undefined reference to `iio_kfifo_free'
drivers/built-in.o: In function `ad7298_ring_cleanup':
	(.text+0x245dcd): undefined reference to `iio_kfifo_free'

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 11:12:19 -07:00
Michael Hennerich f316983fe0 staging: iio: adc: convert ADI drivers to use kfifo.
sw_ring is depreciated and therefore won't move out of staging.
Prerequisite for lifting affected drivers is to convert them to kfifo.
Update copyright.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-30 10:28:10 -04:00
Roland Stigge 5d4a6789d5 staging: iio: lpc32xx-adc: Remove driver conflict due to device tree
Previously, the touchscreen and ADC drivers of the LPC32xx SoC had a Kconfig
conflict declared because they use the same hardware. Upon the introduction of
device tree support in both drivers, the conflict must be removed to enable
the same kernel to support different hardware (configured via the device tree).

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-29 18:14:40 -07:00
Stefan Roese b3201b563d staging:iio:adc: Add SPEAr ADC driver
This patch implements the basic single data conversion support for
the SPEAr600 SoC ADC. The register layout of SPEAr600 differs a bit
from other SPEAr SoC variants (e.g. SPEAr3xx). These differences are
handled via DT compatible testing. Resulting in a multi-arch binary.

This driver is currently tested only on SPEAr600. Future patches may add
support for other SoC variants (SPEAr3xx) and features like software
buffer or DMA.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@st.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13 11:18:23 -07:00