summaryrefslogtreecommitdiff
path: root/chip/mchp
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:18:56 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-01 12:49:17 +0000
commite33e72b54f0ce9876bba4f74d9376f12d4b94879 (patch)
tree17097f4563607cd1c224f5f1d61876e5d2cdbb29 /chip/mchp
parent101f0a45945b1b03f2b400452127bd6c2714aeac (diff)
downloadchrome-ec-e33e72b54f0ce9876bba4f74d9376f12d4b94879.tar.gz
chip/mchp/adc.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ifb591af36dd71ff47bfea2cdef8d398b1c61a89b Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729240 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'chip/mchp')
-rw-r--r--chip/mchp/adc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/chip/mchp/adc.c b/chip/mchp/adc.c
index 9de5476077..fb7b332d08 100644
--- a/chip/mchp/adc.c
+++ b/chip/mchp/adc.c
@@ -53,7 +53,7 @@ static int start_single_and_wait(int timeout)
/* clear GIRQ single status */
MCHP_INT_SOURCE(MCHP_ADC_GIRQ) = MCHP_ADC_GIRQ_SINGLE_BIT;
/* make sure all writes are issued before starting conversion */
- asm volatile ("dsb");
+ asm volatile("dsb");
/* Start conversion */
MCHP_ADC_CTRL |= BIT(1);
@@ -77,7 +77,8 @@ int adc_read_channel(enum adc_channel ch)
if (start_single_and_wait(ADC_SINGLE_READ_TIME))
value = (MCHP_ADC_READ(adc->channel) * adc->factor_mul) /
- adc->factor_div + adc->shift;
+ adc->factor_div +
+ adc->shift;
else
value = ADC_READ_ERROR;
@@ -105,7 +106,8 @@ int adc_read_all_channels(int *data)
for (i = 0; i < ADC_CH_COUNT; ++i) {
adc = adc_channels + i;
data[i] = (MCHP_ADC_READ(adc->channel) * adc->factor_mul) /
- adc->factor_div + adc->shift;
+ adc->factor_div +
+ adc->shift;
}
exit_all_channels: