blob: 6a8c84e7c83916c3d96db6e42a3b3136f37aebd7 [file] [log] [blame]
Seung-Woo Kimd8408322011-12-21 17:39:39 +09001/*
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
David Howells760285e2012-10-02 18:01:07 +010014#include <drm/drmP.h>
Seung-Woo Kimd8408322011-12-21 17:39:39 +090015
16#include <linux/kernel.h>
17#include <linux/i2c.h>
Sachin Kamat3f1c7812013-08-14 16:38:01 +053018#include <linux/of.h>
Seung-Woo Kimd8408322011-12-21 17:39:39 +090019
20#include "exynos_drm_drv.h"
21#include "exynos_hdmi.h"
22
23static int s5p_ddc_probe(struct i2c_client *client,
24 const struct i2c_device_id *dev_id)
25{
26 hdmi_attach_ddc_client(client);
27
Rahul Sharma9ff15942012-10-04 20:48:49 +053028 dev_info(&client->adapter->dev,
29 "attached %s into i2c adapter successfully\n",
30 client->name);
Seung-Woo Kimd8408322011-12-21 17:39:39 +090031
32 return 0;
33}
34
35static int s5p_ddc_remove(struct i2c_client *client)
36{
Rahul Sharma9ff15942012-10-04 20:48:49 +053037 dev_info(&client->adapter->dev,
38 "detached %s from i2c adapter successfully\n",
39 client->name);
Seung-Woo Kimd8408322011-12-21 17:39:39 +090040
41 return 0;
42}
43
Rahul Sharma9ff15942012-10-04 20:48:49 +053044static struct of_device_id hdmiddc_match_types[] = {
45 {
46 .compatible = "samsung,exynos5-hdmiddc",
47 }, {
Rahul Sharmacc57caf2013-06-19 18:21:07 +053048 .compatible = "samsung,exynos4210-hdmiddc",
49 }, {
Rahul Sharma9ff15942012-10-04 20:48:49 +053050 /* end node */
51 }
52};
53
Seung-Woo Kimd8408322011-12-21 17:39:39 +090054struct i2c_driver ddc_driver = {
55 .driver = {
Rahul Sharma9ff15942012-10-04 20:48:49 +053056 .name = "exynos-hdmiddc",
Seung-Woo Kimd8408322011-12-21 17:39:39 +090057 .owner = THIS_MODULE,
Sachin Kamatf61d5f292013-08-28 10:47:54 +053058 .of_match_table = hdmiddc_match_types,
Seung-Woo Kimd8408322011-12-21 17:39:39 +090059 },
Seung-Woo Kimd8408322011-12-21 17:39:39 +090060 .probe = s5p_ddc_probe,
Greg Kroah-Hartman56550d92012-12-21 15:09:25 -080061 .remove = s5p_ddc_remove,
Seung-Woo Kimd8408322011-12-21 17:39:39 +090062 .command = NULL,
63};