Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1324422

Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for reboot-mode driver

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for reboot-mode driver
Date 2016-02-02 19:30 +0100
Message-ID <qXNSd-72M-79@gated-at.bofh.it> (permalink)
References <qXFUC-Fv-11@gated-at.bofh.it> <qXG4j-ZH-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Feb 2, 2016 at 1:59 AM, Andy Yan <andy.yan@rock-chips.com> wrote:
> add device tree bindings document for reboot-mode driver
>
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>
> ---
>
> 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           | 26 ++++++++++++++++
>  .../bindings/power/reset/syscon-reboot-mode.txt    | 36 ++++++++++++++++++++++
>  2 files changed, 62 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..517080f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt
> @@ -0,0 +1,26 @@
> +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
> +or ram . Then the bootloader can read it and take different
> +action according the argument stored.
> +
> +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
> +as mode-xxx = <magic> (xxx is mode name).
> +
> +- 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-fastboot: Android fastboot mode, it's a mode to  re-flash partitions on the device.

One minor tweak here, on most Android devices (atleast most Nexus
devices) getting to fastboot is done via "reboot bootloader" not
"reboot fastboot".

If we are going to document the commands here to establish a standard,
I'd prefer we use use what existing userspace expects:

So across nexus devices, there's really two consistent commands:
"bootloader", and "recovery"

Nexus 6p:  https://android.googlesource.com/kernel/msm.git/+/android-msm-bullhead-3.10-marshmallow-mr1/drivers/power/reset/msm-poweroff.c#230
Nexus 9: https://android.googlesource.com/kernel/tegra.git/+/android-tegra-flounder-3.10-marshmallow-mr1/drivers/htc_debug/stability/reboot_params.c#86
Nexus 7: https://android.googlesource.com/kernel/msm.git/+/android-msm-flo-3.4-marshmallow-mr1/arch/arm/mach-msm/restart.c#273
Nexus 10: https://android.googlesource.com/kernel/exynos.git/+/android-exynos-manta-3.4-lollipop-mr1/arch/arm/mach-exynos/board-manta-power.c#422

While I don't object to having a duplicative mode-fastboot (it is more
clear as to what the command does), or the other oem specific modes, I
think we should make it clear that the Android userspace expects the
"bootloader" and "recovery" commands and document them here.

thanks
-john

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] add reboot mode driver Andy Yan <andy.yan@rock-chips.com> - 2016-02-02 11:00 +0100
  [PATCH v3 2/4] power: reset: add reboot mode driver Andy Yan <andy.yan@rock-chips.com> - 2016-02-02 11:10 +0100
    Re: [PATCH v3 2/4] power: reset: add reboot mode driver Moritz Fischer <moritz.fischer@ettus.com> - 2016-02-02 19:20 +0100
    Re: [PATCH v3 2/4] power: reset: add reboot mode driver kbuild test robot <lkp@intel.com> - 2016-02-03 13:00 +0100
  [PATCH v3 1/4] dt-bindings: power: reset: add document for reboot-mode driver Andy Yan <andy.yan@rock-chips.com> - 2016-02-02 11:10 +0100
    Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for  reboot-mode driver John Stultz <john.stultz@linaro.org> - 2016-02-02 19:30 +0100
    Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for  reboot-mode driver Rob Herring <robh@kernel.org> - 2016-02-05 00:10 +0100
      Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for  reboot-mode driver John Stultz <john.stultz@linaro.org> - 2016-02-05 01:00 +0100
        Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for  reboot-mode driver Rob Herring <robh@kernel.org> - 2016-02-05 05:40 +0100
          Re: [PATCH v3 1/4] dt-bindings: power: reset: add document for  reboot-mode driver John Stultz <john.stultz@linaro.org> - 2016-02-05 06:10 +0100
  [PATCH v3 4/4] ARM64: dts: rockchip: add syscon-reboot-mode DT node Andy Yan <andy.yan@rock-chips.com> - 2016-02-02 11:20 +0100
    Re: [PATCH v3 4/4] ARM64: dts: rockchip: add syscon-reboot-mode DT  node Shawn Lin <shawn.lin@rock-chips.com> - 2016-02-03 03:10 +0100
  [PATCH v3 3/4] ARM: dts: rockchip: add syscon-reboot-mode DT node Andy Yan <andy.yan@rock-chips.com> - 2016-02-02 11:20 +0100

csiph-web