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@0", &dev));
ut_asserteq_str(SANDBOX_ADC_DEVNAME, dev->name);
ut_assertok(adc_channel_mask(dev, &channel_mask));
{
struct udevice *dev;
- ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev));
+ ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc@0", &dev));
ut_asserteq(-EINVAL, adc_start_channel(dev, SANDBOX_ADC_CHANNELS));
return 0;
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@0", &dev));
/* Test Vss value - predefined 0 uV */
ut_assertok(adc_vss_value(dev, &uV));
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@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));
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@0", &dev));
ut_assertok(adc_start_channels(dev, channel_mask));
ut_assertok(adc_channels_data(dev, channel_mask, channels));
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@0", tdata->id, &data));
/* Compare the expected and returned conversion data. */
ut_asserteq(tdata->data, data);
}
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@0", channel_mask, channels));
/* Compare the expected and returned conversion data. */
for (i = 0; i < SANDBOX_ADC_CHANNELS; i++, tdata++)
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@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));