From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: pavel@ucw.cz
Subject: [PATCH 6/8] smiapp: add CCP2 support
Date: Thu, 6 Jul 2017 02:00:17 +0300 [thread overview]
Message-ID: <20170705230019.5461-7-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20170705230019.5461-1-sakari.ailus@linux.intel.com>
From: Pavel Machek <pavel@ucw.cz>
Add support for CCP2 connected SMIA sensors as found
on the Nokia N900.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index e0b0c032c4ac..aff55e1dffe7 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2809,13 +2809,19 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev)
switch (bus_cfg->bus_type) {
case V4L2_MBUS_CSI2:
hwcfg->csi_signalling_mode = SMIAPP_CSI_SIGNALLING_MODE_CSI2;
+ hwcfg->lanes = bus_cfg->bus.mipi_csi2.num_data_lanes;
+ break;
+ case V4L2_MBUS_CCP2:
+ hwcfg->csi_signalling_mode = (bus_cfg->bus.mipi_csi1.strobe) ?
+ SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_STROBE :
+ SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_CLOCK;
+ hwcfg->lanes = 1;
break;
- /* FIXME: add CCP2 support. */
default:
+ dev_err(dev, "unsupported bus %u\n", bus_cfg->bus_type);
goto out_err;
}
- hwcfg->lanes = bus_cfg->bus.mipi_csi2.num_data_lanes;
dev_dbg(dev, "lanes %u\n", hwcfg->lanes);
/* NVM size is not mandatory */
@@ -2828,8 +2834,8 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev)
goto out_err;
}
- dev_dbg(dev, "nvm %d, clk %d, csi %d\n", hwcfg->nvm_size,
- hwcfg->ext_clk, hwcfg->csi_signalling_mode);
+ dev_dbg(dev, "nvm %d, clk %d, mode %d\n",
+ hwcfg->nvm_size, hwcfg->ext_clk, hwcfg->csi_signalling_mode);
if (!bus_cfg->nr_of_link_frequencies) {
dev_warn(dev, "no link frequencies defined\n");
--
2.11.0
next prev parent reply other threads:[~2017-07-05 23:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 23:00 [PATCH 0/8] Prepare for CCP2 / CSI-1 support, omap3isp fixes Sakari Ailus
2017-07-05 23:00 ` [PATCH 1/8] dt: bindings: Explicitly specify bus type Sakari Ailus
2017-07-05 23:00 ` [PATCH 2/8] dt: bindings: Add strobe property for CCP2 Sakari Ailus
2017-07-05 23:00 ` [PATCH 3/8] v4l: fwnode: Call CSI2 bus csi2, not csi Sakari Ailus
2017-07-06 11:07 ` Sebastian Reichel
2017-07-05 23:00 ` [PATCH 4/8] v4l: fwnode: Obtain data bus type from FW Sakari Ailus
2017-07-06 11:08 ` Sebastian Reichel
2017-07-05 23:00 ` [PATCH 5/8] v4l: Add support for CSI-1 and CCP2 busses Sakari Ailus
2017-07-06 11:08 ` Sebastian Reichel
2017-07-19 19:37 ` Mauro Carvalho Chehab
2017-07-19 20:53 ` Sakari Ailus
2017-07-19 20:56 ` Mauro Carvalho Chehab
2017-07-20 7:32 ` Pavel Machek
2017-07-05 23:00 ` Sakari Ailus [this message]
2017-07-05 23:00 ` [PATCH 7/8] omap3isp: Check for valid port in endpoints Sakari Ailus
2017-07-06 11:11 ` Sebastian Reichel
2017-07-07 13:04 ` Sakari Ailus
2017-07-13 11:12 ` Pavel Machek
2017-07-05 23:00 ` [PATCH 8/8] omap3isp: Destroy CSI-2 phy mutexes in error and module removal Sakari Ailus
2017-07-06 10:43 ` [PATCH 0/8] Prepare for CCP2 / CSI-1 support, omap3isp fixes Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170705230019.5461-7-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).