From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 361D12C0296 for ; Sat, 7 Feb 2026 17:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770485567; cv=none; b=JJQuzBpGeE8UCI6L2RbiWXk8GrpcLhsc/a0FiHjBWM3B3r5oxdG9tg19hWPNBcvphYJSFvKBbJaqm8pRlOo1COXoaXpPhidfJS1r4y2caY+dyWohaTDDn5hrtE20IbViLlfRknh8qAJ6ZV3Y1zbStzrzjdXlltgZyw1lXwWhL4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770485567; c=relaxed/simple; bh=mbdvc8VVIqopX1Vzy1e1gyb6kEFS8DeARiMueZ1xiBE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YNXEYfvtevgwndictSlorCQNbBVzc8touLLjiQvTtTdVn4xaKrPYt2EYwuKseVlXBLSLx9JXt8PjRRN2ppsqCA5pMrbnrYZf3K/a8SC3AuBISFqn16rfU+2q1Z0lq/Gq/upjO8GAqm/LBpiw/dNGIJUTRCtDuf6DITk5yUwZrDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=L+TniqAz; arc=none smtp.client-ip=209.85.160.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="L+TniqAz" Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-40970f97638so2106244fac.3 for ; Sat, 07 Feb 2026 09:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1770485566; x=1771090366; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=04RyWScqmBoYy5xQezR1UYciFGs+VCZldXp8aMU72hU=; b=L+TniqAzjlmXgglq63iWzuvmPEjakHCvixI4G4suUcVk2nTDU7JJAUsC8BAoMmgHBp 1Cvab7pHN2j7tMaqTCDNIdCxyGhDDbirTyLSCgpH0OCmtDcmZqLlu/BSBO5ac4K61kGF X4CMGdFs1CmRljqOPgL44zIi/hSwZiCZ+vfU5qDNcML6U0ingjZ54Cp5UT7jR4pIgYwv 4dEgz/jnQYiohidAzxu9wD1EBlh36AacAZtqYwu+ZTg8IKqHgqFxG8i1FHZOJDrAWwKT awjIuIsMXYTm0WZ7AWa3r2tqHdyujVb1GJ58bO1KR73vOooU++JoEJNMN5izEUurCBaG /brA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770485566; x=1771090366; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=04RyWScqmBoYy5xQezR1UYciFGs+VCZldXp8aMU72hU=; b=a5OSuuOq7ApOqnYYvVw1H2sfgNlxVPv8PiuI12PjNiInoyN2PzFvaONc3a0UrNATGd LSuxk2OXTQs2cp6UTwf2r2XECAGDTI+MLnbWap+rVGz23UAYaqhfJlBB/+RJjZiIo+D9 MI6jXgu714cbnDK/ZCYFvW+zrTS8A3X7zapqNxQHNFQplbaw9kFlNeE4znAn0XYBszOA hNQjtovbHRRLYjCEvbyQEydWvV9survt3SJkFJiZ+k+3Y7NPj0Ng8Cv9SwaOySlpCGgp r185cNfpK2osobnYHs1RyfNE+xeS9HERkeGEn6f9LqpHM2JPo/Zw66FonZY6t7sDG09G u9xA== X-Forwarded-Encrypted: i=1; AJvYcCWmLiOuLpxESLv6M5vxFvByatw/ivtKlLENN4+CiVgrD6fOZHQTkoT1X3QeE4k+3awUKOjbJiVLcICZlQ==@vger.kernel.org X-Gm-Message-State: AOJu0YxmnUVLix+tFGjZAntTIjuBkFpN+rSq52/EV4e8UNVFZJLOczan DfyLsYcuLTgFtJ4yw0YXTmJLrl5pATOAFK+7yUMhtKkCI1eg4g+23CU54dpO3Fl/Two= X-Gm-Gg: AZuq6aJPVMY0+3F1eDps4PV2Xqg4gyEqsE6T+wcR1unJ3SLKFrp4cdVE9DuuxLoHsNw EwTlF+niup3ATf01bsESoOP4sOm+EB2u8HVspQUVUX8JsY7G1S/gFH0CjmBP6IhqBkzR+bRolnF EZz3aKvRhV6A3mvUykkBwER9nZ62dW1XKAxqssHZfT6KVhLbv1W9U7stQeXRKxjXmVor2XKI6sD PTu/mk2vSFeShAjG55FLVYfrcrlZPoil2P8ZK0M7rrWzSl8QxVNjDdzjUL5XUx6gHa0XU9x/nPN YOYgwb+Rf7Cvc6R8MRAchR3tqMBO+wSNR8RaFlRdnfesv87VtXyBvgmoZs/eZLkg6bOXvnxpeXH zD2+FIKhS+L5Ua/b9mzhWEwl977hcpXvzXwM2rqvFWk88Py/PBDR7hpbEJoa7ZsTbBaIoiPlcaq zdZUwF7CT57CdICKyN+2VfQPDOLmXensN+iaLxaOHOZD1E2q5T8mkOMyLN1w== X-Received: by 2002:a05:6870:9e92:b0:409:4c35:a3ca with SMTP id 586e51a60fabf-40a96c96a6amr3389724fac.15.1770485565962; Sat, 07 Feb 2026 09:32:45 -0800 (PST) Received: from ?IPV6:2600:8803:e7e4:500:74a6:843b:f33:21ae? ([2600:8803:e7e4:500:74a6:843b:f33:21ae]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-40a99787738sm4457915fac.15.2026.02.07.09.32.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 Feb 2026 09:32:44 -0800 (PST) Message-ID: <51eddfc0-9f23-4a7f-8729-19775d834c0b@baylibre.com> Date: Sat, 7 Feb 2026 11:32:42 -0600 Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 01/11] dt-bindings: regulator: cpcap-regulator: convert to DT schema To: Svyatoslav Ryhel Cc: Rob Herring , Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Lee Jones , Pavel Machek , Liam Girdwood , Mark Brown , Dixit Parmar , Tony Lindgren , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org References: <20260206172845.145407-1-clamor95@gmail.com> <20260206172845.145407-2-clamor95@gmail.com> <20260206230922.GA254792-robh@kernel.org> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2/7/26 11:25 AM, Svyatoslav Ryhel wrote: > сб, 7 лют. 2026 р. о 19:19 David Lechner пише: >> >> On 2/7/26 3:20 AM, Svyatoslav Ryhel wrote: >>> сб, 7 лют. 2026 р. о 01:09 Rob Herring пише: >>>> >>>> On Fri, Feb 06, 2026 at 07:28:35PM +0200, Svyatoslav Ryhel wrote: >>>>> Convert devicetree bindings for the Motorola CPCAP MFD regulator subnode >>>>> from TXT to YAML format. Main functionality preserved. >>>>> >> >> ... >> >>>>> +properties: >>>>> + compatible: >>>>> + enum: >>>>> + - motorola,cpcap-regulator >>>>> + - motorola,mapphone-cpcap-regulator >>>>> + - motorola,xoom-cpcap-regulator >>>>> + >>>>> + regulators: >>>>> + type: object >>>>> + >>>>> + patternProperties: >>>>> + "$[A-Z0-9]+^": >>>> >>>> I thought it was said on the last version to list the names. Considering >>>> you already have them below, better to put them in schema than prose. >>>> And pretty much all regulator bindings define the names. >>>> >>> >>> What exactly do you propose? All those names will not fit into a >>> single unbreakable line (more than 125 columns in length btw). Patch >>> checker will complain about this. Duplicate pattern properties for >>> every few names? Please be a bit more specific. Thank you! >> >> Making checkpatch happy is not a hard requirement. If you have to >> go over 125 characters for technical reasons, no one is going to >> complain. >> >> I already gave an example on the last version. It is just a regex >> expression. (And note that you didn't fix the $ and ^ either. ^ >> means beginning of the line and $ means the end of the line. So >> the pattern currently won't match anything.) >> >> patternProperties: >> "^(SW1|SW2|SW3|SW4|SW5|...)$": >> >> >> And I hope it is obvious that you are meant to replace ... with the >> rest of the names separated by |. >> > > David, thank you for your suggestions and I did not want to offend you > nor Rob, or ignore. Using this large string IMHO feels a bit wrong. No > offence, I will use it if required. At the same time I was > experimenting with possible representation and come up with smth like > this: > > patternProperties: > "^SW[1-6]$": > type: object > $ref: /schemas/regulator/regulator.yaml# > unevaluatedProperties: false > > required: > - regulator-name > - regulator-enable-ramp-delay > - regulator-min-microvolt > - regulator-max-microvolt > > "^V(CAM|CSI|DAC|DIG|FUSE|HVIO|SDIO|PLL|RF1|RF2|RFREF)$": > type: object > $ref: /schemas/regulator/regulator.yaml# > unevaluatedProperties: false > > required: > - regulator-name > - regulator-enable-ramp-delay > - regulator-min-microvolt > - regulator-max-microvolt > > "^V(WLAN1|WLAN2|SIM|SIMCARD|VIB|USB|AUDIO)$": > type: object > $ref: /schemas/regulator/regulator.yaml# > unevaluatedProperties: false > > required: > - regulator-name > - regulator-enable-ramp-delay > - regulator-min-microvolt > - regulator-max-microvolt > > Will this be acceptable? It passes checks I think we would rather have the long match string instead of repeating the rest of it multiple times.