mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
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>
This commit is contained in:
parent
63f004e7aa
commit
1c84d904a5
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue