static irqreturn_t usr_reset_warning_isr(int irq, void *dev)
{
	struct usr_reset_warning_data *data = dev;

	disable_irq_nosync(irq);
	pr_warn("HFF: User initiated HW reset warning.\n");
	pr_warn("     2 sec to reset.Halt the kernel.\n");
	/* set HW reset power up reason */
	qpnp_pon_store_extra_reset_info(RESET_EXTRA_HW_RESET_REASON,
		RESET_EXTRA_HW_RESET_REASON);
	schedule_work(&data->work);

	return IRQ_HANDLED;
}
static void warn_irq_w(struct work_struct *w)
{
	struct mmi_factory_info *info = container_of(w,
						     struct mmi_factory_info,
						     warn_irq_work.work);
	int warn_line = gpio_get_value(info->list[KP_WARN_INDEX].gpio);
	int reset_info = RESET_EXTRA_RESET_KUNPOW_REASON;

	if (!warn_line) {
		pr_info("HW User Reset!\n");
		pr_info("2 sec to Reset.\n");

#ifdef CONFIG_QPNP_POWER_ON
		/* trigger wdog if resin key pressed */
		if (qpnp_pon_key_status & QPNP_PON_KEY_RESIN_BIT) {
			pr_info("User triggered watchdog reset(Pwr + VolDn)\n");
			msm_trigger_wdog_bite();
			return;
		}
#endif
		/* Configure hardware reset before halt
		 * The new KUNGKOW circuit will not disconnect the battery if
		 * usb/dc is connected. But because the kernel is halted, a
		 * watchdog reset will be reported instead of hardware reset.
		 * In this case, we need to clear the KUNPOW reset bit to let
		 * BL detect it as a hardware reset.
		 * A pmic hard reset is necessary to report the powerup reason
		 * to BL correctly.
		 */
		if (usr_rst_sw_dis_flg <= 0) {
			qpnp_pon_store_extra_reset_info(reset_info, 0);
			qpnp_pon_system_pwr_off(PON_POWER_OFF_HARD_RESET);
			kernel_halt();
		} else
			pr_info("SW HALT Disabled!\n");

		return;
	}
}