lsdc_i2c.h 556 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2023 Loongson Technology Corporation Limited
  4. */
  5. #ifndef __LSDC_I2C_H__
  6. #define __LSDC_I2C_H__
  7. #include <linux/i2c.h>
  8. #include <linux/i2c-algo-bit.h>
  9. struct lsdc_i2c {
  10. struct i2c_adapter adapter;
  11. struct i2c_algo_bit_data bit;
  12. struct drm_device *ddev;
  13. void __iomem *dir_reg;
  14. void __iomem *dat_reg;
  15. /* pin bit mask */
  16. u8 sda;
  17. u8 scl;
  18. };
  19. struct lsdc_display_pipe;
  20. int lsdc_create_i2c_chan(struct drm_device *ddev,
  21. struct lsdc_display_pipe *dispipe,
  22. unsigned int index);
  23. #endif