[{"id":12024,"web_url":"https://patchwork.libcamera.org/comment/12024/","msgid":"<20200816131310.GF32174@pendragon.ideasonboard.com>","date":"2020-08-16T13:13:10","subject":"Re: [libcamera-devel] [PATCH v4 3/7] libcamera: camera_sensor: Set\n\tsensor model property","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 Fri, Aug 14, 2020 at 12:37:18AM +0200, Niklas Söderlund wrote:\n> Set the sensor model property.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n> * Changes since v1\n> - Ensure model string only contains ASCII characters.\n> ---\n>  src/libcamera/camera_sensor.cpp | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index d2679a4b80ce0d42..78c7ceec7c449674 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -200,6 +200,8 @@ int CameraSensor::init()\n>  \telse\n>  \t\tmodel_ = entityName;\n>  \n> +\tproperties_.set(properties::Model, utils::toAscii(model_));\n> +\n\nI'm wondering if model_ should be stored in ASCII. Ideally we probably\nwant to have a model property provided explicitly by the kernel (as\nopposed to extracting it from the entity name as we do now, which is a\nbit of a hack), and that should then probably be specified as ASCII.\n\nAnyway, that's for later. For now, this patch looks good, but I want to\ncomplete the discussions about the Model property before acking it (it's\nhard to tell if it will fit the purpose of what the property will become\nwithout knowing yet what that will be :-)).\n\n>  \t/* Create and open the subdev. */\n>  \tsubdev_ = std::make_unique<V4L2Subdevice>(entity_);\n>  \tint ret = subdev_->open();","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 E40FCBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 16 Aug 2020 13:13:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6D5116138F;\n\tSun, 16 Aug 2020 15:13:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 92B0360918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 16 Aug 2020 15:13:26 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F2A4FF9;\n\tSun, 16 Aug 2020 15:13:25 +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=\"WGXbWiDK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1597583606;\n\tbh=R2d28JbvU3VG+3gt8flQ2D9qSMeAk4iDBhlx3eINra0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WGXbWiDKOME1hzCZcBnXMccJyjB4LWYZDE+jagfJwv9kaijQh3B4/rUp+cexPeqrx\n\t8EkCy57Oz7/xTpTFKll8cFmKuBKJFmqMeTjlAzodXXorutEtooblZm/IlDiimrKNJi\n\tETtC/tjywCsdB/OoqVMIvwSy8fChk6IcUOivnCA0=","Date":"Sun, 16 Aug 2020 16:13:10 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200816131310.GF32174@pendragon.ideasonboard.com>","References":"<20200813223722.4050835-1-niklas.soderlund@ragnatech.se>\n\t<20200813223722.4050835-4-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200813223722.4050835-4-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v4 3/7] libcamera: camera_sensor: Set\n\tsensor model property","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>"}}]