From patchwork Tue Feb 7 16:41:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9560717 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 5EF726047A for ; Tue, 7 Feb 2017 17:19:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E2AE2842B for ; Tue, 7 Feb 2017 17:19:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4106B2842C; Tue, 7 Feb 2017 17:19:59 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no 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 099EC28426 for ; Tue, 7 Feb 2017 17:19:58 +0000 (UTC) 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 1cb9Qr-0008Sw-09; Tue, 07 Feb 2017 17:19:57 +0000 Received: from mail-wr0-f171.google.com ([209.85.128.171]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cb8zU-0007PG-VR for linux-arm-kernel@lists.infradead.org; Tue, 07 Feb 2017 16:51:46 +0000 Received: by mail-wr0-f171.google.com with SMTP id 89so41995309wrr.2 for ; Tue, 07 Feb 2017 08:51:20 -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:in-reply-to:references; bh=LIx90PyH3Aicn6N/yKZFmjyMZ+zS+KpS+lAZAeMPl+w=; b=1Pkm/FWJrMhkwe8P35pb+amophYrKBb5hd1eZ7Vv+Y+m2r+bsh+LmHTjQytEMkOMdu 5Y0nuWnXoLPIjqr1B/7kedFz9xERCoxBMndH0ISGJMEK1DB5o2Mg89D6n/EjHej3mn4U F6CiGBSw9R31QIz1ErZ1GOIIwR0ImzdNbBovSRoWENLWGfEGFIWGeruhwQjVnyUNbIKE /EiL0R5tn49IkjQCDpjxntghvoOvs57fDNIiHvZhcZko3MlkmDxE57JMUygyT0lROPsu fdug3EXw6kA5gVO3JbgCUTqnhY26hECE3zoZC2KqjIdTPwiOjFl+AdG79OZRaI1tvpjJ OtFw== 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:in-reply-to :references; bh=LIx90PyH3Aicn6N/yKZFmjyMZ+zS+KpS+lAZAeMPl+w=; b=kI4NXe7GO4SjgIDIuBPOZUSbKWDZaMB04j92KPUffpAcjiuPM4qd3MhdzNEuU10Hi7 xYUMMdoOm2KzugGWs95JgNu6vE2X46y4SLUJHQ419oz3MuKrvHlsZscQMZWrd/pTCLqM ECbhF174oIFSaIb55nnb8k/RujwwEQrrtfPYLzUDOlCy8CmJbg3Dl936mkNQKSLo36i/ 69mxMUwP4lerh/v2MkS5yO99Q++WvDJ/eVBEd94cbwyLFgpRONsTThfPi/4j+IFuvHFi XSwecqc1jEJ+8oBdyFUyuVI/OPOAmU5FHCS2ggUeA25IQB4LM91esYMFLfS8wU0CcmgC OMgw== X-Gm-Message-State: AIkVDXIuHUaw6NRl5fMUGD3R+rGeCQ3MjQuHJIlVNSrEaJJh9MpUWOEnjOF4SIwu4mtM962W X-Received: by 10.223.162.205 with SMTP id t13mr6875294wra.155.1486485716464; Tue, 07 Feb 2017 08:41:56 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 8sm3958185wmg.1.2017.02.07.08.41.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Feb 2017 08:41:55 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Rob Herring , Mark Rutland , Russell King , Alexandre Bailon , David Lechner , Laurent Pinchart , Mauro Carvalho Chehab , Lad Prabhakar Subject: [PATCH 09/10] media: vpif: use a configurable i2c_adapter_id for vpif display Date: Tue, 7 Feb 2017 17:41:22 +0100 Message-Id: <1486485683-11427-10-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1486485683-11427-1-git-send-email-bgolaszewski@baylibre.com> References: <1486485683-11427-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170207_085141_524080_C4B61965 X-CRM114-Status: GOOD ( 16.30 ) 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: devicetree@vger.kernel.org, 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 --- 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 e5d4ded..fe0bfa7 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 */