Commit 70b6a17a authored by Benjamin Björnsson's avatar Benjamin Björnsson Committed by Carles Cufi
Browse files

tests: drivers: adc: adc_api: Move compat telink,b91-adc to DT



Move channel description to devicetree for telink,b91-adc
compatible to make the test more readable.

Signed-off-by: default avatarBenjamin Björnsson <benjamin.bjornsson@gmail.com>
parent c3c9ce5e
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
/*
 * SPDX-License-Identifier: Apache-2.0
 *
 * Copyright (c) 2023 Benjamin Björnsson <benjamin.bjornsson@gmail.com>
 */

/ {
	zephyr,user {
		io-channels = <&adc 0>;
	};
};

&adc {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	channel@0 {
		reg = <0>;
		zephyr,gain = "ADC_GAIN_1_4";
		zephyr,reference = "ADC_REF_INTERNAL";
		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
		zephyr,resolution = <12>;
		zephyr,input-positive = <15>;
	};
};
+0 −10
Original line number Diff line number Diff line
@@ -19,16 +19,6 @@
#define ADC_1ST_CHANNEL_ID	0
#define ADC_2ND_CHANNEL_ID	1

#elif defined(CONFIG_BOARD_TLSR9518ADK80D)

#define ADC_DEVICE_NODE		DT_INST(0, telink_b91_adc)
#define ADC_RESOLUTION		12
#define ADC_GAIN		ADC_GAIN_1_4
#define ADC_REFERENCE		ADC_REF_INTERNAL
#define ADC_ACQUISITION_TIME	ADC_ACQ_TIME_DEFAULT
#define ADC_1ST_CHANNEL_ID	0
#define ADC_1ST_CHANNEL_INPUT	0x0f

#elif defined(CONFIG_BOARD_GD32A503V_EVAL)

#define ADC_DEVICE_NODE		DT_INST(0, gd_gd32_adc)