Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 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 | |
David Howells | 760285e | 2012-10-02 18:01:07 +0100 | [diff] [blame] | 14 | #include <drm/drmP.h> |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/i2c.h> |
| 18 | #include <linux/module.h> |
| 19 | |
| 20 | #include "exynos_drm_drv.h" |
| 21 | #include "exynos_hdmi.h" |
| 22 | |
| 23 | |
| 24 | static int hdmiphy_probe(struct i2c_client *client, |
| 25 | const struct i2c_device_id *id) |
| 26 | { |
| 27 | hdmi_attach_hdmiphy_client(client); |
| 28 | |
| 29 | dev_info(&client->adapter->dev, "attached s5p_hdmiphy " |
| 30 | "into i2c adapter successfully\n"); |
| 31 | |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | static int hdmiphy_remove(struct i2c_client *client) |
| 36 | { |
| 37 | dev_info(&client->adapter->dev, "detached s5p_hdmiphy " |
| 38 | "from i2c adapter successfully\n"); |
| 39 | |
| 40 | return 0; |
| 41 | } |
| 42 | |
| 43 | static const struct i2c_device_id hdmiphy_id[] = { |
| 44 | { "s5p_hdmiphy", 0 }, |
Rahul Sharma | 93c645e | 2012-10-04 20:48:50 +0530 | [diff] [blame] | 45 | { "exynos5-hdmiphy", 0 }, |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 46 | { }, |
| 47 | }; |
| 48 | |
Sachin Kamat | 65da035 | 2012-12-12 14:24:07 +0530 | [diff] [blame] | 49 | #ifdef CONFIG_OF |
Rahul Sharma | 93c645e | 2012-10-04 20:48:50 +0530 | [diff] [blame] | 50 | static struct of_device_id hdmiphy_match_types[] = { |
| 51 | { |
| 52 | .compatible = "samsung,exynos5-hdmiphy", |
| 53 | }, { |
Rahul Sharma | cc57caf | 2013-06-19 18:21:07 +0530 | [diff] [blame] | 54 | .compatible = "samsung,exynos4210-hdmiphy", |
| 55 | }, { |
| 56 | .compatible = "samsung,exynos4212-hdmiphy", |
| 57 | }, { |
Rahul Sharma | 93c645e | 2012-10-04 20:48:50 +0530 | [diff] [blame] | 58 | /* end node */ |
| 59 | } |
| 60 | }; |
Sachin Kamat | 65da035 | 2012-12-12 14:24:07 +0530 | [diff] [blame] | 61 | #endif |
Rahul Sharma | 93c645e | 2012-10-04 20:48:50 +0530 | [diff] [blame] | 62 | |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 63 | struct i2c_driver hdmiphy_driver = { |
| 64 | .driver = { |
Rahul Sharma | 93c645e | 2012-10-04 20:48:50 +0530 | [diff] [blame] | 65 | .name = "exynos-hdmiphy", |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 66 | .owner = THIS_MODULE, |
Sachin Kamat | 65da035 | 2012-12-12 14:24:07 +0530 | [diff] [blame] | 67 | .of_match_table = of_match_ptr(hdmiphy_match_types), |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 68 | }, |
| 69 | .id_table = hdmiphy_id, |
| 70 | .probe = hdmiphy_probe, |
Greg Kroah-Hartman | 56550d9 | 2012-12-21 15:09:25 -0800 | [diff] [blame] | 71 | .remove = hdmiphy_remove, |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 72 | .command = NULL, |
| 73 | }; |
| 74 | EXPORT_SYMBOL(hdmiphy_driver); |