[{"id":11878,"web_url":"https://patchwork.libcamera.org/comment/11878/","msgid":"<20200805125036.GA6751@pendragon.ideasonboard.com>","date":"2020-08-05T12:50:36","subject":"Re: [libcamera-devel] [PATCH v8 5/9] libcamera: camera_sensor: Add\n\taccessors for sensor ID","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Wed, Aug 05, 2020 at 12:48:56PM +0200, Niklas Söderlund wrote:\n> Add an accessors so that the sensor ID can be used outside CameraSensor.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  include/libcamera/internal/camera_sensor.h |  1 +\n>  src/libcamera/camera_sensor.cpp            | 10 ++++++++++\n>  2 files changed, 11 insertions(+)\n> \n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index 0f65fca46877e89a..b9eba89f00fba882 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -47,6 +47,7 @@ public:\n>  \tint init();\n>  \n>  \tconst std::string &model() const { return model_; }\n> +\tconst std::string &id() const { return id_; }\n>  \tconst MediaEntity *entity() const { return entity_; }\n>  \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n>  \tconst std::vector<Size> &sizes() const { return sizes_; }\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 695c4ad0028d5c4c..2c2db051f8e264c7 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -291,6 +291,16 @@ int CameraSensor::init()\n>   * \\return The sensor model name\n>   */\n>  \n> +/**\n> + * \\fn CameraSensor::id()\n> + * \\brief Retrieve the sensor ID\n> + *\n> + * The sensor ID is a free-form string that uniquely identifies the sensor in\n> + * the system. The ID satisfy the requirements to be used as a camera ID.\n\ns/satisfy/satisfies/\n\n> + *\n> + * \\return The sensor ID\n> + */\n> +\n>  /**\n>   * \\fn CameraSensor::entity()\n>   * \\brief Retrieve the sensor media entity","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2279EBD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  5 Aug 2020 12:50:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C8CF605A8;\n\tWed,  5 Aug 2020 14:50:49 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C543F6039D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Aug 2020 14:50:48 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 272222C0;\n\tWed,  5 Aug 2020 14:50:48 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ZoF3aTn8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1596631848;\n\tbh=y5aAwwVKaBUmogHdYxf1ennenqp6JVK+byiEt0hwyow=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZoF3aTn8swYAwElwceQqKiJlsfUWGm2QoM/l2MfdVxQ8UhuyeOvqxS4oSFS4lK0lt\n\t+wYdxppv+MHfyFWH5Ufd3MpwGiZKDnJUME8HiiS6FUqyk92PBJG0ZgVqxC38WCgZSI\n\tp8m5PkkRwvlspLxTrHRGhgLpadSG/wgD9yoy2blA=","Date":"Wed, 5 Aug 2020 15:50:36 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200805125036.GA6751@pendragon.ideasonboard.com>","References":"<20200805104900.2172763-1-niklas.soderlund@ragnatech.se>\n\t<20200805104900.2172763-6-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200805104900.2172763-6-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v8 5/9] libcamera: camera_sensor: Add\n\taccessors for sensor ID","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]