diff options
author | Jeremy Soller <jeremy@system76.com> | 2021-01-26 13:21:12 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-15 07:36:03 +0000 |
commit | e20c47b408807c7562fc8c05e06780e3e9199573 (patch) | |
tree | e8d3ed48ac2aa604cca00e3fb7d22a5329201552 /src/drivers/i2c/tas5825m/tas5825m.h | |
parent | a1165fdfd494127315ec888e9a084ba0371e0187 (diff) |
drivers/i2c/tas5825m: Add driver for TI TAS5825M
This adds a driver for the TI TAS5825M smart amplifier [1].
The driver expects the mainboard using it to define tas5825m_setup(),
which uses the tas5825m_* functions to set configuration data. Each
mainboard may have very different configuration data, depending on
its audio hardware.
Tested on System76 addw1, bonw14, oryp5, and oryp6.
[1]: https://www.ti.com/product/TAS5825M
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: I896e8f272f18e64bfc90f406e7d4163010800aaf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43614
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/tas5825m/tas5825m.h')
-rw-r--r-- | src/drivers/i2c/tas5825m/tas5825m.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/drivers/i2c/tas5825m/tas5825m.h b/src/drivers/i2c/tas5825m/tas5825m.h new file mode 100644 index 0000000000..33b8a4842d --- /dev/null +++ b/src/drivers/i2c/tas5825m/tas5825m.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef TAS5825M_H +#define TAS5825M_H + +#include <device/device.h> + +int tas5825m_write_at(struct device *dev, uint8_t addr, uint8_t value); +int tas5825m_write_block_at(struct device *dev, uint8_t addr, + const uint8_t *values, uint8_t length); +int tas5825m_set_page(struct device *dev, uint8_t page); +int tas5825m_set_book(struct device *dev, uint8_t book); +int tas5825m_setup(struct device *dev, int id); + +#endif // TAS5825M_H |