diff options
author | Eric Lai <ericr_lai@compal.corp-partner.google.com> | 2020-11-16 15:38:53 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-22 22:20:33 +0000 |
commit | f9ed4d20f16facc486b960e0372d7a9dc0490c81 (patch) | |
tree | 88c9b691f4f99cd0756b3ef6ed9f91c043a9ecc8 /src/drivers/i2c/sx9324/chip.h | |
parent | c930c87998c5182059fcdc8adea98779df9ce629 (diff) |
drivers/i2c: Add a driver for Semtech SX9324
This adds a new driver for the SX9324 proximity detector device.
Follow SX9324 datasheet Rev3.
BUG=b:172397658
BRANCH=zork
TEST=Test sx9324 is working as expected.
Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: Ifd582482728a2f535ed85f6696b2f5a4529ba421
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47640
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/sx9324/chip.h')
-rw-r--r-- | src/drivers/i2c/sx9324/chip.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/drivers/i2c/sx9324/chip.h b/src/drivers/i2c/sx9324/chip.h new file mode 100644 index 0000000000..9c9dd3cf35 --- /dev/null +++ b/src/drivers/i2c/sx9324/chip.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __DRIVERS_I2C_SX9324_CHIP_H__ +#define __DRIVERS_I2C_SX9324_CHIP_H__ + +#include <acpi/acpi_device.h> +#include <device/i2c_simple.h> + +#define REGISTER(NAME) uint8_t NAME + +struct drivers_i2c_sx9324_config { + /* Device Description */ + const char *desc; + + /* ACPI _UID */ + unsigned int uid; + + /* Bus speed in Hz, default is I2C_SPEED_FAST */ + enum i2c_speed speed; + + /* Use GPIO-based interrupt instead of IO-APIC */ + struct acpi_gpio irq_gpio; + + /* IO-APIC interrupt */ + struct acpi_irq irq; +#include "registers.h" +}; + +#undef REGISTER + +#endif /* __DRIVERS_I2C_SX9324_CHIP_H__ */ |