From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 339DEC433EF for ; Thu, 14 Jul 2022 10:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235011AbiGNKpu (ORCPT ); Thu, 14 Jul 2022 06:45:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234714AbiGNKpt (ORCPT ); Thu, 14 Jul 2022 06:45:49 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13E0051406; Thu, 14 Jul 2022 03:45:48 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B5634383; Thu, 14 Jul 2022 12:45:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1657795546; bh=Ab93lb7xcIdvu5COypX33XV/lf1e2aV4lLRU5eabX8c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lk0t3Ssx34x6cAwNdtY5leEoPQ81ZeAgDQsO+Y0015xJacc4cpWRw9YKT7DoyOnD6 tO50dmdnIrlJppuXXipmNXTvxGeEOu4rbbBZTxD2pWAsMg3w+xgSTQ3gcuiPvLo6oO wALzUvLArLDoKBj6wXaIaFZC8xwx9E5sohdEBepU= Date: Thu, 14 Jul 2022 13:45:16 +0300 From: Laurent Pinchart To: Krzysztof Kozlowski Cc: Volodymyr Kharuk , linux-media@vger.kernel.org, Andrii Kyselov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Hyun Kwon , Michal Simek , Kieran Bingham , devicetree@vger.kernel.org Subject: Re: [PATCH v2 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding Message-ID: References: <712c1acff963238e685cbd5c4a1b91f0ec7f9061.1657786765.git.vkh@melexis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Jul 14, 2022 at 12:35:52PM +0200, Krzysztof Kozlowski wrote: > On 14/07/2022 12:06, Laurent Pinchart wrote: > > Hi Volodymyr, > > > > Thank you for the patch. > > > > On Thu, Jul 14, 2022 at 11:34:47AM +0300, Volodymyr Kharuk wrote: > >> Add device tree binding of the mlx7502x and update MAINTAINERS > >> > >> Signed-off-by: Volodymyr Kharuk > >> --- > >> .../bindings/media/i2c/melexis,mlx7502x.yaml | 146 ++++++++++++++++++ > >> MAINTAINERS | 1 + > >> 2 files changed, 147 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml b/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml > >> new file mode 100644 > >> index 000000000000..4ac91f7a26b6 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml > >> @@ -0,0 +1,146 @@ > >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/media/i2c/melexis,mlx7502x.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Melexis ToF 7502x MIPI CSI-2 Sensor > >> + > >> +maintainers: > >> + - Volodymyr Kharuk > >> + > >> +description: |- > >> + Melexis ToF 7502x sensors has a CSI-2 output. It supports 2 and 4 lanes, > >> + and mipi speeds are 300, 600, 704, 800, 904, 960Mbs. Supported format is RAW12. > >> + Sensor 75026 is QVGA, while 75027 is VGA sensor. > >> + If you use compatible = "melexis,mlx7502x", then autodetect will be called. > > > > I'd move this last line as a description of the compatible property, but > > I'm also not sure this should be mentioned in the DT bindings, as it's a > > driver implementation detail. I'm actually not sure we should support it > > with three different compatible values as proposed, as without this > > documentation users will have a hard time figuring out what compatible > > value to pick. > > > > One option would be to support the following three compatible values: > > > > compatible = "melexis,mlx75026", "melexis,mlx7502x"; > > compatible = "melexis,mlx75027", "melexis,mlx7502x"; > > compatible = "melexis,mlx7502x"; > > > > The last one only would trigger autodetection. I'm still not sure how to > > document that properly in bindings though. > > I missed that part of binding. > > Wildcards are not allowed in compatible, so mlx7502x has to go. Really ? We've had fallback generic compatible strings since the beginning. > Anyway what does this autodetection mean? As far as I understand, it means that the driver will use a hardware identification register to figure out if the sensor is a 75026 or 75027. The upside is that one doesn't need to change the device tree when swapping between those two sensors. The downside is that the sensor needs to be powered up at probe time. Depending on the platform, one of those two behaviours is preferred. Auto-detection is nice, but in laptops or tablets (not a use case for this particular device, but the problem applies to camera sensors in general), it would mean that the privacy LED of the camera could be briefly lit at boot time due to the sensor being powered on, which can worry users. -- Regards, Laurent Pinchart