Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 1 | /* |
| 2 | * omap-hdmi.c |
| 3 | * |
| 4 | * OMAP ALSA SoC DAI driver for HDMI audio on OMAP4 processors. |
| 5 | * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ |
| 6 | * Authors: Jorge Candelaria <jorge.candelaria@ti.com> |
| 7 | * Ricardo Neri <ricardo.neri@ti.com> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License |
| 11 | * version 2 as published by the Free Software Foundation. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, but |
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 21 | * 02110-1301 USA |
| 22 | * |
| 23 | */ |
| 24 | |
| 25 | #include <linux/init.h> |
| 26 | #include <linux/module.h> |
| 27 | #include <linux/device.h> |
| 28 | #include <sound/core.h> |
| 29 | #include <sound/pcm.h> |
| 30 | #include <sound/pcm_params.h> |
| 31 | #include <sound/initval.h> |
| 32 | #include <sound/soc.h> |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 33 | #include <sound/asound.h> |
| 34 | #include <sound/asoundef.h> |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 35 | #include <sound/dmaengine_pcm.h> |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 36 | #include <video/omapdss.h> |
Jyri Sarha | 87c1936 | 2014-05-26 11:51:14 +0300 | [diff] [blame] | 37 | #include <sound/omap-pcm.h> |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 38 | |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 39 | #include "omap-hdmi.h" |
| 40 | |
Ricardo Neri | e412ec6 | 2012-05-18 01:42:34 -0500 | [diff] [blame] | 41 | #define DRV_NAME "omap-hdmi-audio-dai" |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 42 | |
Ricardo Neri | 2603915 | 2012-05-18 01:42:36 -0500 | [diff] [blame] | 43 | struct hdmi_priv { |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 44 | struct snd_dmaengine_dai_dma_data dma_data; |
| 45 | unsigned int dma_req; |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 46 | struct omap_dss_audio dss_audio; |
| 47 | struct snd_aes_iec958 iec; |
| 48 | struct snd_cea_861_aud_if cea; |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 49 | struct omap_dss_device *dssdev; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 50 | }; |
| 51 | |
| 52 | static int omap_hdmi_dai_startup(struct snd_pcm_substream *substream, |
| 53 | struct snd_soc_dai *dai) |
| 54 | { |
Ricardo Neri | a0534e3 | 2012-05-18 01:42:39 -0500 | [diff] [blame] | 55 | struct hdmi_priv *priv = snd_soc_dai_get_drvdata(dai); |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 56 | int err; |
| 57 | /* |
| 58 | * Make sure that the period bytes are multiple of the DMA packet size. |
| 59 | * Largest packet size we use is 32 32-bit words = 128 bytes |
| 60 | */ |
| 61 | err = snd_pcm_hw_constraint_step(substream->runtime, 0, |
| 62 | SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 128); |
Ricardo Neri | a0534e3 | 2012-05-18 01:42:39 -0500 | [diff] [blame] | 63 | if (err < 0) { |
| 64 | dev_err(dai->dev, "could not apply constraint\n"); |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 65 | return err; |
Ricardo Neri | a0534e3 | 2012-05-18 01:42:39 -0500 | [diff] [blame] | 66 | } |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 67 | |
Ricardo Neri | a0534e3 | 2012-05-18 01:42:39 -0500 | [diff] [blame] | 68 | if (!priv->dssdev->driver->audio_supported(priv->dssdev)) { |
| 69 | dev_err(dai->dev, "audio not supported\n"); |
| 70 | return -ENODEV; |
| 71 | } |
Peter Ujfalusi | bcd6da7 | 2012-09-14 15:05:57 +0300 | [diff] [blame] | 72 | |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 73 | snd_soc_dai_set_dma_data(dai, substream, &priv->dma_data); |
Peter Ujfalusi | bcd6da7 | 2012-09-14 15:05:57 +0300 | [diff] [blame] | 74 | |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 75 | return 0; |
| 76 | } |
| 77 | |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 78 | static int omap_hdmi_dai_prepare(struct snd_pcm_substream *substream, |
| 79 | struct snd_soc_dai *dai) |
| 80 | { |
| 81 | struct hdmi_priv *priv = snd_soc_dai_get_drvdata(dai); |
| 82 | |
| 83 | return priv->dssdev->driver->audio_enable(priv->dssdev); |
| 84 | } |
| 85 | |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 86 | static int omap_hdmi_dai_hw_params(struct snd_pcm_substream *substream, |
| 87 | struct snd_pcm_hw_params *params, |
| 88 | struct snd_soc_dai *dai) |
| 89 | { |
Ricardo Neri | 2603915 | 2012-05-18 01:42:36 -0500 | [diff] [blame] | 90 | struct hdmi_priv *priv = snd_soc_dai_get_drvdata(dai); |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 91 | struct snd_aes_iec958 *iec = &priv->iec; |
| 92 | struct snd_cea_861_aud_if *cea = &priv->cea; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 93 | int err = 0; |
| 94 | |
| 95 | switch (params_format(params)) { |
| 96 | case SNDRV_PCM_FORMAT_S16_LE: |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 97 | priv->dma_data.maxburst = 16; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 98 | break; |
| 99 | case SNDRV_PCM_FORMAT_S24_LE: |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 100 | priv->dma_data.maxburst = 32; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 101 | break; |
| 102 | default: |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 103 | dev_err(dai->dev, "format not supported!\n"); |
| 104 | return -EINVAL; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 105 | } |
| 106 | |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 107 | /* |
| 108 | * fill the IEC-60958 channel status word |
| 109 | */ |
Ricardo Neri | a88fedf | 2013-01-10 18:32:13 -0600 | [diff] [blame] | 110 | /* initialize the word bytes */ |
| 111 | memset(iec->status, 0, sizeof(iec->status)); |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 112 | |
| 113 | /* specify IEC-60958-3 (commercial use) */ |
| 114 | iec->status[0] &= ~IEC958_AES0_PROFESSIONAL; |
| 115 | |
| 116 | /* specify that the audio is LPCM*/ |
| 117 | iec->status[0] &= ~IEC958_AES0_NONAUDIO; |
| 118 | |
| 119 | iec->status[0] |= IEC958_AES0_CON_NOT_COPYRIGHT; |
| 120 | |
| 121 | iec->status[0] |= IEC958_AES0_CON_EMPHASIS_NONE; |
| 122 | |
| 123 | iec->status[0] |= IEC958_AES1_PRO_MODE_NOTID; |
| 124 | |
| 125 | iec->status[1] = IEC958_AES1_CON_GENERAL; |
| 126 | |
| 127 | iec->status[2] |= IEC958_AES2_CON_SOURCE_UNSPEC; |
| 128 | |
| 129 | iec->status[2] |= IEC958_AES2_CON_CHANNEL_UNSPEC; |
| 130 | |
| 131 | switch (params_rate(params)) { |
| 132 | case 32000: |
| 133 | iec->status[3] |= IEC958_AES3_CON_FS_32000; |
| 134 | break; |
| 135 | case 44100: |
| 136 | iec->status[3] |= IEC958_AES3_CON_FS_44100; |
| 137 | break; |
| 138 | case 48000: |
| 139 | iec->status[3] |= IEC958_AES3_CON_FS_48000; |
| 140 | break; |
| 141 | case 88200: |
| 142 | iec->status[3] |= IEC958_AES3_CON_FS_88200; |
| 143 | break; |
| 144 | case 96000: |
| 145 | iec->status[3] |= IEC958_AES3_CON_FS_96000; |
| 146 | break; |
| 147 | case 176400: |
| 148 | iec->status[3] |= IEC958_AES3_CON_FS_176400; |
| 149 | break; |
| 150 | case 192000: |
| 151 | iec->status[3] |= IEC958_AES3_CON_FS_192000; |
| 152 | break; |
| 153 | default: |
| 154 | dev_err(dai->dev, "rate not supported!\n"); |
| 155 | return -EINVAL; |
| 156 | } |
| 157 | |
| 158 | /* specify the clock accuracy */ |
| 159 | iec->status[3] |= IEC958_AES3_CON_CLOCK_1000PPM; |
| 160 | |
| 161 | /* |
| 162 | * specify the word length. The same word length value can mean |
| 163 | * two different lengths. Hence, we need to specify the maximum |
| 164 | * word length as well. |
| 165 | */ |
| 166 | switch (params_format(params)) { |
| 167 | case SNDRV_PCM_FORMAT_S16_LE: |
| 168 | iec->status[4] |= IEC958_AES4_CON_WORDLEN_20_16; |
| 169 | iec->status[4] &= ~IEC958_AES4_CON_MAX_WORDLEN_24; |
| 170 | break; |
| 171 | case SNDRV_PCM_FORMAT_S24_LE: |
| 172 | iec->status[4] |= IEC958_AES4_CON_WORDLEN_24_20; |
| 173 | iec->status[4] |= IEC958_AES4_CON_MAX_WORDLEN_24; |
| 174 | break; |
| 175 | default: |
| 176 | dev_err(dai->dev, "format not supported!\n"); |
| 177 | return -EINVAL; |
| 178 | } |
| 179 | |
| 180 | /* |
| 181 | * Fill the CEA-861 audio infoframe (see spec for details) |
| 182 | */ |
| 183 | |
| 184 | cea->db1_ct_cc = (params_channels(params) - 1) |
| 185 | & CEA861_AUDIO_INFOFRAME_DB1CC; |
| 186 | cea->db1_ct_cc |= CEA861_AUDIO_INFOFRAME_DB1CT_FROM_STREAM; |
| 187 | |
| 188 | cea->db2_sf_ss = CEA861_AUDIO_INFOFRAME_DB2SF_FROM_STREAM; |
| 189 | cea->db2_sf_ss |= CEA861_AUDIO_INFOFRAME_DB2SS_FROM_STREAM; |
| 190 | |
| 191 | cea->db3 = 0; /* not used, all zeros */ |
| 192 | |
| 193 | /* |
| 194 | * The OMAP HDMI IP requires to use the 8-channel channel code when |
| 195 | * transmitting more than two channels. |
| 196 | */ |
| 197 | if (params_channels(params) == 2) |
| 198 | cea->db4_ca = 0x0; |
| 199 | else |
| 200 | cea->db4_ca = 0x13; |
| 201 | |
| 202 | cea->db5_dminh_lsv = CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED; |
| 203 | /* the expression is trivial but makes clear what we are doing */ |
| 204 | cea->db5_dminh_lsv |= (0 & CEA861_AUDIO_INFOFRAME_DB5_LSV); |
| 205 | |
| 206 | priv->dss_audio.iec = iec; |
| 207 | priv->dss_audio.cea = cea; |
| 208 | |
| 209 | err = priv->dssdev->driver->audio_config(priv->dssdev, |
| 210 | &priv->dss_audio); |
| 211 | |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 212 | return err; |
| 213 | } |
| 214 | |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 215 | static int omap_hdmi_dai_trigger(struct snd_pcm_substream *substream, int cmd, |
| 216 | struct snd_soc_dai *dai) |
| 217 | { |
| 218 | struct hdmi_priv *priv = snd_soc_dai_get_drvdata(dai); |
| 219 | int err = 0; |
| 220 | |
| 221 | switch (cmd) { |
| 222 | case SNDRV_PCM_TRIGGER_START: |
| 223 | case SNDRV_PCM_TRIGGER_RESUME: |
| 224 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
| 225 | err = priv->dssdev->driver->audio_start(priv->dssdev); |
| 226 | break; |
| 227 | case SNDRV_PCM_TRIGGER_STOP: |
| 228 | case SNDRV_PCM_TRIGGER_SUSPEND: |
| 229 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
| 230 | priv->dssdev->driver->audio_stop(priv->dssdev); |
| 231 | break; |
| 232 | default: |
| 233 | err = -EINVAL; |
| 234 | } |
| 235 | return err; |
| 236 | } |
| 237 | |
| 238 | static void omap_hdmi_dai_shutdown(struct snd_pcm_substream *substream, |
| 239 | struct snd_soc_dai *dai) |
| 240 | { |
| 241 | struct hdmi_priv *priv = snd_soc_dai_get_drvdata(dai); |
| 242 | |
| 243 | priv->dssdev->driver->audio_disable(priv->dssdev); |
| 244 | } |
| 245 | |
Lars-Peter Clausen | 85e7652 | 2011-11-23 11:40:40 +0100 | [diff] [blame] | 246 | static const struct snd_soc_dai_ops omap_hdmi_dai_ops = { |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 247 | .startup = omap_hdmi_dai_startup, |
| 248 | .hw_params = omap_hdmi_dai_hw_params, |
Ricardo Neri | 7e6aa22 | 2012-05-18 01:42:38 -0500 | [diff] [blame] | 249 | .prepare = omap_hdmi_dai_prepare, |
| 250 | .trigger = omap_hdmi_dai_trigger, |
| 251 | .shutdown = omap_hdmi_dai_shutdown, |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 252 | }; |
| 253 | |
| 254 | static struct snd_soc_dai_driver omap_hdmi_dai = { |
| 255 | .playback = { |
| 256 | .channels_min = 2, |
Ricardo Neri | a1ab92d | 2012-05-18 01:42:40 -0500 | [diff] [blame] | 257 | .channels_max = 8, |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 258 | .rates = OMAP_HDMI_RATES, |
| 259 | .formats = OMAP_HDMI_FORMATS, |
| 260 | }, |
| 261 | .ops = &omap_hdmi_dai_ops, |
| 262 | }; |
| 263 | |
Kuninori Morimoto | 0ba7f84 | 2013-03-21 03:34:01 -0700 | [diff] [blame] | 264 | static const struct snd_soc_component_driver omap_hdmi_component = { |
| 265 | .name = DRV_NAME, |
| 266 | }; |
| 267 | |
Bill Pemberton | 7ff6000 | 2012-12-07 09:26:29 -0500 | [diff] [blame] | 268 | static int omap_hdmi_probe(struct platform_device *pdev) |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 269 | { |
| 270 | int ret; |
| 271 | struct resource *hdmi_rsrc; |
Ricardo Neri | 2603915 | 2012-05-18 01:42:36 -0500 | [diff] [blame] | 272 | struct hdmi_priv *hdmi_data; |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 273 | bool hdmi_dev_found = false; |
Ricardo Neri | 2603915 | 2012-05-18 01:42:36 -0500 | [diff] [blame] | 274 | |
| 275 | hdmi_data = devm_kzalloc(&pdev->dev, sizeof(*hdmi_data), GFP_KERNEL); |
| 276 | if (hdmi_data == NULL) { |
| 277 | dev_err(&pdev->dev, "Cannot allocate memory for HDMI data\n"); |
| 278 | return -ENOMEM; |
| 279 | } |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 280 | |
| 281 | hdmi_rsrc = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 282 | if (!hdmi_rsrc) { |
| 283 | dev_err(&pdev->dev, "Cannot obtain IORESOURCE_MEM HDMI\n"); |
Ricardo Neri | 0ff5ee8 | 2012-05-18 01:42:35 -0500 | [diff] [blame] | 284 | return -ENODEV; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 285 | } |
| 286 | |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 287 | hdmi_data->dma_data.addr = hdmi_rsrc->start + OMAP_HDMI_AUDIO_DMA_PORT; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 288 | |
| 289 | hdmi_rsrc = platform_get_resource(pdev, IORESOURCE_DMA, 0); |
| 290 | if (!hdmi_rsrc) { |
| 291 | dev_err(&pdev->dev, "Cannot obtain IORESOURCE_DMA HDMI\n"); |
Ricardo Neri | 0ff5ee8 | 2012-05-18 01:42:35 -0500 | [diff] [blame] | 292 | return -ENODEV; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 293 | } |
| 294 | |
Lars-Peter Clausen | 09ae3aa | 2013-04-03 11:06:05 +0200 | [diff] [blame] | 295 | hdmi_data->dma_req = hdmi_rsrc->start; |
| 296 | hdmi_data->dma_data.filter_data = &hdmi_data->dma_req; |
| 297 | hdmi_data->dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 298 | |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 299 | /* |
| 300 | * TODO: We assume that there is only one DSS HDMI device. Future |
| 301 | * OMAP implementations may support more than one HDMI devices and |
| 302 | * we should provided separate audio support for all of them. |
| 303 | */ |
| 304 | /* Find an HDMI device. */ |
| 305 | for_each_dss_dev(hdmi_data->dssdev) { |
| 306 | omap_dss_get_device(hdmi_data->dssdev); |
| 307 | |
| 308 | if (!hdmi_data->dssdev->driver) { |
| 309 | omap_dss_put_device(hdmi_data->dssdev); |
| 310 | continue; |
| 311 | } |
| 312 | |
| 313 | if (hdmi_data->dssdev->type == OMAP_DISPLAY_TYPE_HDMI) { |
| 314 | hdmi_dev_found = true; |
| 315 | break; |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | if (!hdmi_dev_found) { |
| 320 | dev_err(&pdev->dev, "no driver for HDMI display found\n"); |
| 321 | return -ENODEV; |
| 322 | } |
| 323 | |
Ricardo Neri | 2603915 | 2012-05-18 01:42:36 -0500 | [diff] [blame] | 324 | dev_set_drvdata(&pdev->dev, hdmi_data); |
Kuninori Morimoto | 0ba7f84 | 2013-03-21 03:34:01 -0700 | [diff] [blame] | 325 | ret = snd_soc_register_component(&pdev->dev, &omap_hdmi_component, |
| 326 | &omap_hdmi_dai, 1); |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 327 | |
Peter Ujfalusi | 9769824 | 2014-04-16 15:46:19 +0300 | [diff] [blame] | 328 | if (ret) |
| 329 | return ret; |
| 330 | |
| 331 | return omap_pcm_platform_register(&pdev->dev); |
| 332 | } |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 333 | |
Bill Pemberton | 7ff6000 | 2012-12-07 09:26:29 -0500 | [diff] [blame] | 334 | static int omap_hdmi_remove(struct platform_device *pdev) |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 335 | { |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 336 | struct hdmi_priv *hdmi_data = dev_get_drvdata(&pdev->dev); |
| 337 | |
Kuninori Morimoto | 0ba7f84 | 2013-03-21 03:34:01 -0700 | [diff] [blame] | 338 | snd_soc_unregister_component(&pdev->dev); |
Ricardo Neri | a48d9b7 | 2012-05-18 01:42:37 -0500 | [diff] [blame] | 339 | |
| 340 | if (hdmi_data == NULL) { |
| 341 | dev_err(&pdev->dev, "cannot obtain HDMi data\n"); |
| 342 | return -ENODEV; |
| 343 | } |
| 344 | |
| 345 | omap_dss_put_device(hdmi_data->dssdev); |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 346 | return 0; |
| 347 | } |
| 348 | |
| 349 | static struct platform_driver hdmi_dai_driver = { |
| 350 | .driver = { |
| 351 | .name = DRV_NAME, |
| 352 | .owner = THIS_MODULE, |
| 353 | }, |
| 354 | .probe = omap_hdmi_probe, |
Bill Pemberton | 7ff6000 | 2012-12-07 09:26:29 -0500 | [diff] [blame] | 355 | .remove = omap_hdmi_remove, |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 356 | }; |
| 357 | |
Axel Lin | beda5bf5 | 2011-11-25 10:12:16 +0800 | [diff] [blame] | 358 | module_platform_driver(hdmi_dai_driver); |
Ricardo Neri | bca2e41 | 2011-06-02 15:44:45 -0500 | [diff] [blame] | 359 | |
| 360 | MODULE_AUTHOR("Jorge Candelaria <jorge.candelaria@ti.com>"); |
| 361 | MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); |
| 362 | MODULE_DESCRIPTION("OMAP HDMI SoC Interface"); |
| 363 | MODULE_LICENSE("GPL"); |
| 364 | MODULE_ALIAS("platform:" DRV_NAME); |