From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:60040 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752022AbdGRTEJ (ORCPT ); Tue, 18 Jul 2017 15:04:09 -0400 From: Sakari Ailus To: linux-media@vger.kernel.org Cc: linux-leds@vger.kernel.org, laurent.pinchart@ideasonboard.com, niklas.soderlund@ragnatech.se, hverkuil@xs4all.nl Subject: [RFC 19/19] smiapp: Add support for flash and lens devices Date: Tue, 18 Jul 2017 22:04:01 +0300 Message-Id: <20170718190401.14797-20-sakari.ailus@linux.intel.com> In-Reply-To: <20170718190401.14797-1-sakari.ailus@linux.intel.com> References: <20170718190401.14797-1-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org List-ID: Parse async sub-devices by using v4l2_subdev_fwnode_reference_parse_sensor_common(). These types devices aren't directly related to the sensor, but are nevertheless handled by the smiapp driver due to the relationship of these component to the main part of the camera module --- the sensor. This does not yet address providing the user space with information on how to associate the sensor or lens devices but the kernel now has the necessary information to do that. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index e0b0c032c4ac..ae93d81d179c 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2879,6 +2879,11 @@ static int smiapp_probe(struct i2c_client *client, v4l2_i2c_subdev_init(&sensor->src->sd, client, &smiapp_ops); sensor->src->sd.internal_ops = &smiapp_internal_src_ops; + rval = v4l2_subdev_fwnode_reference_parse_sensor_common( + &sensor->src->sd); + if (rval < 0 && rval != -ENOENT) + return rval; + sensor->vana = devm_regulator_get(&client->dev, "vana"); if (IS_ERR(sensor->vana)) { dev_err(&client->dev, "could not get regulator for vana\n"); -- 2.11.0