Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp203361lqg; Wed, 10 Apr 2024 23:06:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWua0Yf/cx2gxJMsA4+J3AKVA8n5lzFk7qSS6xKAgqXDhswcos0dYsDo8F5X07aqgx3/PRkqDklNNQm4bWQTPFDq69waWVTSd0U5ZDXKw== X-Google-Smtp-Source: AGHT+IG+XmhA3NW2sb0xbYhjfUwydvYC3Nlsj/HF4fRKYKpa5MC+WjeFzBCooRkZB/pows3j018y X-Received: by 2002:a50:cd5d:0:b0:56e:2cbc:db77 with SMTP id d29-20020a50cd5d000000b0056e2cbcdb77mr2895398edj.33.1712815584622; Wed, 10 Apr 2024 23:06:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712815584; cv=pass; d=google.com; s=arc-20160816; b=gPDOtoCE56JXvB11aGvM7gb7O8HGRBE1tVEArdikgfJZ6MJNI8zq+YgWUl7wR/79Yi RiAup3cof2w2HMrME+22toX1fHHaKGyV8fF6XBu48+DBTo4Be6eze/gKBndrUFjV4ezU +LJQQVvbXfNo9xaqNXE1xLZNJU/qClZoaGrv1T24DaYR2SxN3ced3VJdhb/Pz42kSV0K A0k3ggQO9F5kW+2GoP481N2ImRsjWKhb7N1ltygtUD0NzgBP8xqvqCDinNBS+eVuS5NC 4TEbTabxyodt/29Ty3RjTGJaHT+3mubQLhktoJYcIxvXV4jvKXpzayvYc6uqSw8A9jWQ ej3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=9z3qJWORb0OsrTWyxdcnuWNDBtw/eS4irvDABHIBv5s=; fh=JMEF0uNaQfF8mFtzjgLz6Z06DR80oGl8URWYbxiJ9MY=; b=wHPASyJVleCahFPrhXPvl8orMvk+3Bohd9C8SdwySeKlApCx0jUtKy0zTxI9BmimwV FjyFZNYhRZAofWTXDaDH9X87Ie7AbJL5lLpCa/jSmyiYhmWCguV7lbo7eDmwx5KDSBuH 71PbgbpjKiK5NhVd6j/J4/anbnBoy+MSDiIsWv0tkaffW634il/fAgNT2hUQYh7V+grE SLGonM+9LFLe4pfkFXAQgw+5BUbwrlKn/jmwDhSJkzo8rfj/HBGKQ99XUv1SZB2cokwr vQimGcwcv9XffiP7YrtTvfB75zWRJw250ZjXkSEv0lHwsrn5Fb5DWZfwTnBTlquoUv89 C3NA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I/HLMtCY"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139812-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f6-20020a056402354600b0056e0a0ef4c3si418232edd.682.2024.04.10.23.06.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 23:06:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I/HLMtCY"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139812-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 088861F25957 for ; Thu, 11 Apr 2024 06:06:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 869C013CA97; Thu, 11 Apr 2024 06:06:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I/HLMtCY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75D6813C3F4; Thu, 11 Apr 2024 06:06:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712815570; cv=none; b=DqtPDHpYZV1SFzhNdllGS/UlFA7YO/7YTGvKAv98K2PtpKYQNv1GF6dWlVS4UmpZGnveSV2qoChuwDbkPFeEJziw+hNJoXVbjEReb4fFmzsLXvFbcQNA8hhJ//KRhIG9Dc0gwo01khZEBhgqGu3vKJxC2t+koDWeWBOnuIRKBy4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712815570; c=relaxed/simple; bh=vCSO/IPczaOAqHvsW6X71iBblmOF6snz5KBE39VGiBc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qefWui5Yv+uj53+VnAih4dVDq8YfII9NtEZQE/cIkIXBfaFGkIq129P9Fi837uVMWCRWPOa0A8xlu6HjIzVsm4LPJjO92itKtCIOfoIg+htQx/0EDc/Qy3bP0vLY5SGcDcCPiwlxHs536SixiZGI/vvlScRD/wKyXAKQ7afoKQA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I/HLMtCY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29BF9C433C7; Thu, 11 Apr 2024 06:06:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712815570; bh=vCSO/IPczaOAqHvsW6X71iBblmOF6snz5KBE39VGiBc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I/HLMtCYzFdGiq1NHLwevQ7ENuRu3WXxXJs9RfKw61NxVairBT3bNCXSKVPXS4QmQ hoVtV8u+02YyrtR0Lw2epyApFdMEU0zKvnKn1y3pCmkzEF5/b8hRFdl8CSh102wDs0 T3wUgtRr33eZUTLc56sHKNkHI+7FFOaSlcZD0ap4jO4oj4DXS8bV2WmhtV/Pw86JY5 YTSDq5X32YzZkB3KsPMiI55ufm3pev3b9rEud09/0JohwwJwdtS9x5qeWQPKcmHDrf RmANGaYarpAXXZoUA415V4jkU7feikaW1f9jCpoEjWbWICDWgJa/yffgXr7nuwJaS1 XvmfwAmS6vAag== Message-ID: <9e41a61d-3607-4698-b942-78fca235afd2@kernel.org> Date: Thu, 11 Apr 2024 08:05:59 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] media: dt-bindings: i2c: add Giantec GT97xx VCM driver To: =?UTF-8?B?WmhpIE1hbyAo5q+b5pm6KQ==?= , "conor@kernel.org" Cc: "heiko@sntech.de" , "linux-kernel@vger.kernel.org" , "laurent.pinchart+renesas@ideasonboard.com" , "yunkec@chromium.org" , "linux-mediatek@lists.infradead.org" , "linux-media@vger.kernel.org" , "hdegoede@redhat.com" , "bingbu.cao@intel.com" , "paul.elder@ideasonboard.com" , "devicetree@vger.kernel.org" , "andy.shevchenko@gmail.com" , "mchehab@kernel.org" , =?UTF-8?B?U2hlbmduYW4gV2FuZyAo546L5Zyj55S3KQ==?= , =?UTF-8?B?WWF5YSBDaGFuZyAo5by16ZuF5riFKQ==?= , "p.zabel@pengutronix.de" , "alain.volmat@foss.st.com" , "conor+dt@kernel.org" , "sakari.ailus@linux.intel.com" , "robh@kernel.org" , "hverkuil-cisco@xs4all.nl" , "tomi.valkeinen@ideasonboard.com" , "linux-arm-kernel@lists.infradead.org" , "matthias.bgg@gmail.com" , "mehdi.djait@bootlin.com" , "krzk+dt@kernel.org" , "angelogioacchino.delregno@collabora.com" , "10572168@qq.com" <10572168@qq.com> References: <20240410104002.1197-1-zhi.mao@mediatek.com> <20240410104002.1197-2-zhi.mao@mediatek.com> <20240410-rice-fringe-4ae992217a2f@spud> <5317cb9b01cf5668837ad7ccdcb9eb72b95d98d6.camel@mediatek.com> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzL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vhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <5317cb9b01cf5668837ad7ccdcb9eb72b95d98d6.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/04/2024 04:04, Zhi Mao (毛智) wrote: > Hi Conor, > > Thanks for your review. > > On Wed, 2024-04-10 at 12:27 +0100, Conor Dooley wrote: >>> >>> >> Hey, >> >> On Wed, Apr 10, 2024 at 06:40:01PM +0800, Zhi Mao wrote: >>> b/Documentation/devicetree/bindings/media/i2c/giantec,gt97xx.yaml >>> @@ -0,0 +1,91 @@ >>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>> +# Copyright (c) 2020 MediaTek Inc. >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/media/i2c/giantec,gt97xx.yaml# >> >> Filename patching compatible please. >> >> > Sorry, I don't catch this point. > Can you explain more details? s/patching/matching/ Use compatible as filename. >>> >>> >>> + >>> + giantec,aac-mode: >>> + description: >>> + Indication of AAC mode select. >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + enum: >>> + - 1 # AAC2 mode(operation time# 0.48 x Tvib) >>> + - 2 # AAC3 mode(operation time# 0.70 x Tvib) >>> + - 3 # AAC4 mode(operation time# 0.75 x Tvib) >>> + - 5 # AAC8 mode(operation time# 1.13 x Tvib) >> >> I dislike these enum based properties and I would rather this either >> be >> the values themselves (0.48, 0.70 etc). >> >>> + >>> + giantec,aac-timing: >>> + description: >>> + Number of AAC Timing count that controlled by one 6-bit >>> period of >>> + vibration register AACT[5:0], the unit of which is 100 us. >> >> Then the property should be in a standard unit of time, not "random" >> hex >> numbers that correspond to register values. >> >>> >>> + giantec,clock-presc: >>> + description: >>> + Indication of VCM internal clock dividing rate select, as >>> one multiple >>> + factor to calculate VCM ring periodic time Tvib. >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + enum: >>> + - 0 # Dividing Rate - 2 >>> + - 1 # Dividing Rate - 1 >>> + - 2 # Dividing Rate - 1/2 >>> + - 3 # Dividing Rate - 1/4 >>> + - 4 # Dividing Rate - 8 >>> + - 5 # Dividing Rate - 4 >> >> Same here, you should not need these comments explaining the values, >> use >> an enum with meaningful values please. >> > About "aac-mode/aac-timing/clock-presc", we test this driver with > default settings accroding to SPEC and VCM works well, so I will not > export these property in YMAL and let driver use default settings. > How do you think about it? You must remove them from the driver code in such case. Best regards, Krzysztof