summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Holland <[email protected]>2024-11-11 14:02:50 -0800
committerAnup Patel <[email protected]>2024-11-28 17:38:05 +0530
commit333133edaa8bfe0bf467b58844b569608b84522f (patch)
treeb976e3a5bcad7bbb1abedab91af674d3be0e2390 /include
parentbef8f9b8068c6e5e0bb706f90eee30674910a47f (diff)
lib: utils/i2c: Use fdt_driver for initialization
The i2c driver subsystem does not need any extra data, so it can use `struct fdt_driver` directly. It always initializes the driver for a specific DT node. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/i2c/fdt_i2c.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/sbi_utils/i2c/fdt_i2c.h b/include/sbi_utils/i2c/fdt_i2c.h
index 65758ec2..8cae4c2a 100644
--- a/include/sbi_utils/i2c/fdt_i2c.h
+++ b/include/sbi_utils/i2c/fdt_i2c.h
@@ -10,15 +10,9 @@
#ifndef __FDT_I2C_H__
#define __FDT_I2C_H__
+#include <sbi_utils/fdt/fdt_driver.h>
#include <sbi_utils/i2c/i2c.h>
-/** FDT based I2C adapter driver */
-struct fdt_i2c_adapter {
- const struct fdt_match *match_table;
- int (*init)(const void *fdt, int nodeoff,
- const struct fdt_match *match);
-};
-
/** Get I2C adapter identified by nodeoff */
int fdt_i2c_adapter_get(const void *fdt, int nodeoff,
struct i2c_adapter **out_adapter);