Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp34750pxh; Thu, 7 Apr 2022 13:10:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZfIPOQfYJf/Lt3ie3ITXfAsPIdbMZwHFhlWCkAPr0l1Ud7QOOO4ApW5ZkhisWjAPh8yGB X-Received: by 2002:a17:903:40cb:b0:157:4d:aa35 with SMTP id t11-20020a17090340cb00b00157004daa35mr5999084pld.135.1649362202704; Thu, 07 Apr 2022 13:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649362202; cv=none; d=google.com; s=arc-20160816; b=ndOZ0jv3o3dld7WJiezDeoj8KbHOqOo7Ts80tPrNgsXdAitQqjxpILpY0IxLMhcpdo kyYy2NUO/SXJthO9qYVMVtMzC1N2p9S+hZ/4Lf5AuAd4+FpsjrfURxYJmk7yaG4FiZeq sbcBP7U1GWWeXUj/9hzZSV3lcmbFiGQswdqnihDHjaW4pTLoQMixxcSaPhBYYvx7eAez iHC+6yzzBq63F8GR+s0RSZ5DiRwn2Gv7W7hy5n39dkErFXuo5od1jO8bmGw/wEBZ7ive /xc3L3OIa9fWVJ9z2tsDv9OUDYmV1MkuoP2Mk5qxNGONit0PT6hdHcwXrvIoQbJMXJZw yq4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+HrqUl2stcAnQOvkV/cLC8sh1bdsuE9uaYRM3SC8TAI=; b=UWW14Ou6ngWJYSRjHAY680JXRpzjjpDni1nIFUMsDwr28WJJSd8Ni3FxFzaRdhvn3H brg0oxbCkSVrS+qa/t0KAPV86RDz62nEop6NZO3SNdST4Uyh5kLYE+sAuC7LVMxjLIK0 BvywXTHTnAXCc7vlF78dF21d1zCZLwrFQwYN4I1uejzn6sgMn1NkXrgY8hrdyq3PLFSK 9vuuJwMmm2XjTGMuCr/Ofrcsm1ZmARu90eIY+iVHJw+itjg9+vSbBPoNlGX2UEy4/d7i OFcqtT1X1q/L4PcUuUckCxhaUEsEDxJD6w8So1T53zz5kpO7rS0ytvevNeVFsGbXaBrS IatA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="QC/NBWbz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a71-20020a63904a000000b0039cc7a7072csi2712519pge.837.2022.04.07.13.10.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:10:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="QC/NBWbz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8FE8A2BE94E; Thu, 7 Apr 2022 12:32:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231358AbiDGOlm (ORCPT + 99 others); Thu, 7 Apr 2022 10:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344139AbiDGOll (ORCPT ); Thu, 7 Apr 2022 10:41:41 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 352611B2156 for ; Thu, 7 Apr 2022 07:38:59 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id n126-20020a1c2784000000b0038e8af3e788so2256810wmn.1 for ; Thu, 07 Apr 2022 07:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+HrqUl2stcAnQOvkV/cLC8sh1bdsuE9uaYRM3SC8TAI=; b=QC/NBWbz8s242GqiqGVCxZjqkf65n2BOMSMdySwx5OMCnmpmfgmy2Gl0mqkViPk58A B0hFl228YREAAGFp1bTWTBF48v9/vcamAwhlivD7F9RoAWhkxTVUUszkElVwniFp+KSW 153YOYtKLxloRx116E1JbzBPjjKXbUaIisB8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+HrqUl2stcAnQOvkV/cLC8sh1bdsuE9uaYRM3SC8TAI=; b=pPMLT6wOPZWlTBe/cU2DenZLe+xblAR60lt+6vrF+BmRfguMV12LoKt9wslznlbPrR HUQhONLHaFLoDM7U1J64BELR6XCLEGHMsK49E8elk/N5drjLLiLOwNkIii7H07N2HgcD Y76HWd3mzfXWPTfjjlKF/ntMJzLwN1k8b7bqnoEOv2zQDVT/ruf8/MRT8gr3y2thmVYX RJ3ynboQEUMPhVFxF7Davk95QUv4Qdq6b/4f3LY8gm2PfccUt1ZzS38szFVzNqryujGj YsTfgmI7xqHgkt+pioY5o2xBywkTzSWTg4SG646zfKR4GOr/Q2OSYf2BO48BjGkv0mFR g68Q== X-Gm-Message-State: AOAM533NBu2whfGyppcqfb/O5cGOX1iuG/LeYD1mhcwLo33qXuefEltE oF5yPJfNpA3wItiDwlKv6DLU7A== X-Received: by 2002:a1c:f605:0:b0:37b:b5de:89a0 with SMTP id w5-20020a1cf605000000b0037bb5de89a0mr12345916wmc.88.1649342337820; Thu, 07 Apr 2022 07:38:57 -0700 (PDT) Received: from google.com ([37.228.205.1]) by smtp.gmail.com with ESMTPSA id bg8-20020a05600c3c8800b0038e4c5967besm7983010wmb.3.2022.04.07.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 07:38:57 -0700 (PDT) Date: Thu, 7 Apr 2022 14:38:55 +0000 From: Fabio Baltieri To: Rob Herring Cc: Benson Leung , Guenter Roeck , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Lee Jones , chrome-platform@lists.linux.dev, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] dt-bindings: update google,cros-ec-pwm documentation Message-ID: References: <20220331125818.3776912-1-fabiobaltieri@chromium.org> <20220331125818.3776912-4-fabiobaltieri@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Wed, Apr 06, 2022 at 10:41:45AM -0500, Rob Herring wrote: > On Thu, Mar 31, 2022 at 12:58:17PM +0000, Fabio Baltieri wrote: > > Update google,cros-ec-pwm node documentation to mention the > > google,use_pwm_type property. > > > > Signed-off-by: Fabio Baltieri > > --- > > .../devicetree/bindings/pwm/google,cros-ec-pwm.yaml | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml b/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml > > index 4cfbffd8414a..9c895c990ed8 100644 > > --- a/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml > > +++ b/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml > > @@ -19,6 +19,12 @@ description: | > > properties: > > compatible: > > const: google,cros-ec-pwm > > + > > + google,use-pwm-type: > > + description: > > + Use PWM types (CROS_EC_PWM_DT_<...>) instead of generic channels. > > + type: boolean > > Either do a new compatible string if the cell interpretation is mutually > exclusive (channel number vs. type) or split the number space for the > 1st cell between type and channel number. IOW, set a bit (31?) to > signify the number is a type, not a channel. Split the number space was my first (tentative) implementation as well, but it turns out that the PWM subsystem really wants channels to be zero-based[1], so I don't think flags or bitmasks are really an option. New compatible sounds good though, I'll rework a v3 with that change. Thanks! Fabio [1] https://elixir.bootlin.com/linux/v5.17/source/drivers/pwm/core.c#L423 -- Fabio Baltieri