summaryrefslogtreecommitdiff
path: root/driver/ina3221.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 /driver/ina3221.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14411.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 'driver/ina3221.h')
-rw-r--r--driver/ina3221.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/driver/ina3221.h b/driver/ina3221.h
deleted file mode 100644
index 4d8c8211b4..0000000000
--- a/driver/ina3221.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright 2019 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.
- *
- * TI INA3221 Current/Power monitor driver.
- */
-
-#ifndef __CROS_EC_INA3221_H
-#define __CROS_EC_INA3221_H
-
-#define INA3221_REG_CONFIG 0x00
-#define INA3221_REG_MASK 0x0F
-
-/*
- * Common bits are:
- * Reset
- * average = 1
- * conversion time = 1.1 ms
- * mode = shunt and bus, continuous.
- */
-#define INA3221_CONFIG_BASE 0x8127
-
-/* Bus voltage: lower 3 bits clear, LSB = 8 mV */
-#define INA3221_BUS_MV(reg) (reg)
-/* Shunt voltage: lower 3 bits clear, LSB = 40 uV */
-#define INA3221_SHUNT_UV(reg) ((reg) * (40/8))
-
-enum ina3221_channel {
- INA3221_CHAN_1 = 0,
- INA3221_CHAN_2 = 1,
- INA3221_CHAN_3 = 2,
- INA3221_CHAN_COUNT = 3
-};
-
-/* Registers for each channel */
-enum ina3221_register {
- INA3221_SHUNT_VOLT = 0,
- INA3221_BUS_VOLT = 1,
- INA3221_CRITICAL = 2,
- INA3221_WARNING = 3,
- INA3221_MAX_REG = 4
-};
-
-/* Configuration table - defined in board file. */
-struct ina3221_t {
- int port; /* I2C port index */
- uint8_t address; /* I2C address */
- const char *name[INA3221_CHAN_COUNT]; /* Channel names */
-};
-
-/* External config in board file */
-extern const struct ina3221_t ina3221[];
-extern const unsigned int ina3221_count;
-
-#endif /* __CROS_EC_INA3221_H */