exynos_ddc.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (C) 2011 Samsung Electronics Co.Ltd
  3. * Authors:
  4. * Seung-Woo Kim <sw0312.kim@samsung.com>
  5. * Inki Dae <inki.dae@samsung.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. *
  12. */
  13. #include <drm/drmP.h>
  14. #include <linux/kernel.h>
  15. #include <linux/i2c.h>
  16. #include "exynos_drm_drv.h"
  17. #include "exynos_hdmi.h"
  18. static int s5p_ddc_probe(struct i2c_client *client,
  19. const struct i2c_device_id *dev_id)
  20. {
  21. hdmi_attach_ddc_client(client);
  22. dev_info(&client->adapter->dev,
  23. "attached %s into i2c adapter successfully\n",
  24. client->name);
  25. return 0;
  26. }
  27. static int s5p_ddc_remove(struct i2c_client *client)
  28. {
  29. dev_info(&client->adapter->dev,
  30. "detached %s from i2c adapter successfully\n",
  31. client->name);
  32. return 0;
  33. }
  34. static struct i2c_device_id ddc_idtable[] = {
  35. {"s5p_ddc", 0},
  36. {"exynos5-hdmiddc", 0},
  37. { },
  38. };
  39. #ifdef CONFIG_OF
  40. static struct of_device_id hdmiddc_match_types[] = {
  41. {
  42. .compatible = "samsung,exynos5-hdmiddc",
  43. }, {
  44. .compatible = "samsung,exynos4210-hdmiddc",
  45. }, {
  46. /* end node */
  47. }
  48. };
  49. #endif
  50. struct i2c_driver ddc_driver = {
  51. .driver = {
  52. .name = "exynos-hdmiddc",
  53. .owner = THIS_MODULE,
  54. .of_match_table = of_match_ptr(hdmiddc_match_types),
  55. },
  56. .id_table = ddc_idtable,
  57. .probe = s5p_ddc_probe,
  58. .remove = s5p_ddc_remove,
  59. .command = NULL,
  60. };