u-boot-brain/include/dm
Przemyslaw Marczak 5decbf5300 dm: adc: add simple ADC uclass implementation
This commit adds:
- new uclass id: UCLASS_ADC
- new uclass driver: drivers/adc/adc-uclass.c

The new uclass's API allows for ADC operation on:
* single-channel with channel selection by a number
* multti-channel with channel selection by bit mask

ADC uclass's functions:
* single-channel:
  - adc_start_channel()        - start channel conversion
  - adc_channel_data()         - get conversion data
  - adc_channel_single_shot()  - start/get conversion data
* multi-channel:
  - adc_start_channels()       - start selected channels conversion
  - adc_channels_data()        - get conversion data
  - adc_channels_single_shot() - start/get conversion data for channels
                                 selected by bit mask
* general:
  - adc_stop()      - stop the conversion
  - adc_vdd_value() - positive reference Voltage value with polarity [uV]
  - adc_vss_value() - negative reference Voltage value with polarity [uV]
  - adc_data_mask() - conversion data bit mask

The device tree can provide below constraints/properties:
- vdd-polarity-negative: if true: Vdd = vdd-microvolts * (-1)
- vss-polarity-negative: if true: Vss = vss-microvolts * (-1)
- vdd-supply:            phandle to Vdd regulator's node
- vss-supply:            phandle to Vss regulator's node
And optional, checked only if the above corresponding, doesn't exist:
  - vdd-microvolts:      positive reference Voltage [uV]
  - vss-microvolts:      negative reference Voltage [uV]

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2015-11-02 10:38:00 +09:00
..
platform_data serial: uniphier: drop platform data support 2015-08-31 00:28:46 +09:00
device-internal.h dm: core: allow device_bind() to not return a device pointer 2015-08-31 07:57:29 -06:00
device.h dm: core: Tidy up comments in device.h 2015-10-23 09:42:28 -06:00
lists.h dm: core: allow device_bind() to not return a device pointer 2015-08-31 07:57:29 -06:00
pinctrl.h pinctrl: Add the concept of peripheral IDs 2015-09-02 21:28:22 -06:00
platdata.h dm: Add platform data advice and admonishment 2015-07-21 17:39:30 -06:00
root.h dm: Add dm_scan_other() to locate board-specific devices 2014-07-23 14:08:37 +01:00
test.h test: dm: Move the dm tests over to the ut command 2015-05-21 09:16:17 -04:00
uclass-id.h dm: adc: add simple ADC uclass implementation 2015-11-02 10:38:00 +09:00
uclass-internal.h dm: drop CONFIG_DM_DEVICE_REMOVE from uncmd list 2015-08-18 13:46:04 -04:00
uclass.h dm: simplify uclass_foreach_dev() implementation 2015-08-31 07:56:44 -06:00
util.h devres: add debug command to dump device resources 2015-08-06 07:44:29 -06:00