fdt_i2c.h 529 B

1234567891011121314151617181920212223242526
  1. /*
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2021 YADRO
  5. *
  6. * Authors:
  7. * Nikita Shubin <n.shubin@yadro.com>
  8. */
  9. #ifndef __FDT_I2C_H__
  10. #define __FDT_I2C_H__
  11. #include <sbi_utils/i2c/i2c.h>
  12. /** FDT based I2C adapter driver */
  13. struct fdt_i2c_adapter {
  14. const struct fdt_match *match_table;
  15. int (*init)(void *fdt, int nodeoff,
  16. const struct fdt_match *match);
  17. };
  18. /** Get I2C adapter identified by nodeoff */
  19. int fdt_i2c_adapter_get(void *fdt, int nodeoff,
  20. struct i2c_adapter **out_adapter);
  21. #endif