Received: by 10.223.148.5 with SMTP id 5csp7184585wrq; Thu, 18 Jan 2018 02:00:53 -0800 (PST) X-Google-Smtp-Source: ACJfBosydUyaN+GT6Qj+oTs9jOgTF1XOIpFF4js7TUszdJOa+9hNvU8XXt5ZKp6pG/U2sn8H1vri X-Received: by 10.101.101.68 with SMTP id a4mr11441975pgw.368.1516269653641; Thu, 18 Jan 2018 02:00:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516269653; cv=none; d=google.com; s=arc-20160816; b=sbQ7QkoDgnHXbIteGSI3pASp6xvolYWEW70FgT/spP1IkagYd2INUPf/cu/4duNP0w rI/3wJ/o1A+IWCil1F6QuaEAAa/oPMCHiLrYUMKkaBj8i1RVEttejb89SSimv7G/DVcB qngUw7bGtakn1V3FxqylJv0xJemgxesnCzOzn0nOR4PHmENPJfzlJxRBBDeBmwubJz9V izCLgEXc81uZ0dUWKNQIY3YldfZUM8lFeV5o/gx4t1P3IouBDE8VD0JETCsmI3a7GF8U Tx87Gt5T8/fLuoS47xTiNejE1AMEcuxzMkMuBWN1LXQZCJax4H0IAKwaImmJie1N3oJQ SXqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=jqDoLNml50HY2ceW/HkSezsrdjDCugIYwHbBTS3pTlc=; b=bePh21nCr+Ga+uBOB7A5N63Wz/CeIv/QQdq68+QpXAIB8OEXyMBtyQG559B1ZjE8S0 ID/wUIqKwKVw5XUxaKEhD0MUiOEVUMrPAPf8NWOyh5BhgnGLvK/4bmcizE4wkYT8UMY7 2TtfQN9E2OPCXY5efvF76gH1Bx6bT7xl7gtAiwABETHMCgBXT3ak42BmS4cSk/v6LiIL dTSZ02CZzujA1a+8d79T5PGci+FbwwaYT73xJkolYaiAq2i55jeQAHmru/IiJZsmzFmg KZsTC3NccjgVrADpNbnZr4h+gw6gHTFBpIoBCr6D1INdB5ZOphecjGxVQF+xQ2XWfv9m ALaA== ARC-Authentication-Results: i=1; mx.google.com; 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 d9si5453653pgp.810.2018.01.18.02.00.37; Thu, 18 Jan 2018 02:00:53 -0800 (PST) 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; 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 S1755033AbeARJSL (ORCPT + 99 others); Thu, 18 Jan 2018 04:18:11 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:63825 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750724AbeARJSG (ORCPT ); Thu, 18 Jan 2018 04:18:06 -0500 X-IronPort-AV: E=Sophos;i="5.44,434,1505804400"; d="scan'208";a="7976333" Received: from exsmtp03.microchip.com (HELO email.microchip.com) ([198.175.253.49]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Jan 2018 02:18:06 -0700 Received: from [10.145.6.81] (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Thu, 18 Jan 2018 02:18:05 -0700 Subject: Re: [PATCH v2 03/16] pwm: cros-ec: update documentation regarding pwm-cells To: Brian Norris CC: , , , , , , , , , , , , , , , References: <1515766983-15151-1-git-send-email-claudiu.beznea@microchip.com> <1515766983-15151-4-git-send-email-claudiu.beznea@microchip.com> <20180112183122.GA102880@google.com> <61b85600-7aee-e9d1-6587-17e5e419b03a@microchip.com> <20180117231056.GB112833@google.com> From: Claudiu Beznea Message-ID: <48829251-ef9a-1566-9a69-9e66ce64c232@microchip.com> Date: Thu, 18 Jan 2018 11:18:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180117231056.GB112833@google.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.01.2018 01:10, Brian Norris wrote: > On Wed, Jan 17, 2018 at 10:29:53AM +0200, Claudiu Beznea wrote: >> With these changes, if pwm-cells=1 then only PWM-channel will be parsed, > > I'm not sure if I'm understanding you correctly but...no. If cells is 1, > then your driver change just causes us not to parse correctly, and > everything fails. My bad, agree with you, will fail with pwm-cells=1. I forgot about: + if (args->args_count < PWM_ARGS_CNT_XLATE_PERIOD || + args->args_count > PWM_ARGS_CNT_XLATE_MAX) return ERR_PTR(-EINVAL); restriction. > >> if it is 2 PWM-channel and PWM-period will be parsed, if pwm-cells=3 >> then PWM-channel, PWM-period and PWM-flags will be parsed. >> In your driver you used to have only one cell because you wanted to allow >> user to give as argument only PWM channel, and you did not want a change >> of PWM period (and in of_xlate function you initialize pwm period with 0xffff >> value: this is why I changed the binding in patch 7 of this series, file > > It's not a matter of "allow", it's a matter of description. The period > isn't actually even 0xffff, that's just a pseudo-period, to reflect that > you have a choice of duty cycles of 0 to 0xffff. I (justifiably, I > think) didn't think putting this false value in the device tree was > accurate. Ok, I didn't investigate the driver to see what is truly set in HW. > >> rk3399-gru-kevin.dts). But e.g. sysfs could try to change the PWM period, >> there is no restriction to change the PWM period from sysfs, in the sysfs >> interface but the restriction is in PWM apply of the drive. The same things >> happens with these changes too. The user could introduce any PWM period via >> DT but the pwm apply function of the driver will return error. > > sysfs has no bearing on a device tree binding. Just because we have a > broken interface here doesn't mean we should change how we describe the > hardware. > Based on [1] and the comments I will drop the first 7 patches of this series. Thanks, Claudiu [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/ABI.txt > Brian >