Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753995AbcCXC1h (ORCPT ); Wed, 23 Mar 2016 22:27:37 -0400 Received: from mail-ob0-f194.google.com ([209.85.214.194]:36676 "EHLO mail-ob0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbcCXC1f (ORCPT ); Wed, 23 Mar 2016 22:27:35 -0400 MIME-Version: 1.0 In-Reply-To: <1458646592-540-1-git-send-email-andy.yan@rock-chips.com> References: <1458646525-491-1-git-send-email-andy.yan@rock-chips.com> <1458646592-540-1-git-send-email-andy.yan@rock-chips.com> Date: Thu, 24 Mar 2016 11:27:34 +0900 X-Google-Sender-Auth: SZDJ00Ah5of5mqJEjNB41K6TwRU Message-ID: Subject: Re: [PATCH v6 1/4] dt-bindings: power: reset: add document for reboot-mode driver From: Krzysztof Kozlowski To: Andy Yan Cc: robh+dt@kernel.org, sre@kernel.org, heiko@sntech.de, john.stultz@linaro.org, arnd@arndb.de, galak@codeaurora.org, ijc+devicetree@hellion.org.uk, catalin.marinas@arm.com, olof@lixom.net, alexandre.belloni@free-electrons.com, dbaryshkov@gmail.com, jun.nie@linaro.org, pawel.moll@arm.com, will.deacon@arm.com, linux-rockchip@lists.infradead.org, matthias.bgg@gmail.com, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, f.fainelli@gmail.com, linux@arm.linux.org.uk, mbrugger@suse.com, linux-arm-kernel@lists.infradead.org, lorenzo.pieralisi@arm.com, moritz.fischer@ettus.com, linux-kernel@vger.kernel.org, wxt@rock-chips.com, dwmw2@infradead.org, mark.rutland@arm.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4372 Lines: 131 Interesting idea. While looking at the code I stumped over few things below: On Tue, Mar 22, 2016 at 8:36 PM, Andy Yan wrote: > add device tree bindings document for reboot-mode driver s/add/Add/ Plus a full-stop at the end of sentence. > > Signed-off-by: Andy Yan > Acked-by: Rob Herring > > binding What is that? > > --- > > Changes in v6: > - fix a typo with "property" > - describe property "mask" more clear > > Changes in v5: > - delete a unnecessary blank line in syscon-reboot-mode.txt > - rename mode-fastoboot to mode-bootloader in syscon-reboot-mode.txt > - rename macro BOOT_LOADER to BOOT_BL_DOWNLOAD, which gives a more clear mean > > Changes in v4: > - remove mode-maskrom > - rename mode-fastboot to mode-bootloader to keep compatible with the exiting Android device > > Changes in v3: > - descirbe all reboot mode as properity instead of subnode > > Changes in v2: None > Changes in v1: None > > .../bindings/power/reset/reboot-mode.txt | 24 +++++++++++++++ > .../bindings/power/reset/syscon-reboot-mode.txt | 35 ++++++++++++++++++++++ > 2 files changed, 59 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.txt > create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt > > diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt > new file mode 100644 > index 0000000..3457949 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt > @@ -0,0 +1,24 @@ > +Generic reboot mode core map driver > + > +This driver get reboot mode arguments and call the write > +interface to stores the magic value in special register s/stores/store/ > +or ram . Then the bootloader can read it and take different s/ram ./ram./ > +action according the argument stored. according to > + > +All mode properties are vendor specific, it is a indication to tell > +the bootloder what to do when the system reboot, and should be named s/bootloder/bootloader/ s/reboot/reboots/ > +as mode-xxx = (xxx is mode name). > + These are examples? If yes then add a note, like: +For example modes common on Android platform: > +- mode-normal: Normal reboot mode, system reboot with command "reboot". > +- mode-recovery: Android Recovery mode, it is a mode to format the device or update a new image. > +- mode-bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device. > +- mode-loader: A bootloader mode, it's a mode used to download image on Rockchip platform, > + usually used in development. The "bootloader" and "loader" examples are very confusing. Maybe just name the first one as "mode-fastboot" and second as "rockchip-download"? The term "loader" does not look for me as anything related to uploading/downloading new firmware. > + > +Example: > + reboot-mode { > + mode-normal = ; > + mode-recovery = ; > + mode-bootloader = ; > + mode-loader = ; > + } > diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt > new file mode 100644 > index 0000000..eb28469 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt > @@ -0,0 +1,35 @@ > +SYSCON reboot mode driver > + > +This driver get reboot mode magic value form reboot-mode driver s/get/gets/ > +and stores it in a SYSCON mapped register. Then the bootloader > +can read it and take different action according to the magic > +value stored. > + > +This DT node should be represented as a sub-node of a "syscon", "simple-mfd" > +node. > + > +Required properties: > +- compatible: should be "syscon-reboot-mode" > +- offset: offset in the register map for the storage register (in bytes) > + > +Optional property: > +- mask: bits mask of the bits in the register to store the reboot mode magic value, > + default set to 0xffffffff if missing. > + > +The rest of the properties should follow the generic reboot-mode discription s/discription/description/ Please, run the spell check... Best regards, Krzysztof