Commit | Line | Data |
---|---|---|
d8408326 SWK |
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 | ||
760285e7 | 14 | #include <drm/drmP.h> |
d8408326 SWK |
15 | |
16 | #include <linux/kernel.h> | |
17 | #include <linux/i2c.h> | |
18 | #include <linux/module.h> | |
19 | ||
20 | ||
21 | #include "exynos_drm_drv.h" | |
22 | #include "exynos_hdmi.h" | |
23 | ||
24 | static int s5p_ddc_probe(struct i2c_client *client, | |
25 | const struct i2c_device_id *dev_id) | |
26 | { | |
27 | hdmi_attach_ddc_client(client); | |
28 | ||
9ff15948 RS |
29 | dev_info(&client->adapter->dev, |
30 | "attached %s into i2c adapter successfully\n", | |
31 | client->name); | |
d8408326 SWK |
32 | |
33 | return 0; | |
34 | } | |
35 | ||
36 | static int s5p_ddc_remove(struct i2c_client *client) | |
37 | { | |
9ff15948 RS |
38 | dev_info(&client->adapter->dev, |
39 | "detached %s from i2c adapter successfully\n", | |
40 | client->name); | |
d8408326 SWK |
41 | |
42 | return 0; | |
43 | } | |
44 | ||
45 | static struct i2c_device_id ddc_idtable[] = { | |
46 | {"s5p_ddc", 0}, | |
9ff15948 | 47 | {"exynos5-hdmiddc", 0}, |
d8408326 SWK |
48 | { }, |
49 | }; | |
50 | ||
65da0350 | 51 | #ifdef CONFIG_OF |
9ff15948 RS |
52 | static struct of_device_id hdmiddc_match_types[] = { |
53 | { | |
54 | .compatible = "samsung,exynos5-hdmiddc", | |
55 | }, { | |
56 | /* end node */ | |
57 | } | |
58 | }; | |
65da0350 | 59 | #endif |
9ff15948 | 60 | |
d8408326 SWK |
61 | struct i2c_driver ddc_driver = { |
62 | .driver = { | |
9ff15948 | 63 | .name = "exynos-hdmiddc", |
d8408326 | 64 | .owner = THIS_MODULE, |
65da0350 | 65 | .of_match_table = of_match_ptr(hdmiddc_match_types), |
d8408326 SWK |
66 | }, |
67 | .id_table = ddc_idtable, | |
68 | .probe = s5p_ddc_probe, | |
56550d94 | 69 | .remove = s5p_ddc_remove, |
d8408326 SWK |
70 | .command = NULL, |
71 | }; |