From 1c84d904a5fb7e25dfba459c23fde964c0cde49e Mon Sep 17 00:00:00 2001 From: Fabrice Gasnier Date: Mon, 12 Nov 2018 14:03:59 +0100 Subject: [PATCH] cmd: adc: add info on channel mask Enhance adc info command to report also the channel mask. Signed-off-by: Fabrice Gasnier Reviewed-by: Simon Glass --- cmd/adc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.5