Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cc77f7d authored by Hanumant Singh's avatar Hanumant Singh
Browse files

platform: qpnp-power-on: Add boot mode module parameter



Warm boot runs may not last until the point where pon driver
has had a chance to read the warm boot registers. We need a way
to identify a warm boot in the crashes and hence we expect
bootloader to set this in kernel command line.
We may use this parameter later in the driver for
debug/verficiation purposes.

Change-Id: I7a462cc5660384e345b07553b7ae4cccdee56608
Signed-off-by: default avatarHanumant Singh <hanumant@codeaurora.org>
parent 219364c5
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -166,6 +166,14 @@ static const char * const qpnp_poff_reason[] = {
	[15] = "Triggered from STAGE3 (Stage 3 reset)",
};

/*
 * On the kernel command line specify
 * qpnp-power-on.warm_boot=1 to indicate a warm
 * boot of the device.
 */
static int warm_boot;
module_param(warm_boot, int, 0);

static int
qpnp_pon_masked_write(struct qpnp_pon *pon, u16 addr, u8 mask, u8 val)
{