From patchwork Thu Apr 5 08:24:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 7652 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 58BE823E4C for ; Thu, 5 Apr 2012 08:33:11 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 07148A18204 for ; Thu, 5 Apr 2012 08:33:10 +0000 (UTC) Received: by iage36 with SMTP id e36so2019829iag.11 for ; Thu, 05 Apr 2012 01:33:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=8s2hBPfKj9ZDx1NU2CkLh3DtzPsR8UM0Hk96wQdxWv4=; b=ELRuMmgz2OijBsf478hUC1okSLolYGGSDYNhq+OYKE/czxaKfH9AMcEuAbFPOBhM83 FpZFqviYoaFZpo+ZlVIEuODpxj+hl2VTI2CctOWLf8d+4bhwshyBTEjJPVhgUt2ZOqh7 XYE+fyUSPEPbaJlq5KGUN6ic4lc8nOuf3BWNLGt1WuhXrBNnpR0+A6D25vOEvNtG+qvV x3xchqtPe1cz57Qb1+DWsM351wHZ5wVoNqw96Zw6R8ddRkn0D5XHp9BsJMxa0f55Bqtz f0UNgO2hh3dQ4HllGRh5UVlQzExVP8aaCaTFOb40aagsHuDCfqWz1VDE63yb4hJ0/OMl eGdw== Received: by 10.50.51.197 with SMTP id m5mr1063213igo.38.1333614789885; Thu, 05 Apr 2012 01:33:09 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp50194iby; Thu, 5 Apr 2012 01:33:09 -0700 (PDT) Received: by 10.68.223.161 with SMTP id qv1mr5209297pbc.100.1333614789192; Thu, 05 Apr 2012 01:33:09 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id l7si3877039pbj.86.2012.04.05.01.33.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 01:33:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by pbcxa12 with SMTP id xa12so1483924pbc.37 for ; Thu, 05 Apr 2012 01:33:09 -0700 (PDT) Received: by 10.68.219.225 with SMTP id pr1mr4917216pbc.63.1333614788854; Thu, 05 Apr 2012 01:33:08 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id g8sm2643434pbo.25.2012.04.05.01.33.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 01:33:08 -0700 (PDT) From: Tushar Behera To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, t.stanislaws@samsung.com, patches@linaro.org Subject: [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data for s5p-tv driver Date: Thu, 5 Apr 2012 13:54:55 +0530 Message-Id: <1333614296-13256-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1333614296-13256-1-git-send-email-tushar.behera@linaro.org> References: <1333614296-13256-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQksvXrn71mfJ+4jztQ9g2g58svkpxtYUBwVtCPwPrqUJGrN5CIa8NAIVm1o8924k3LELZYM Commit 350f2f4dad64 ("[media] v4l: s5p-tv: hdmi: add support for platform data") makes the presence of platform data mandatory for s5p-tv driver. Adding an API to plat-samsung for this purpose. Signed-off-by: Tushar Behera --- arch/arm/plat-samsung/devs.c | 25 +++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/hdmi.h | 16 ++++++++++++++++ 2 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 8b928f9..0ac3884 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -31,6 +31,8 @@ #include #include +#include + #include #include #include @@ -770,6 +772,29 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), &s5p_device_i2c_hdmiphy); } + +struct s5p_hdmi_platform_data s5p_hdmi_def_platdata; + +void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, + struct i2c_board_info *mhl_info, int mhl_bus) +{ + struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata; + + if (soc_is_exynos4210()) + pd->hdmiphy_bus = 8; + else if (soc_is_s5pv210()) + pd->hdmiphy_bus = 3; + else + pd->hdmiphy_bus = 0; + + pd->hdmiphy_info = hdmiphy_info; + pd->mhl_info = mhl_info; + pd->mhl_bus = mhl_bus; + + s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data), + &s5p_device_hdmi); +} + #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */ /* I2S */ diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h new file mode 100644 index 0000000..5dc7347 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/hdmi.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2012 Samsung Electronics Co.Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#ifndef __PLAT_SAMSUNG_HDMI_H +#define __PLAT_SAMSUNG_HDMI_H __FILE__ + +extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, + struct i2c_board_info *mhl_info, int mhl_bus); + +#endif /* __PLAT_SAMSUNG_HDMI_H */