[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b318df5a-bf11-bfb8-aa7a-59d719081f8b@sifive.com>
Date: Tue, 19 Jul 2022 09:20:48 +0100
From: Ben Dooks <ben.dooks@...ive.com>
To: Rob Herring <robh@...nel.org>
Cc: linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
u.kleine-koenig@...gutronix.de,
Thierry Reding <thierry.reding@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Greentime Hu <greentime.hu@...ive.com>,
Jude Onyenegecha <jude.onyenegecha@...ive.com>,
Sudip Mukherjee <sudip.mukherjee@...ive.com>,
William Salmon <william.salmon@...ive.com>,
Adnan Chowdhury <adnan.chowdhury@...ive.com>
Subject: Re: [PATCH 7/7] pwm: dwc: add snps,pwm-number to limit pwm count
On 18/07/2022 21:08, Rob Herring wrote:
> 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 <ben.dooks@...ive.com>
>> ---
>> 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.
For this IP block it is a build time option for 1..8 timers
so I thought it best we don't register non-existant timers
The system we are working on only has 1 PWM timer per block.
--
Ben
Powered by blists - more mailing lists