All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 1/3] test: dm: adc: use the real device name
Date: Wed, 19 Jun 2019 02:17:59 +0000	[thread overview]
Message-ID: <AM0PR04MB4481E6626F10B9C3C794724A88E50@AM0PR04MB4481.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190522072201.5130-1-peng.fan@nxp.com>

Hi Simon, Tom
> Subject: [PATCH V2 1/3] test: dm: adc: use the real device name
> 
> "adc" is not the real device name, "adc at 0" is.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Will you pick up this patchset?
https://patchwork.ozlabs.org/patch/1103212/
https://patchwork.ozlabs.org/patch/1103213/
https://patchwork.ozlabs.org/patch/1103214/

Thanks,
Peng.

> ---
> 
> V2:
>  new
> 
>  test/dm/adc.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/test/dm/adc.c b/test/dm/adc.c index 1f82304f41..da7bd4bf1f
> 100644
> --- a/test/dm/adc.c
> +++ b/test/dm/adc.c
> @@ -24,7 +24,7 @@ static int dm_test_adc_bind(struct unit_test_state *uts)
>  	struct udevice *dev;
>  	unsigned int channel_mask;
> 
> -	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
> +	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc at 0",
> &dev));
>  	ut_asserteq_str(SANDBOX_ADC_DEVNAME, dev->name);
> 
>  	ut_assertok(adc_channel_mask(dev, &channel_mask)); @@ -38,7 +38,7
> @@ static int dm_test_adc_wrong_channel_selection(struct unit_test_state
> *uts)  {
>  	struct udevice *dev;
> 
> -	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
> +	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc at 0",
> &dev));
>  	ut_asserteq(-EINVAL, adc_start_channel(dev,
> SANDBOX_ADC_CHANNELS));
> 
>  	return 0;
> @@ -51,7 +51,7 @@ static int dm_test_adc_supply(struct unit_test_state
> *uts)
>  	struct udevice *dev;
>  	int uV;
> 
> -	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
> +	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc at 0",
> &dev));
> 
>  	/* Test Vss value - predefined 0 uV */
>  	ut_assertok(adc_vss_value(dev, &uV));
> @@ -94,7 +94,7 @@ static int
> dm_test_adc_single_channel_conversion(struct unit_test_state *uts)
>  	unsigned int i, data;
>  	struct udevice *dev;
> 
> -	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
> +	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc at 0",
> &dev));
>  	/* Test each ADC channel's value */
>  	for (i = 0; i < SANDBOX_ADC_CHANNELS; i++, tdata++) {
>  		ut_assertok(adc_start_channel(dev, tdata->id)); @@ -117,7 +117,7
> @@ static int dm_test_adc_multi_channel_conversion(struct unit_test_state
> *uts)
>  		       ADC_CHANNEL(2) | ADC_CHANNEL(3);
> 
>  	/* Start multi channel conversion */
> -	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
> +	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc at 0",
> &dev));
>  	ut_assertok(adc_start_channels(dev, channel_mask));
>  	ut_assertok(adc_channels_data(dev, channel_mask, channels));
> 
> @@ -136,7 +136,7 @@ static int dm_test_adc_single_channel_shot(struct
> unit_test_state *uts)
> 
>  	for (i = 0; i < SANDBOX_ADC_CHANNELS; i++, tdata++) {
>  		/* Start single channel conversion */
> -		ut_assertok(adc_channel_single_shot("adc", tdata->id, &data));
> +		ut_assertok(adc_channel_single_shot("adc at 0", tdata->id, &data));
>  		/* Compare the expected and returned conversion data. */
>  		ut_asserteq(tdata->data, data);
>  	}
> @@ -155,7 +155,7 @@ static int dm_test_adc_multi_channel_shot(struct
> unit_test_state *uts)
>  		       ADC_CHANNEL(2) | ADC_CHANNEL(3);
> 
>  	/* Start single call and multi channel conversion */
> -	ut_assertok(adc_channels_single_shot("adc", channel_mask, channels));
> +	ut_assertok(adc_channels_single_shot("adc at 0", channel_mask,
> +channels));
> 
>  	/* Compare the expected and returned conversion data. */
>  	for (i = 0; i < SANDBOX_ADC_CHANNELS; i++, tdata++) @@ -183,7
> +183,7 @@ static int dm_test_adc_raw_to_uV(struct unit_test_state *uts)
>  	struct udevice *dev;
>  	int uV;
> 
> -	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
> +	ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc at 0",
> &dev));
>  	/* Test each ADC channel's value in microvolts */
>  	for (i = 0; i < SANDBOX_ADC_CHANNELS; i++, tdata++) {
>  		ut_assertok(adc_start_channel(dev, tdata->id));
> --
> 2.16.4

  parent reply	other threads:[~2019-06-19  2:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  7:08 [U-Boot] [PATCH V2 1/3] test: dm: adc: use the real device name Peng Fan
2019-05-22  7:08 ` [U-Boot] [PATCH V2 2/3] test: dm: usb: " Peng Fan
2019-05-22  7:50   ` Bin Meng
2019-07-14 13:07   ` Tom Rini
2019-05-22  7:08 ` [U-Boot] [PATCH V2 3/3] drivers: core: use strcmp when find device by name Peng Fan
2019-05-22  7:50   ` Bin Meng
2019-07-14 13:07   ` Tom Rini
2019-05-22  7:49 ` [U-Boot] [PATCH V2 1/3] test: dm: adc: use the real device name Bin Meng
2019-06-19  2:17 ` Peng Fan [this message]
2019-06-24 15:52   ` Tom Rini
2019-06-25  5:45     ` Peng Fan
2019-07-14 13:06 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR04MB4481E6626F10B9C3C794724A88E50@AM0PR04MB4481.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.