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 8BD9AC43334 for ; Mon, 18 Jul 2022 20:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233830AbiGRUIc (ORCPT ); Mon, 18 Jul 2022 16:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbiGRUIc (ORCPT ); Mon, 18 Jul 2022 16:08:32 -0400 Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B15028E19; Mon, 18 Jul 2022 13:08:31 -0700 (PDT) Received: by mail-il1-f176.google.com with SMTP id r4so2444847ilb.10; Mon, 18 Jul 2022 13:08:31 -0700 (PDT) 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=+I5ZRgBbDf3RPxUCbZaLy/tEPOdK4YJDVpzXOSbpprc=; b=urkqgoBJs/8re8VIbw7XbwWeqD3M3btujHkj0zmSyOHtSnEqtPClbnqOo0X5c/XcRE Obrn702yU+aTE7otsZFuafcJOBLtb7+2TvguhGy569/nXsm9o6f0iEJJYJbq3R197Ch7 chJZN3uESrptKVs2pdr3SCliB8oiuJFpMPUoex6JRsHucfiOT755nM3on9S3+nPmXy5+ TG4fFWoHLxAQMC1gIjvlXOzakHUeCB4W1ZyTu/KTdK2GgQUNAwondqWuD0xhNRWYmrBd i1FsJBcGxDpoftmzMkBzn5P/yzQUmAS5WFP2ax4HsHKRHYgHawuaTc0/ASWqqIb3WfQh XcQg== X-Gm-Message-State: AJIora9S+qbPmDSPMS5a2EpCy6Jmkw/spcJZwqxlSb1OMq0Y9cLycNZl Kh6BuMbkIT6yInaKWOXf/g== X-Google-Smtp-Source: AGRyM1tR7+ejhnEnx2w/BdniU0UfUO8r5ulQM83VlmIFvYsjDUHUS4lrU8jhwpfyzU+EPv7TFwnmog== X-Received: by 2002:a05:6e02:1405:b0:2da:c72f:e3a7 with SMTP id n5-20020a056e02140500b002dac72fe3a7mr14370733ilo.113.1658174910682; Mon, 18 Jul 2022 13:08:30 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id c7-20020a056638028700b00331b9a3c5adsm5759039jaq.170.2022.07.18.13.08.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 13:08:30 -0700 (PDT) Received: (nullmailer pid 3461504 invoked by uid 1000); Mon, 18 Jul 2022 20:08:28 -0000 Date: Mon, 18 Jul 2022 14:08:28 -0600 From: Rob Herring To: Ben Dooks Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , u.kleine-koenig@pengutronix.de, Thierry Reding , Krzysztof Kozlowski , Greentime Hu , Jude Onyenegecha , Sudip Mukherjee , William Salmon , Adnan Chowdhury Subject: Re: [PATCH 7/7] pwm: dwc: add snps,pwm-number to limit pwm count Message-ID: <20220718200828.GA3453680-robh@kernel.org> References: <20220712100113.569042-1-ben.dooks@sifive.com> <20220712100113.569042-8-ben.dooks@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220712100113.569042-8-ben.dooks@sifive.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Jul 12, 2022 at 11:01:13AM +0100, Ben Dooks wrote: > Add snps,pwm-number property to indicate if the block does not have > all 8 of the PWM blocks. > > Not sure if this should be a general PWM property consider optional > for all PWM types, so have added a specific one here (there is only > one other controller with a property for PWM count at the moment) > > Signed-off-by: Ben Dooks > --- > Documentation/devicetree/bindings/pwm/pwm-synposys.yaml | 5 +++++ > drivers/pwm/pwm-dwc.c | 8 ++++++++ > 2 files changed, 13 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pwm/pwm-synposys.yaml b/Documentation/devicetree/bindings/pwm/pwm-synposys.yaml > index 38ac0da75272..15bdf764b46a 100644 > --- a/Documentation/devicetree/bindings/pwm/pwm-synposys.yaml > +++ b/Documentation/devicetree/bindings/pwm/pwm-synposys.yaml > @@ -30,11 +30,16 @@ properties: > - items: > - const: snps,pwm > > + snps,pwm-number: > + $ref: '/schemas/types.yaml#/definitions/uint32' > + description: u32 value representing the number of PWM devices Why do we need to know this? Are you going to have a consumer to a non-existent PWM? If you do need to know how many, it should be implied by the compatible string. Rob