From patchwork Thu Dec 26 15:31:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentine Barshak X-Patchwork-Id: 3407051 Return-Path: X-Original-To: patchwork-linux-sh@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 09141C02DC for ; Thu, 26 Dec 2013 15:31:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 32D1620158 for ; Thu, 26 Dec 2013 15:31:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1791C20149 for ; Thu, 26 Dec 2013 15:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389Ab3LZPby (ORCPT ); Thu, 26 Dec 2013 10:31:54 -0500 Received: from mail-la0-f49.google.com ([209.85.215.49]:38397 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753314Ab3LZPbx (ORCPT ); Thu, 26 Dec 2013 10:31:53 -0500 Received: by mail-la0-f49.google.com with SMTP id er20so3674908lab.22 for ; Thu, 26 Dec 2013 07:31:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=klcDgXLFuf90sFEOaba6OIy30lQsxJOEYg/o1RPsYxE=; b=GgRR2zRxwD97tChkdNRX/yK53VKTrX1s0lU5ZDmoMiDyEtni82ywLlBfvORAHf/KIy NR3RWupKlm93KtU+ycjf9Oet6iROZxs69N5FwYhrJhB6orAqbNQCKRqCd2v1MDPIjIyg m7II5ndzkfQKPspaBklkE1lZP+jge1dTolXnywPIfzD/IaWuJazepbIDN2fEZvDPCy4n SlzkGs7UF0WHdsQzC3TDYuXEuIRyiJ+i7gtktXqzb462dAGDpf6eU/WDm005Ao5mlPyy SZtbLaHHcqwa7PwFe6DbdAvkRXAxr6PL08dGmjjnkgpkwhraLRXeWsB4bUKpZsiVkJ1P ZjYw== X-Gm-Message-State: ALoCoQmzKhz4AI+M3C2aLkYFjP4Fx1AtSD80FWJrvRXcJX7X+vanviocD3irLgWMhUydpkdmloed X-Received: by 10.152.6.201 with SMTP id d9mr6526807laa.25.1388071912176; Thu, 26 Dec 2013 07:31:52 -0800 (PST) Received: from black.localnet ([93.100.122.208]) by mx.google.com with ESMTPSA id a8sm24266596lae.5.2013.12.26.07.31.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Dec 2013 07:31:51 -0800 (PST) From: Valentine Barshak To: linux-sh@vger.kernel.org, linux-media@vger.kernel.org Cc: Simon Horman , Magnus Damm , Kuninori Morimoto , Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Guennadi Liakhovetski Subject: [PATCH V2] media: soc_camera: rcar_vin: Add preliminary R-Car M2 support Date: Thu, 26 Dec 2013 19:31:49 +0400 Message-Id: <1388071909-12207-1-git-send-email-valentine.barshak@cogentembedded.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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=ham 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 This adds R-Car M2 (R8A7791) VIN support. Both H2 and M2 variants look the same from the driver's point of view, so use GEN2 id for both. Changes in V2: * Used the same (RCAR_GEN2) id for both H2 and M2 variants since they are no different from the driver's point of view. Signed-off-by: Valentine Barshak Acked-by: Laurent Pinchart --- drivers/media/platform/soc_camera/rcar_vin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 6866bb4..3b1c05a 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -106,7 +106,7 @@ #define VIN_MAX_HEIGHT 2048 enum chip_id { - RCAR_H2, + RCAR_GEN2, RCAR_H1, RCAR_M1, RCAR_E1, @@ -302,7 +302,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) dmr = 0; break; case V4L2_PIX_FMT_RGB32: - if (priv->chip == RCAR_H2 || priv->chip == RCAR_H1 || + if (priv->chip == RCAR_GEN2 || priv->chip == RCAR_H1 || priv->chip == RCAR_E1) { dmr = VNDMR_EXRGB; break; @@ -1384,7 +1384,8 @@ static struct soc_camera_host_ops rcar_vin_host_ops = { }; static struct platform_device_id rcar_vin_id_table[] = { - { "r8a7790-vin", RCAR_H2 }, + { "r8a7791-vin", RCAR_GEN2 }, + { "r8a7790-vin", RCAR_GEN2 }, { "r8a7779-vin", RCAR_H1 }, { "r8a7778-vin", RCAR_M1 }, { "uPD35004-vin", RCAR_E1 },