Skip to content

Commit 02a11fc

Browse files
committed
drivers: adc: ad7124: fix device binding logic description
Fixed pd-switch-enable boolean logic description to the logic as decribed in the data sheet for the device. Also fixed some code compliance issues. Signed-off-by: NoahStephens <[email protected]>
1 parent 7ab37ef commit 02a11fc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/adc/adc_ad7124.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ LOG_MODULE_REGISTER(adc_ad7124, CONFIG_ADC_LOG_LEVEL);
125125
#define AD7124_IOUT1_CHANNEL_MSK GENMASK(7, 4)
126126
#define AD7124_IOUT0_CHANNEL_MSK GENMASK(3, 0)
127127
#define AD7124_IOUT_MSK \
128-
(AD7124_IO_CONTROL_1_REG_PDSW_EN, AD7124_IOUT1_CURRENT_MSK | AD7124_IOUT0_CURRENT_MSK | \
128+
(AD7124_IO_CONTROL_1_REG_PDSW_EN, AD7124_IOUT1_CURRENT_MSK | AD7124_IOUT0_CURRENT_MSK | \
129129
AD7124_IOUT1_CHANNEL_MSK | AD7124_IOUT0_CHANNEL_MSK)
130130

131131
/* Current source configuration bits */
@@ -1460,7 +1460,7 @@ static DEVICE_API(adc, adc_ad7124_api) = {
14601460
.power_mode = DT_INST_PROP(inst, power_mode), \
14611461
.active_device = DT_INST_PROP(inst, active_device), \
14621462
.ref_en = DT_INST_PROP(inst, reference_enable), \
1463-
.pdsw_en = DT_INST_PROP(inst, pd_switch_enable), \
1463+
.pdsw_en = DT_INST_PROP(inst, pd_switch_enable), \
14641464
}; \
14651465
static struct adc_ad7124_data adc_ad7124_data##inst = { \
14661466
ADC_CONTEXT_INIT_LOCK(adc_ad7124_data##inst, ctx), \

dts/bindings/adc/adi,ad7124-adc.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ properties:
2121
type: boolean
2222
default: false
2323
description: |
24-
Enable internal low side power switch for AD7124
25-
- true: The switch is in the open position
26-
- false: The switched is in the closed position
24+
Enable internal low-side power-down switch for AD7124
25+
- true: The switch is in the closed position
26+
- false: The switch is in the open position
2727
The default configuration places the switch in the
28-
closed position for control setup upon power-up
28+
open position for control setup upon power-up
2929
or after reset.
3030
3131
filter-type-mask:

0 commit comments

Comments
 (0)