Received: by 10.223.148.5 with SMTP id 5csp6539889wrq; Wed, 17 Jan 2018 15:12:52 -0800 (PST) X-Google-Smtp-Source: ACJfBouBiCoAsf2FC/zcqMh4/rDi+9nuwnvQPPX8NV6P0bc5YR7UKyn7YV+8rzme6BIDsFd/e+/G X-Received: by 10.84.140.1 with SMTP id 1mr11886752pls.55.1516230772594; Wed, 17 Jan 2018 15:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516230772; cv=none; d=google.com; s=arc-20160816; b=UlHN4E++UtSRUuktdK3yNc21v7hp3usQKreBxaKZlNOtJ/GXb0OCmeiNr48SVnaAL7 kogsgyPUlTRWXqVhwRoJpCaTY3db5Eh85GHx65JAa8zr77nFc5viR5EMDXfVjUjsFuJM o0cCeZ8eKUCfBtQjxQV+TvlE6x1U6HsySOi4KH/SlI/mWj/DLCYYydQKx8v2UKph6oHW HPVHkA3ppW1npx7jeHr+H0J9j7bB/P6uF/wyiFyrnbXMvGQzpNNHKa3zQvL8o37G4K84 DXHLYNz3YJyH7OD85YcCuNJurwPuicgss0CcvkYwjXnONaq88Qpl5s8ymugacZB+ySxw SyRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=6EStFAcBKRXrtdz/zY4jn6T9y+zQwaxIZj3aZA7oUog=; b=qVLDqZMHE3tZXdTi7bvKJgejfkMoSB3l+nUyLkggl+dH8OYWkmEr8Tys9C495oj3ts CzD/vf0/jwR/6GqrTkygCrwpTVHHFEPghAin9etM9/MF8KySbdf7DawRZxR2nD51LFS7 smIRqiXTKLSlf94j9Waq+eP46ZzVCZS94LTyT8VPQzP9zP/l31rdoAKg2X88ZQ9CfSW9 ESTZoocmiXHZ/gR4UT162SVYsqxzKWnqoR3HIdAC+HCX90fptly1bJvOFoFq4Ihwh1Jf q971r8yd56masCtB4P2UZpdu6dTF62PllgU5dAmvh+eXrc/rW4++HcDsTGliU+Y2VxHO 7M+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DCvDxwFK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e92si5234273pld.529.2018.01.17.15.12.38; Wed, 17 Jan 2018 15:12:52 -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; dkim=pass header.i=@chromium.org header.s=google header.b=DCvDxwFK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753662AbeAQXLD (ORCPT + 99 others); Wed, 17 Jan 2018 18:11:03 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36617 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752791AbeAQXLB (ORCPT ); Wed, 17 Jan 2018 18:11:01 -0500 Received: by mail-pg0-f66.google.com with SMTP id k68so4698115pga.3 for ; Wed, 17 Jan 2018 15:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6EStFAcBKRXrtdz/zY4jn6T9y+zQwaxIZj3aZA7oUog=; b=DCvDxwFKfydRE7ICZVJJjK7BBDvDD8VHF4eMdW+hzknOiaUQlE6DSghUZ2cOiN8Gr1 cLldwbJEQvwJQcJsCi7Z0E7Hd5GSmWCnjk0HdBH3APS7G+nH/5IYxX4Sx3bJzjvqiptJ OXU4zWqbp+NzWjd9us88l6Y1l0bkwIP589DxQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6EStFAcBKRXrtdz/zY4jn6T9y+zQwaxIZj3aZA7oUog=; b=Xo8THWdsZn+fAe3nXHO/B+COYJlQ2vww+4r9FM1xY4B8DDxCdFf5jZ9MLpXmNVCS9T dJcRSUzoBIDWfwA4Id/WE6Pqu6bOLlVkooKXyuECw9PcG6XPd3hpQuyRCFf2No8UiUmE wbiMZpdF5AMEy2ckS7oamgqMIm1vKXCLXopDlFbti/jNysXOSc3WsmPFuMMNHw3Up26S dO80+x2YG4utcG6quJW6tNwaydRB6i4ZE1MliLzbvmY3URVKRaOs+3gAdJTem5vRvbXN pZXxfEAmZnmTPOVbGxEtCZH96Pb77/mMkrsXtYn9WaLz+48PEoMRnQh4PAZCV9RafA3K eadw== X-Gm-Message-State: AKwxytfFZDu2O4wqamrJPywDDAnPu68vsWP+Wdi6VdI7/5AjGGSBCTDZ y0VXbPY2GmqvMv6kaNlMRpefuw== X-Received: by 10.101.67.193 with SMTP id n1mr3845915pgp.116.1516230660796; Wed, 17 Jan 2018 15:11:00 -0800 (PST) Received: from google.com ([2620:0:1000:1600:9d81:9e11:38a6:dd73]) by smtp.gmail.com with ESMTPSA id e7sm10346200pfj.44.2018.01.17.15.10.59 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 17 Jan 2018 15:11:00 -0800 (PST) Date: Wed, 17 Jan 2018 15:10:57 -0800 From: Brian Norris To: Claudiu Beznea Cc: mark.rutland@arm.com, linux-pwm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, corbet@lwn.net, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, robh+dt@kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, thierry.reding@gmail.com, alexandre.belloni@free-electrons.com, haojian.zhuang@gmail.com, linux-amlogic@lists.infradead.org, robert.jarzmik@free.fr, daniel@zonque.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 03/16] pwm: cros-ec: update documentation regarding pwm-cells Message-ID: <20180117231056.GB112833@google.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. > 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. Brian