summaryrefslogtreecommitdiff
path: root/include/adc.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /include/adc.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-release-R98-14388.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'include/adc.h')
-rw-r--r--include/adc.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/include/adc.h b/include/adc.h
deleted file mode 100644
index 8342bc1fb6..0000000000
--- a/include/adc.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright 2012 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* ADC interface for Chrome EC */
-
-#ifndef __CROS_EC_ADC_H
-#define __CROS_EC_ADC_H
-
-#include "adc_chip.h"
-#include "common.h"
-
-#define ADC_READ_ERROR -1 /* Value returned by adc_read_channel() on error */
-
-#ifdef CONFIG_ZEPHYR
-#include <zephyr_adc.h>
-#endif /* CONFIG_ZEPHYR */
-
-/*
- * Boards must provide this list of ADC channel definitions. This must match
- * the enum adc_channel list provided by the board.
- */
-#ifndef CONFIG_ADC_CHANNELS_RUNTIME_CONFIG
-extern const struct adc_t adc_channels[];
-#else
-extern struct adc_t adc_channels[];
-#endif
-
-/*
- * Boards which use the ADC interface must provide enum adc_channel in the
- * board.h file. See chip/$CHIP/adc_chip.h for additional chip-specific
- * requirements.
- */
-
-/**
- * Read an ADC channel.
- *
- * @param ch Channel to read
- *
- * @return The scaled ADC value, or ADC_READ_ERROR if error.
- */
-int adc_read_channel(enum adc_channel ch);
-
-/**
- * Enable ADC watchdog. Note that interrupts might come in repeatedly very
- * quickly when ADC output goes out of the accepted range.
- *
- * @param ain_id The AIN to be watched by the watchdog.
- * @param high The high threshold that the watchdog would trigger
- * an interrupt when exceeded.
- * @param low The low threshold.
- *
- * @return EC_SUCCESS, or non-zero if any error.
- */
-int adc_enable_watchdog(int ain_id, int high, int low);
-
-/**
- * Disable ADC watchdog.
- *
- * @return EC_SUCCESS, or non-zero if any error.
- */
-int adc_disable_watchdog(void);
-
-/**
- * Set the delay between ADC watchdog samples. This can be used as a trade-off
- * of power consumption and performance.
- *
- * @param delay_ms The delay in milliseconds between two ADC watchdog
- * samples.
- *
- * @return EC_SUCCESS, or non-zero if any error or not supported.
- */
-int adc_set_watchdog_delay(int delay_ms);
-
-#endif /* __CROS_EC_ADC_H */