From patchwork Mon Oct 27 17:08:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 39642 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D44EB2118A for ; Mon, 27 Oct 2014 17:09:29 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf777764lbv.1 for ; Mon, 27 Oct 2014 10:09:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=IDTQU/LAOIK86k/LHaLQB7xyXUBlqZNjzOqQZiKOLXk=; b=O6OhKmKX7GQAQUL0SiAQir0JLISGrC9+loagUhIg9UrfhAzTP+h6Bxf9wbgXQvG4W1 obYaE+k8Sbcv+PqChKoXnF49m+3LxdA6BsFqivcjj63NTDWoOojAANyUfSkIZ1gBFu2G ayVYYYOQlgKX124KtWnfEe0gbl2tmdvGkWT6P7eHoP8YpYgfG4yjGT7X42mQfR+DKk79 /ztcnkBm8aKve0+oC7zSvpb7CiaFIUJeQkHiEGxk75TYeUfFJGZauYBo/vbTJM2bxNRX OkuuUxwxj/psBAWFxgo9Adgr0vWd1Ieepk9iM0jkxOMeO35ZNuC7dyn0EXDP8j7CXedG ASDQ== X-Gm-Message-State: ALoCoQmFIAp8elwOJE/9zvjRi6GMCw7PiDktF5uL3puW8073R6KNeKi1z4LNiFkZYk3ISYncgv41 X-Received: by 10.181.11.130 with SMTP id ei2mr4096733wid.3.1414429767878; Mon, 27 Oct 2014 10:09:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.68 with SMTP id p4ls728385laa.52.gmail; Mon, 27 Oct 2014 10:09:27 -0700 (PDT) X-Received: by 10.152.21.170 with SMTP id w10mr25441588lae.9.1414429767526; Mon, 27 Oct 2014 10:09:27 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id cb5si20962640lad.16.2014.10.27.10.09.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 10:09:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id ge10so2179006lab.30 for ; Mon, 27 Oct 2014 10:09:27 -0700 (PDT) X-Received: by 10.112.14.69 with SMTP id n5mr25099130lbc.34.1414429767247; Mon, 27 Oct 2014 10:09:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp334654lbz; Mon, 27 Oct 2014 10:09:25 -0700 (PDT) X-Received: by 10.70.35.49 with SMTP id e17mr1218719pdj.68.1414429764951; Mon, 27 Oct 2014 10:09:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si10020774pdc.176.2014.10.27.10.09.24 for ; Mon, 27 Oct 2014 10:09:24 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbaJ0RJV (ORCPT + 26 others); Mon, 27 Oct 2014 13:09:21 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:46901 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbaJ0RJT (ORCPT ); Mon, 27 Oct 2014 13:09:19 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9RH8R9V023079; Mon, 27 Oct 2014 12:08:27 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9RH8RDV003806; Mon, 27 Oct 2014 12:08:27 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Mon, 27 Oct 2014 12:08:26 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9RH8PCl014023; Mon, 27 Oct 2014 12:08:26 -0500 Date: Mon, 27 Oct 2014 12:08:06 -0500 From: Felipe Balbi To: Heiko =?iso-8859-1?Q?St=FCbner?= CC: , Johan Hovold , Romain Perier , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v1 01/10] of: Rename "poweroff-source" property to "system-power-controller" Message-ID: <20141027170806.GL14253@saruman> Reply-To: References: <1414427215-14380-1-git-send-email-romain.perier@gmail.com> <20141027164103.GD2006@localhost> <20141027164741.GJ14253@saruman> <108805117.sS9iL5zouT@diego> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <108805117.sS9iL5zouT@diego> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Mon, Oct 27, 2014 at 06:05:35PM +0100, Heiko Stübner wrote: > Am Montag, 27. Oktober 2014, 11:47:41 schrieb Felipe Balbi: > > On Mon, Oct 27, 2014 at 05:41:03PM +0100, Johan Hovold wrote: > > > On Mon, Oct 27, 2014 at 11:38:40AM -0500, Felipe Balbi wrote: > > > > On Mon, Oct 27, 2014 at 04:26:46PM +0000, Romain Perier wrote: > > > > > As discussed on the mailing list, it makes more sense to rename this > > > > > property to "system-power-controller". Problem being that the word > > > > > "source" usually tends to be used for inputs and that is out of > > > > > control of the OS. The poweroff capability is an output which simply > > > > > turns the system-power off. Also, this property might be used by > > > > > drivers which power-off the system and power back on subsequent RTC > > > > > alarms. This seems to suggest to remove "poweroff" from the property > > > > > name and to choose "system-power-controller" as the more generic > > > > > name. This patchs adds the required renaming changes and defines an > > > > > helper function which is compatible with both properties, the old one > > > > > prefixed by a vendor name and the new one without any prefix. > > > > > > > > I think you still need to support poweroff-source since it has been > > > > released on a stable kernel. Perhaps add a warning message telling users > > > > it's deprecated and asking them to switch over to > > > > system-power-controller ? Still, simply removing it isn't very nice. > > > > > > No, Romain sent a patch that replaced ",system-power-controller" > > > with "poweroff-source". It's now in Mark's tree (for v3.19), and this > > > series "reverts" to the old name minus the vendor-prefix. > > > > oh, so poweroff-source isn't in Linus' tree yet ? (/me goes grep) > > > > Then it should be fine. My bad. > > > > Many of the other comments are still valid because even though > > poweroff-source isn't in mainline yet, this series still creates > > bisection points which are broken. The best solution would be to drop > > all those patches from Mark's tree. Read, not revert, drop. > > There have never been any users of the poweroff-source. The act8846 in the > radxarock would have been the first, but I held off with the dts patch as the > naming issue came up at the same time. > > So I guess if Romain keeps the renaming together there shouldn't be any other > bad bisection points? Not build breaks, but there will always be the commit below: commit a88f5c6deb2a44f694b01aac48231ec97059b26a Author: Romain Perier Date: Tue Oct 14 06:31:12 2014 +0000 dt-bindings: Document the standard property "poweroff-source" Signed-off-by: Romain Perier Signed-off-by: Mark Brown Even if for a small time frame, there will always be a commit where we called "poweroff-source" a standard binding and, as such, as should support it. diff --git a/Documentation/devicetree/bindings/power/poweroff.txt b/Documentation/devicetree/bindings/power/poweroff.txt new file mode 100644 index 0000000..845868b --- /dev/null +++ b/Documentation/devicetree/bindings/power/poweroff.txt @@ -0,0 +1,18 @@ +* Generic Poweroff capability + +Power-management integrated circuits or miscellaneous harware components are +sometimes able to control the system power. The device driver associated to these +components might needs to define poweroff capability, which tells to the kernel +how to switch off the system. The corresponding driver must have the standard +property "poweroff-source" in its device node. This property marks the device as +able to shutdown the system. In order to test if this property is found +programmatically, use the helper function "of_system_has_poweroff_source" from +of.h . + +Example: + +act8846: act8846@5 { + compatible = "active-semi,act8846"; + status = "okay"; + poweroff-source; +}