Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4500404imm; Mon, 15 Oct 2018 16:20:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Ss8Qs49UmUnIJVthjzAp7KDpZsl3Jh1jvq49WGGowsTDcm/eJzsCqzddiugy1issPm0FI X-Received: by 2002:a62:c186:: with SMTP id i128-v6mr19582823pfg.248.1539645608978; Mon, 15 Oct 2018 16:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539645608; cv=none; d=google.com; s=arc-20160816; b=HF2ZsFbtxFBifl/OJbRowR/kxJYLPkfBY8bHA4Dzs6wj809Cn0LhnRlbXoMccXz5ZQ 0OrEaDjIKrHOMzLdLoTLSkcvIj5L+3tPAY2zKueAx5rrKKPee7TAIBsQ+8eo6E7b9wrh QSm2g8BHYKma3AefRbny3afnrGXKGjgRddiL09FOhhmoZ0zT060wOOuv9DH3z6la8NUO 8sCosxnDd2V245IdqkNQbzzUH7SV9g9VDGiYu8qYRmT1qrvgzR5cqpOvUKR8FGG/6Avx H6h+/+EpvY1v+MdSe0Lqy/ezIHT8sQaQvX0+dr3xOVSXdl1gtMsszFFVvLlEOlAkojRW VzGg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=sfgvSs63g/h45RD9rTLDUMJIpOacz1g63SGkw+GTkTo=; b=zgkn7aVovQteKsPipVX6tn3Q0cY9u81Gt/k9Vl4nHSGqhYUjDkXWBBcJGFHB1XeLtQ 9tlkCLjzGZZMA5HZbPdGoz7FkGKxpCLTFIPn5tKeR5zZGdhm5IHhNxwFXxQHoSfg+2tp Fch47de4GbCU81sfb5QtpQZg1F5PgfL3qspXJLKKePQyoheUZpRXfWZqiIa+bh9hwnI0 SO72HSIMSNBNjwABGqGU/owEu0Pa3rjC21u6ed1LNGA4YRFUH6/PAohjK1Mdbh8BDUGQ Yps7b85Ba41KWp5aSNSMTG7sVXCDkzdUB+RFaTSSJ1FNTy6L0Bvwf+tB0tAwncFembo9 fULg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hbGIrbOt; 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 w18-v6si12323569pfg.70.2018.10.15.16.19.52; Mon, 15 Oct 2018 16:20:08 -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=hbGIrbOt; 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 S1726989AbeJPHG6 (ORCPT + 99 others); Tue, 16 Oct 2018 03:06:58 -0400 Received: from mail-yb1-f172.google.com ([209.85.219.172]:46573 "EHLO mail-yb1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbeJPHG5 (ORCPT ); Tue, 16 Oct 2018 03:06:57 -0400 Received: by mail-yb1-f172.google.com with SMTP id o8-v6so8169034ybk.13 for ; Mon, 15 Oct 2018 16:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sfgvSs63g/h45RD9rTLDUMJIpOacz1g63SGkw+GTkTo=; b=hbGIrbOti+zWYy9rq/oXHCiNRqhWLt8AI7qGGdBhY+qHKwh+MVG6+EwnLtzUsB09RH +hWBRTmQ0GKOi9aZ28dOsEWakdbiM9YjBytj6z9Nm+2nzymAfpe7B9LBzGglw0GRfi7t Jwn8LGEihzgXlpnPd1P93IkWfsbdatemPLOWJA8jgRqySH8/veQPaYm4OxJkUA0Hf4hJ bfvwOVvgPmUKe4F951PtMEWTbZqSpdfpGGAB2J+GUPNfkTA3eYhR/eG8KPlCv64ZnSbr EHCaKheg2Cvo5VJOBFEvDPm1omuuVnkwcTKSoSKVeBMJM8mmsPInI63UTuKMrwkIWr1e oqIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sfgvSs63g/h45RD9rTLDUMJIpOacz1g63SGkw+GTkTo=; b=cvy1ks9GXs0ZP6gISpYdNxlzVhctrg8Aw953dX0x+CJLHuBeq2yc/lmdEMRuEmXa/l /shdO3dcIZP4SBgLIUydP6AEbKXOud6lOQ7RVjt53ajiqxfSrJUK4tivx6+2ZKKd2vsK dzSx8gx/AKR85Vd68ABBfG9AuKySf7fCpeuU4uYXwRlg2fH68WK1IM2KRnBiql8cUItn mjzJ9wNJELHF8uCzYbxsYy9H03ZZ6Z2WF0sJemtVWIfJ9eP1BDWyqLrsN21A+hHMfZE9 M+llfMPsPJ27FP2cbZqCQ3dX9Vv+rHnFUV7UGBE+RKDLGZJJGmkS4lxMqbpZy/ae9nVY CYOA== X-Gm-Message-State: ABuFfohZeDg4Hrr8ZPt3BFWjDsIOxzNDu8nuiPF8oWFs6sX+uzSOmFXw 7Me4OmskQJ4k0HzrRxWLKH1xe9md5pJFyGpxGoAYJw== X-Received: by 2002:a25:abc1:: with SMTP id v59-v6mr5905098ybi.321.1539645571320; Mon, 15 Oct 2018 16:19:31 -0700 (PDT) MIME-Version: 1.0 References: <1539111085-25502-1-git-send-email-atish.patra@wdc.com> <1539111085-25502-2-git-send-email-atish.patra@wdc.com> <20181010134926.GD21134@ulmo> <25758ab9-eb36-741b-6264-42412b3ddd8e@wdc.com> In-Reply-To: <25758ab9-eb36-741b-6264-42412b3ddd8e@wdc.com> From: Wesley Terpstra Date: Mon, 15 Oct 2018 16:19:20 -0700 Message-ID: Subject: Re: [RFC 1/4] pwm: sifive: Add DT documentation for SiFive PWM Controller. To: Atish Patra Cc: Thierry Reding , Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org, Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Christoph Hellwig 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, Oct 15, 2018 at 3:57 PM Atish Patra wrote: > >> +SiFive PWM controller > >> + > >> +Unlike most other PWM controllers, the SiFive PWM controller currently only > >> +supports one period for all channels in the PWM. This is set globally in DTS. > >> +The period also has significant restrictions on the values it can achieve, > >> +which the driver rounds to the nearest achievable frequency. > > > > What restrictions are these? If "nearest achievable" is too far off the > > target period it might be preferable to error out. > > > > @Wes: Any comments? When I last looked at this driver and hardware, I briefly considered throwing up my hands and pretending that this PWM device had no period control at all, only duty-cycle. There are several examples of PWM controllers in linux already that behave that way. Most of the uses of this PWM are only going to care about the duty-cycle, not the period. So failing when the period is unachievable seems worse to me than just completely eliminating access to period control. > I think yes. Since fu540 is the first Linux capable RISC-V core, SiFive > Guys decided mark it as version 0. > > @Wesly: Please correct me if I am wrong. Correct.