mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
staging:iio:resolver:ad2s1210 general driver cleanup.
Note I haven't made any changes to the userspace interface as yet. This is all about cleaning up what was actually there (handling all errors etc). Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
937a960121
commit
b19e9ad5e2
3 changed files with 415 additions and 483 deletions
|
@ -25,30 +25,3 @@ config AD2S1210
|
||||||
Say yes here to build support for Analog Devices spi resolver
|
Say yes here to build support for Analog Devices spi resolver
|
||||||
to digital converters, ad2s1210, provides direct access via sysfs.
|
to digital converters, ad2s1210, provides direct access via sysfs.
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Resolution Control"
|
|
||||||
depends on AD2S1210
|
|
||||||
default AD2S1210_GPIO_NONE
|
|
||||||
help
|
|
||||||
In normal mode, the resolution of the digital output is selected
|
|
||||||
using the RES0 and RES1 input pins. In configuration mode, the
|
|
||||||
resolution is selected by setting the RES0 and RES1 bits in the
|
|
||||||
control regsiter. When switching between normal mode and configuration
|
|
||||||
mode, there are some schemes to keep them matchs.
|
|
||||||
|
|
||||||
config AD2S1210_GPIO_INPUT
|
|
||||||
bool "read resolution from gpio pins"
|
|
||||||
help
|
|
||||||
GPIO pins are sampling RES0 and RES1 pins, read the resolution
|
|
||||||
settings from the GPIO pins.
|
|
||||||
|
|
||||||
config AD2S1210_GPIO_OUTPUT
|
|
||||||
bool "set gpio pins to set resolution"
|
|
||||||
help
|
|
||||||
RES0 and RES1 pins are controlled by GPIOs, setting GPIO pins to
|
|
||||||
set the resolution.
|
|
||||||
|
|
||||||
config AD2S1210_GPIO_NONE
|
|
||||||
bool "take the responsibility by user"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
17
drivers/staging/iio/resolver/ad2s1210.h
Normal file
17
drivers/staging/iio/resolver/ad2s1210.h
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* ad2s1210.h plaform data for the ADI Resolver to Digital Converters:
|
||||||
|
* AD2S1210
|
||||||
|
*
|
||||||
|
* Copyright (c) 2010-2010 Analog Devices Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct ad2s1210_platform_data {
|
||||||
|
unsigned sample;
|
||||||
|
unsigned a[2];
|
||||||
|
unsigned res[2];
|
||||||
|
bool gpioin;
|
||||||
|
};
|
Loading…
Reference in a new issue