Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: drivers: build_all: adc: Add spi-devices build test #78580

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/adc/Kconfig.ads1112
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
config ADC_ADS1112
bool "Texas Instruments ADS1112 ADC driver"
depends on DT_HAS_TI_ADS1112_ENABLED
default y
select I2C
select ADC_CONFIGURABLE_INPUTS
help
Expand Down
4 changes: 0 additions & 4 deletions drivers/adc/adc_ads1112.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ static int ads1112_read_sample(const struct device *dev, uint16_t *buff)
{
int res;
uint8_t sample[2] = {0};
const struct ads1112_config *config = dev->config;

res = ads1112_read_reg(dev, ADS1112_REG_OUTPUT, sample);
buff[0] = sys_get_be16(sample);
Expand Down Expand Up @@ -263,8 +262,6 @@ static int ads1112_validate_buffer_size(const struct adc_sequence *sequence)

static int ads1112_validate_sequence(const struct device *dev, const struct adc_sequence *sequence)
{
const struct ads1112_data *data = dev->data;

if (sequence->channels != BIT(0)) {
LOG_ERR("Invalid Channel 0x%x", sequence->channels);
return -EINVAL;
Expand Down Expand Up @@ -360,7 +357,6 @@ static int ads1112_read(const struct device *dev, const struct adc_sequence *seq
static int ads1112_init(const struct device *dev)
{
int rc = 0;
uint8_t status;
const struct ads1112_config *config = dev->config;
struct ads1112_data *data = dev->data;

Expand Down
6 changes: 6 additions & 0 deletions tests/drivers/build_all/adc/boards/native_sim.overlay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make commit title more specific about this device

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update done.
Thank you for your check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make commit title more specific about this device

Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
#io-channel-cells = <1>;
};
};

test_i2c_tla2021: tla2021@a {
compatible = "ti,tla2021";
reg = <0xa>;
#io-channel-cells = <1>;
};
};

test_spi: spi@33334444 {
Expand Down
Loading