summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2018-11-12 14:03:59 +0100
committerTom Rini <trini@konsulko.com>2018-11-20 12:35:34 -0500
commit1c84d904a5fb7e25dfba459c23fde964c0cde49e (patch)
treee59ecb32e5cd82ec767d9dcf7c9b1427243d5f15 /cmd
parent63f004e7aae17a6b6048c88ce7e39d64e58c08c1 (diff)
cmd: adc: add info on channel mask
Enhance adc info command to report also the channel mask. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/adc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/adc.c b/cmd/adc.c
index c8857ed147..39f61c13b2 100644
--- a/cmd/adc.c
+++ b/cmd/adc.c
@@ -35,7 +35,7 @@ static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- unsigned int data_mask;
+ unsigned int data_mask, ch_mask;
int ret, vss, vdd;
if (argc < 2)
@@ -49,6 +49,10 @@ static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
printf("ADC Device '%s' :\n", argv[1]);
+ ret = adc_channel_mask(dev, &ch_mask);
+ if (!ret)
+ printf("channel mask: %x\n", ch_mask);
+
ret = adc_data_mask(dev, &data_mask);
if (!ret)
printf("data mask: %x\n", data_mask);