exynos_ddc.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #ifdef CONFIG_OF
  41. static struct of_device_id hdmiddc_match_types[] = {
  42. {
  43. .compatible = "samsung,exynos5-hdmiddc",
  44. }, {
  45. /* end node */
  46. }
  47. };
  48. #endif
  49. struct i2c_driver ddc_driver = {
  50. .driver = {
  51. .name = "exynos-hdmiddc",
  52. .owner = THIS_MODULE,
  53. .of_match_table = of_match_ptr(hdmiddc_match_types),
  54. },
  55. .id_table = ddc_idtable,
  56. .probe = s5p_ddc_probe,
  57. .remove = s5p_ddc_remove,
  58. .command = NULL,
  59. };