From patchwork Sun Apr 24 21:08:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 8921621 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7FC7FBF29F for ; Sun, 24 Apr 2016 21:10:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A001A201EC for ; Sun, 24 Apr 2016 21:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE3D820219 for ; Sun, 24 Apr 2016 21:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbcDXVKh (ORCPT ); Sun, 24 Apr 2016 17:10:37 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35740 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268AbcDXVKb (ORCPT ); Sun, 24 Apr 2016 17:10:31 -0400 Received: by mail-wm0-f67.google.com with SMTP id e201so17587634wme.2 for ; Sun, 24 Apr 2016 14:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EbLl4bWMmy+3Ma5gfEfVH9+MFhKtTedzgQ0/i43ZCZ4=; b=hl4dGdDcmDRC3r9vPx7+t76i4j7QFPVuRaDggU+mkFr6WKLO2TEx6UofpjnAd2t+qI gZO+jFsWlm4TjtBVW3DHHQQUSLtK/u7Hrwp6izxuBnbfbKAzWyaCZ665Kz3frIaPW0kS 5kTZNsJ2+15Tk26dtrWpaFERhyvHPUIY8dIJJJWcm9Z0wuj5A5vDhgSzN0c8xgZLK5g9 huSXM8OM/4cLD2ZjIwi5zbT83FbOAP1XLLJTnECUUHeLzyvuGGAlU7spEhQnYh7btqzE g/NHCI60RuRBBnzDrlfMfMkRpesG3UWxp/NOkO7RwVD0gvzSLQ573CDSgCSf+ds2g3hu 6z3A== 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:in-reply-to :references; bh=EbLl4bWMmy+3Ma5gfEfVH9+MFhKtTedzgQ0/i43ZCZ4=; b=BmRn/Yw5Gh6HZF5H8M2LuvWyxVfXGqfr+c8YBng8Z46LT8GGoLqlIR964yhLHLwRCj MfSZsMf/wVTZVl4gmGiquwrHG1iuS2Z+W+GkOyBWpF+c7fJbzt8LqoKhg9Sjgza662mL OpIGWepdaajNtiBubqiAKohfeh/X2F7zXj7VfvYA3hLDFPx6Ml0pkj95cJAJ5CPnmp7t KN3k319IM1HRrXyvwubAGHso+A+iY6Q8qqxFgqw1loVMYWJJ0Z4Uls/saFbzs7uqoh+C bz1P2kVUYmpPJPre4BjjHZGTGbyTyJt708jkx5ZFYZroH/+AIMwptiaY66EphALX6DUu 72rQ== X-Gm-Message-State: AOPr4FXCKQ0Qgi1aIEOcXIJMv6hYGPignMQV1otWQlP57/4eV6bTa0ne9gjzyUAmrLCKfA== X-Received: by 10.28.133.129 with SMTP id h123mr8394363wmd.33.1461532229823; Sun, 24 Apr 2016 14:10:29 -0700 (PDT) Received: from localhost.localdomain ([46.249.74.23]) by smtp.gmail.com with ESMTPSA id b2sm15440182wmb.9.2016.04.24.14.10.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 14:10:29 -0700 (PDT) From: Ivaylo Dimitrov To: sakari.ailus@iki.fi Cc: sre@kernel.org, pali.rohar@gmail.com, pavel@ucw.cz, linux-media@vger.kernel.org Subject: [RFC PATCH 17/24] smiapp: add CCP2 support Date: Mon, 25 Apr 2016 00:08:17 +0300 Message-Id: <1461532104-24032-18-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> References: <20160420081427.GZ32125@valkosipuli.retiisi.org.uk> <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Sebastian Reichel Add support for CCP2 connected SMIA sensors as found on the Nokia N900. Signed-off-by: Sebastian Reichel Acked-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index c6a897b..ec19532 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -3016,13 +3016,19 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev) switch (bus_cfg->bus_type) { case V4L2_MBUS_CSI2: pdata->csi_signalling_mode = SMIAPP_CSI_SIGNALLING_MODE_CSI2; + pdata->lanes = bus_cfg->bus.mipi_csi2.num_data_lanes; + break; + case V4L2_MBUS_CCP2: + pdata->csi_signalling_mode = (bus_cfg->bus.mipi_csi1.strobe) ? + SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_STROBE : + SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_CLOCK; + pdata->lanes = 1; break; - /* FIXME: add CCP2 support. */ default: + dev_err(dev, "unknown bus protocol\n"); goto out_err; } - pdata->lanes = bus_cfg->bus.mipi_csi2.num_data_lanes; dev_dbg(dev, "lanes %u\n", pdata->lanes); /* xshutdown GPIO is optional */ @@ -3039,7 +3045,7 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev) goto out_err; } - dev_dbg(dev, "reset %d, nvm %d, clk %d, csi %d\n", pdata->xshutdown, + dev_dbg(dev, "reset %d, nvm %d, clk %d, mode %d\n", pdata->xshutdown, pdata->nvm_size, pdata->ext_clk, pdata->csi_signalling_mode); if (!bus_cfg->nr_of_link_frequencies) {