fix(bvd): Add SENSOR_CHAN_ALL support
This commit is contained in:
parent
2f09957ae2
commit
1cd4abce00
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@ static int bvd_sample_fetch(struct device *dev, enum sensor_channel chan) {
|
|||
struct adc_sequence *as = &drv_data->as;
|
||||
|
||||
// Make sure selected channel is supported
|
||||
if (chan != SENSOR_CHAN_GAUGE_VOLTAGE && chan != SENSOR_CHAN_GAUGE_STATE_OF_CHARGE) {
|
||||
if (chan != SENSOR_CHAN_GAUGE_VOLTAGE && chan != SENSOR_CHAN_GAUGE_STATE_OF_CHARGE &&
|
||||
chan != SENSOR_CHAN_ALL) {
|
||||
LOG_DBG("Selected channel is not supported: %d.", chan);
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue