exynos_ddc.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 <linux/module.h>
  17. #include "exynos_drm_drv.h"
  18. #include "exynos_hdmi.h"
  19. static int s5p_ddc_probe(struct i2c_client *client,
  20. const struct i2c_device_id *dev_id)
  21. {
  22. hdmi_attach_ddc_client(client);
  23. dev_info(&client->adapter->dev,
  24. "attached %s into i2c adapter successfully\n",
  25. client->name);
  26. return 0;
  27. }
  28. static int s5p_ddc_remove(struct i2c_client *client)
  29. {
  30. dev_info(&client->adapter->dev,
  31. "detached %s from i2c adapter successfully\n",
  32. client->name);
  33. return 0;
  34. }
  35. static struct i2c_device_id ddc_idtable[] = {
  36. {"s5p_ddc", 0},
  37. {"exynos5-hdmiddc", 0},
  38. { },
  39. };
  40. static struct of_device_id hdmiddc_match_types[] = {
  41. {
  42. .compatible = "samsung,exynos5-hdmiddc",
  43. }, {
  44. /* end node */
  45. }
  46. };
  47. struct i2c_driver ddc_driver = {
  48. .driver = {
  49. .name = "exynos-hdmiddc",
  50. .owner = THIS_MODULE,
  51. .of_match_table = hdmiddc_match_types,
  52. },
  53. .id_table = ddc_idtable,
  54. .probe = s5p_ddc_probe,
  55. .remove = __devexit_p(s5p_ddc_remove),
  56. .command = NULL,
  57. };