From patchwork Fri May 23 19:07:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 4235161 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 58FC6BF90C for ; Fri, 23 May 2014 19:08:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BAE4203E1 for ; Fri, 23 May 2014 19:08:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6F1C203E3 for ; Fri, 23 May 2014 19:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751787AbaEWTIj (ORCPT ); Fri, 23 May 2014 15:08:39 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:58045 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbaEWTIh (ORCPT ); Fri, 23 May 2014 15:08:37 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4NJ8Ydp021292; Fri, 23 May 2014 14:08:34 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4NJ8Y05020368; Fri, 23 May 2014 14:08:34 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 23 May 2014 14:08:33 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4NJ8XlC016122; Fri, 23 May 2014 14:08:33 -0500 From: Jyri Sarha To: , , , CC: , , , , , , Jyri Sarha Subject: [PATCH 10/13] OMAPDSS: hdmi4: Register HDMI audio ASoC drivers from HDMI driver Date: Fri, 23 May 2014 22:07:59 +0300 Message-ID: <28bddf9165a24122af11fd2c5270deb4e7917877.1400871999.git.jsarha@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The registering is best done here to share the resources owned by OMAPDSS HDMI driver with ASoC DAI and platform drivers. Signed-off-by: Jyri Sarha --- drivers/video/fbdev/omap2/dss/hdmi4.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c index 626aad2..62ad1d9 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/dss/hdmi4.c @@ -52,6 +52,9 @@ static struct { struct clk *sys_clk; struct regulator *vdda_hdmi_dac_reg; +#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) + struct hdmi_audio_data audio; +#endif bool core_enabled; struct omap_dss_device output; @@ -736,6 +739,15 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) hdmi_init_output(pdev); +#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) + r = hdmi_audio_register(pdev, &hdmi.audio, &hdmi.output, &hdmi.wp); + if (r) { + DSSERR("Registering HDMI audio failed\n"); + hdmi_uninit_output(pdev); + pm_runtime_disable(&pdev->dev); + return r; + } +#endif dss_debugfs_create_file("hdmi", hdmi_dump_regs); return 0; @@ -743,6 +755,9 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) static int __exit omapdss_hdmihw_remove(struct platform_device *pdev) { +#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) + hdmi_audio_unregister(&hdmi.audio); +#endif hdmi_uninit_output(pdev); pm_runtime_disable(&pdev->dev);