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 26E00C61DA4 for ; Mon, 6 Feb 2023 09:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbjBFJxm (ORCPT ); Mon, 6 Feb 2023 04:53:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbjBFJx0 (ORCPT ); Mon, 6 Feb 2023 04:53:26 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5482B1F4BA for ; Mon, 6 Feb 2023 01:53:13 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id j25so6246764wrc.4 for ; Mon, 06 Feb 2023 01:53:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=melexis.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OALBcHyiOKdLr54uUWDTNKeHxszaZfIesV0P4fl0wK8=; b=VIFYf3oxH9pTHspvdDZhugsxik7L0cScUnO3y/bJrX111E+tvEd/bwRXLtxbelM/bh q+9BpHIfbeeitjehJAweYsC3/GnxCIx/7LM3f1Vv2L7y7AVx4TU8yV0gjestCrwgyLiX Ke0ccVLwzbkqdMwkF+yGL6GhYLZ0d4cTzGoRsvN8dV11fBX2IeYmZeXhUhCiOrIjHQsv 9UZxUBxMhNFZYC+kAHx+gL8wfi13ldMSAQPn+NJCNP5jwsKThlyfOtp8WUhnI9ilmEoB OEWh2PlIpLk9ASmH7Uap3he7Q5Q+hT2vC8NksWKgb6IBnVkqHuOjWuCedym3rGNeFqgk d2VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OALBcHyiOKdLr54uUWDTNKeHxszaZfIesV0P4fl0wK8=; b=VVOOPFp8DX+xff+f7+xyMmENJQbT3EJR/obnPoZtpdUq/fYWc8biIn4lCdq9ssMHIO PwlWD9xZOhVJbgvjwCQNINaKF1WT7mPp/fwGfL/fg5y4Rpsp/fIho3M1ytutG/r1KwO1 Jj523cntF9FMBKdfHGLBwXfDJYG0tEf+yKKwd0oO+ia0DRcQ6xCLTR2nuTp6cVhpwkAo ppo8w7ZIJa8OGCi2rMIPpnbp4plhXU93JXYcwo7xCGv2umrkZidHwy527qp8G++jm/le /SCwToPlJUnM7fSidicehNZ4M2F6zHaLHqkJAiW26ey31n1RTLnNdorNk/07FUNL+Tcg lRmw== X-Gm-Message-State: AO0yUKUPCkypp0j+rhPZ6XwSVAcyEqw74rac2BJBqn43VFZOiD8VBDJW UQJioM5ZjE7rGz8RmHAGKGDW3Q== X-Google-Smtp-Source: AK7set/wudvAKqMKIier8OI6uZN6H/gUsSGBWlNJVOF5lc5ZYm6g0ZPJNhJKwJDDf5QLpiPevUG3bg== X-Received: by 2002:adf:f006:0:b0:2bf:b199:c7ef with SMTP id j6-20020adff006000000b002bfb199c7efmr16179901wro.12.1675677191879; Mon, 06 Feb 2023 01:53:11 -0800 (PST) Received: from melexis.com ([91.192.181.19]) by smtp.gmail.com with ESMTPSA id e12-20020a5d500c000000b002c3ea9655easm1533201wrt.108.2023.02.06.01.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 01:53:11 -0800 (PST) Date: Mon, 6 Feb 2023 11:53:09 +0200 From: Volodymyr Kharuk To: Benjamin Mugnier Cc: Sakari Ailus , Laurent Pinchart , Andrii Kyselov , linux-media@vger.kernel.org, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, Hans Verkuil Subject: Re: [PATCH v4 0/8] media: i2c: mlx7502x ToF camera support Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Benjamin, > By the way, was the mailing list dropped from cc by mistake ? No, I just wanted to send a remind about the patch to Sakari and Laurent. Now it looks that this thread became more technical, so I am adding cc again. > >> I took a glance already and the driver seems reasonably good but I'm > >> concerned of the interface. How generic is it? I can't say to be an expert > >> on these devices and we don't have any other ToF cameras yet. Is the > >> precision (8 bits) of the control values enough? > > Fairly, that it is an interesting question. > > The frequency modulation defines the maximum range of object detection. > > 1 MHz precision is what we need usually, as the maximum range is from > > 1.5m(100Mhz) till 150(1MHz) meters then. > > Usually, user applications use 60-80MHz(max range is 1.8 - 2.5meters). > > Also, it is possible to have smaller step then 1 MHz, but it is not that practical. > > I am ok switch to Hz and use u32. In that case we will not be limited for generic case. > > > > Benjamin, what precision is better for frequency modulation in your case? > > Good catch, we do require Hz precision for some frequencies we use. > In other systems we use floats expressed as Mhz for this. As Linux only > supports integers, switching it to u32 and express it as Hz is a good idea. Ok, then I'll redo in next version. -- -- BR, Volodymyr Kharuk