From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Stanislawski Subject: Re: [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data for s5p-tv driver Date: Thu, 05 Apr 2012 11:26:02 +0200 Message-ID: <4F7D652A.5010001@samsung.com> References: <1333614296-13256-1-git-send-email-tushar.behera@linaro.org> <1333614296-13256-2-git-send-email-tushar.behera@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT Return-path: Received: from mailout4.w1.samsung.com ([210.118.77.14]:25390 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139Ab2DEJ0G (ORCPT ); Thu, 5 Apr 2012 05:26:06 -0400 Received: from euspt1 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M20000WQ27K3S30@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Thu, 05 Apr 2012 10:26:08 +0100 (BST) Received: from [106.116.48.223] by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M20001I227F1A@spt1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Thu, 05 Apr 2012 10:26:03 +0100 (BST) In-reply-to: <1333614296-13256-2-git-send-email-tushar.behera@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Tushar Behera Cc: linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, patches@linaro.org Hi Tushbar Behera, On 04/05/2012 10:24 AM, Tushar Behera wrote: > 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; I found that hdmiphy is installed on 8th controller on all probably all chips from Exynos4*1* family not only 4210. It should be reflected here. > + 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 */