From patchwork Thu Feb 16 18:08:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9577983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C249260244 for ; Thu, 16 Feb 2017 18:08:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B498628657 for ; Thu, 16 Feb 2017 18:08:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A91642865A; Thu, 16 Feb 2017 18:08:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3805F28657 for ; Thu, 16 Feb 2017 18:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=tm2cSXuZtS0ffsfxkBVAeVQGw2dWYBIcuLd10s8dKGQ=; b=dVV xUfP06BIpYv22iuOLz9W1fHqfWFfZf+i+FPMkF98Z6/mZyufdhNXWeYgOWhBt4cLVNsUiR6Bzq561 PDolHYintrlOZokFPeuLnp8gULk/atGaOS7ZlxdODtlCAtbWHSrCkQ9nvbZWfagGCDMs3L2U6PISz kN1wiTzV0hLvwT+WvH7ChTZ1C4LCHavj/mWiImL4E6UFTS51MHnoH+Lsa3Nt1wVc1EeqimsiLzadn yR5JedTnJV9gV1dlaJDUE/cnzer/zYzQ7cWHRMuaBEW673JXRHzxeZogAuACZsKLI4dgaHIYrADTw RyXAHoZedEm3WXIGYEBG74ogJeeQrdQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ceQTz-0002YV-AD; Thu, 16 Feb 2017 18:08:43 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceQTt-0002GF-CS for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2017 18:08:41 +0000 Received: by mail-wm0-x231.google.com with SMTP id r141so21613759wmg.1 for ; Thu, 16 Feb 2017 10:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=t+wDXpgeSmdkMJo1VGmQP8LR5NLuHggXnSLaGLqphag=; b=X1YPvr2NBtf8AWkDbZ0Bh3x7R21y7bSsWbUJLa0KkEnQCt1F7vRC+/JPSSGvUvOLsl YJHdO5lOUWEZT1y+1TPcmeV38e6OpcaJNIeZlQYMMz0j5Ol1q6pzfnbL+kfEPZ0R1rtk E8IEQK/E0dz1VdLXyd7kHW8j//amvfrDerjlJldsmg4Rt+Lt5GRPH2nzu2fbVbjqJSTh MkUrwmiPTgWFX3SFu6iTXvfq7LsXnbu7ErtGrhJatHECTvmEQ25zvuwRtVtd4EyI1kRh wjdjpK6hu89PiaSoyvTh/KeZ4TIi3G/VC7w2jMfLSdtwekUtn5OTxiKlWnJRACvD9bPs FuMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=t+wDXpgeSmdkMJo1VGmQP8LR5NLuHggXnSLaGLqphag=; b=lFcqynPH0xT8zhweAc/CKckR0rCykFbBncoEjQoxZkhrLQQ2QWzQR3M0nbkLHUt9cy 0wYFcxy67cJKq/F3mBQ6vCWJJ5OQHkYRYSSf0l98o2KogGLD4KobGHk5iHiTo95JLpqW OjX6loJ9od3bXsxem9VBgL0u01ptYPncRKcS/KE8ISq1+AtzjmtwK5aKuShg/ruW7jS6 SxP7RhDtBK/Izs+RGxvmLPxJ9+EBD9NuSDg7j7ZPGbPRZ0y00ekSCWPD8moPR1T4zTjy UDA5Gr2zkUSsNlhqZFq99U41+ciR7vAZOgXk1NJz1IbCrJ+lNlAxr2dZgWEl+bJKsepl E69g== X-Gm-Message-State: AMke39m9GB563hm/f5txFQY2DGRPrcnZ0ZZiZ0VI6GcKB5q0skHYzo6BV+16FjQsrSjZUr27 X-Received: by 10.28.214.137 with SMTP id n131mr3353518wmg.120.1487268494432; Thu, 16 Feb 2017 10:08:14 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id k195sm1132459wmd.7.2017.02.16.10.08.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Feb 2017 10:08:13 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Michael Turquette , Patrick Titiano , Laurent Pinchart , Russell King , Prabhakar Lad , Mauro Carvalho Chehab Subject: [PATCH] media: vpif: use a configurable i2c_adapter_id for vpif display Date: Thu, 16 Feb 2017 19:08:01 +0100 Message-Id: <1487268481-6127-1-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170216_100839_873466_8CFF66D1 X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The vpif display driver uses a static i2c adapter ID of 1 but on the da850-evm board in DT boot mode the i2c adapter ID is actually 0. Make the adapter ID configurable like it already is for vpif capture. Signed-off-by: Bartosz Golaszewski Acked-by: Kevin Hilman Acked-by: Lad, Prabhakar --- arch/arm/mach-davinci/board-da850-evm.c | 1 + drivers/media/platform/davinci/vpif_display.c | 2 +- include/media/davinci/vpif_types.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index df3ca38..6f1e129 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1290,6 +1290,7 @@ static struct vpif_display_config da850_vpif_display_config = { .output_count = ARRAY_SIZE(da850_ch0_outputs), }, .card_name = "DA850/OMAP-L138 Video Display", + .i2c_adapter_id = 1, }; static __init void da850_vpif_init(void) diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 50c3073..7e5cf99 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -1287,7 +1287,7 @@ static __init int vpif_probe(struct platform_device *pdev) } if (!vpif_obj.config->asd_sizes) { - i2c_adap = i2c_get_adapter(1); + i2c_adap = i2c_get_adapter(vpif_obj.config->i2c_adapter_id); for (i = 0; i < subdev_count; i++) { vpif_obj.sd[i] = v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev, diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h index 4282a7d..0c72b46 100644 --- a/include/media/davinci/vpif_types.h +++ b/include/media/davinci/vpif_types.h @@ -57,6 +57,7 @@ struct vpif_display_config { int (*set_clock)(int, int); struct vpif_subdev_info *subdevinfo; int subdev_count; + int i2c_adapter_id; struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS]; const char *card_name; struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */