exynos_ddc.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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/of.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 of_device_id hdmiddc_match_types[] = {
  36. {
  37. .compatible = "samsung,exynos5-hdmiddc",
  38. }, {
  39. .compatible = "samsung,exynos4210-hdmiddc",
  40. }, {
  41. /* end node */
  42. }
  43. };
  44. struct i2c_driver ddc_driver = {
  45. .driver = {
  46. .name = "exynos-hdmiddc",
  47. .owner = THIS_MODULE,
  48. .of_match_table = hdmiddc_match_types,
  49. },
  50. .probe = s5p_ddc_probe,
  51. .remove = s5p_ddc_remove,
  52. .command = NULL,
  53. };