Received: by 10.192.165.148 with SMTP id m20csp4125476imm; Mon, 30 Apr 2018 12:11:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpm0WoBRoPmYAGpd8IYBYguHF/gurYSYEPMJRxz5WhosDWFA97lep7rWFXvGT8GTFqr9LV X-Received: by 2002:a63:a60a:: with SMTP id t10-v6mr11033132pge.357.1525115473312; Mon, 30 Apr 2018 12:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525115473; cv=none; d=google.com; s=arc-20160816; b=mh1rtVsyXjFOs3JHX3ru6KUtp05D8pI/QoZeme0tzDta29tX5NBFZjrT5J7g/1lvjr Eq5NXOUeldoBk1q7bMh5gKDhvWwI515CixskbXE+XnpaX4I4dap5it7RFUB5KfQCKCk4 Keu14G6HhkZH/JigxOTeVJBHV58if0aSiBnKsy12Rv/vi7A7JdBUUzWsXhM6WMRS7rCD JXyfAXYGiHg5+d0LDfvZB2gm0J8Yp0Nt6g6sDHaPKndNQFwN/NQkph2KfZgCXdDxt9HD tkKQjc1qo6r2jgPv5sqG/RweHi+OXo2vvQlfQomoxoBRmRRm1d6iHoDc+Dlg2wbAKZqe GtZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qKig4i9jmiklR+IzaWxctFRgiGIHA3Wz65EUnu/5Jjk=; b=QUJALD5o7O+yipVT1ujlSWWMlmGFBd8kIqoOYqbzKcqJKIj3Cu2YbeUUGgCC+Gfc2t mgqnFWWLjGGeQD3VyispebP6w1sOPndfl/DC7FOJPlhknd7griGYRfuvUW9HIYyX4zwK 6Pf48M5DcswdfEdbzmYbe4WPWfWTe0mipVa8x3+I+jz8lTkef1ympmVsAuD0jNgLc/u9 HQbd9NEXbiuM9zt3HC41VYnUt6Y2y2DjZZWCdbDbCpcU0RldCyLsVCUceV6CuOKCoRLc WrkAb6+hpiQpWyzTaOEh+qMRjWlaHVgrdhGrvQIKnGN2WtQJIVbcbDkPRelEK14b0NJF 50Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Ii4frZoj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5-v6si6549695pgt.68.2018.04.30.12.10.59; Mon, 30 Apr 2018 12:11:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Ii4frZoj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754883AbeD3TJf (ORCPT + 99 others); Mon, 30 Apr 2018 15:09:35 -0400 Received: from mail-yw0-f180.google.com ([209.85.161.180]:34914 "EHLO mail-yw0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754639AbeD3TJa (ORCPT ); Mon, 30 Apr 2018 15:09:30 -0400 Received: by mail-yw0-f180.google.com with SMTP id q17-v6so2917310ywg.2 for ; Mon, 30 Apr 2018 12:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qKig4i9jmiklR+IzaWxctFRgiGIHA3Wz65EUnu/5Jjk=; b=Ii4frZojzjdJiMmJRZs6I2AkIgZhcVl2UeP2/5AGb3tmNNNVv73af/1aV1rkGlUI7x 4reI+yo5tRYjj89MJu2qYFInN0gAMlUpeEL2koa2QLqAOh46/E61/IBjuR5hU5ZjlFlu gqFyXt97Fy5y7Vv7kG1IHqMm3MykPpMiuBh8SdRcavNlak3YwSmBam8RaxRNSmLpJuAt 8pP2MB+CKeM4cc7psluKtCRjQUOqRck6E2KhTUIj2ZxaCHMX59+ovSbnR/B8LCpEcMAR rHt1ZVuhbZCClQ81tSGOyRNc35yJ7lGGNmH7I7B9shT+vMcsqKjbMBzn39Uvo0SDrtDe bvfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qKig4i9jmiklR+IzaWxctFRgiGIHA3Wz65EUnu/5Jjk=; b=FxoQunE8xbgJqgeP5kvT6t8W2QUR9FqlYQaQYM9Fc6roe9PchWhVEDIhqtpoXKqGFc VgIV92Ka/8y6ctTKPGWL3CmwhR9X6/cuqRaX01nJFPesuR2NZGMpdWfT5q2iSPJWQ08/ yYjGPUG5feNFN/jHWkns2UfVyt+xH57C4YEe2uUrOcLqDu1YwWkLhX+NVXHkKszUgHtr tirPR+VpHpEcSvwSOs5yqM24F+zRfsDpeTCw01aNJ56osWCW51C1j5g958wB1VEU+P+S dackBKW16bCQxDkgnG1sU602x05PQLPXNZAcs+oEm8WsrqlksTu2RBuobCzJ34tX3cSz 0drw== X-Gm-Message-State: ALQs6tBcr+Vfx2T2hpQzq+OpG0N6Wf4q7Zxj6QT1zC5euOD/vUvP/iiC tICmumJLDdLLOw40QlAOfvxueAAmBx9+9KMVamE68g== X-Received: by 2002:a81:2756:: with SMTP id n83-v6mr7126629ywn.290.1525115369564; Mon, 30 Apr 2018 12:09:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3dc7:0:0:0:0:0 with HTTP; Mon, 30 Apr 2018 12:09:29 -0700 (PDT) In-Reply-To: <20180430082750.GI2484@ulmo> References: <1524869998-2805-1-git-send-email-wesley@sifive.com> <1524869998-2805-2-git-send-email-wesley@sifive.com> <20180429055417.GA10221@mithrandir> <20180430082750.GI2484@ulmo> From: Wesley Terpstra Date: Mon, 30 Apr 2018 12:09:29 -0700 Message-ID: Subject: Re: [PATCH 1/3] dt-bindings: added new pwm-sifive driver documentation To: Thierry Reding Cc: Rob Herring , Mark Rutland , =?UTF-8?Q?Andreas_F=C3=A4rber?= , =?UTF-8?Q?Noralf_Tr=C3=B8nnes?= , David Lechner , Alexandre Belloni , SZ Lin , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 1:27 AM, Thierry Reding wrote: > I don't like the idea of specifying something in DT that is completely > approximate because it doesn't give users any kind of control over what > is considered acceptable. In some cases an approximation to within 10% > might be acceptable, in other cases users may only want to allow 5%. In > this case there's even no way to catch or report a deviation from the > desired value. My view was that you basically don't have period control on this IP. You can give it a target that it tries to get as close to as possible, but there's no guarantee of any kind wrt. the period. I saw there were a couple other PWM drivers which had no period control whatsoever. They just allowed duty cycle control. Because this IP has such a broken period-control interface, I was essentially trying to bin it in the same category as those drivers. Perhaps I should just remove all pretense of supporting period and just always default to the fastest period possible? > How about you allow users to specify a valid frequency range with > something like: > > frequency-range = ; > > or > > period-range = ; Ok, but now you have to define what happens if a clock change prevents you from staying within this range. Rejecting the clock frequency change does not seem a good option for the actual SoC for which I wrote this driver. There, all the PWM does is drive an LED bank and clock changes are used to change the core frequency. > you could disable the PWM if it was fed with an invalid range. Is that really desirable behavior? If the period is defined as being best effort for this PWM IP, which is essentially what I've done, it's clear you want the PWM to continue to operate. That's certainly the behavior I want on the actual SoC with this IP. I'll make all the DTS changes you guys suggested. ie: "-v0", clarified clocks description, and remove unused interrupts comment.