Re: GPIO triggers kernel reboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello John,

Am 25.01.2014 21:24, schrieb Mehaffey, John:
-----Original Message-----
From: linux-embedded-owner@xxxxxxxxxxxxxxx
[mailto:linux-embedded-owner@xxxxxxxxxxxxxxx] On Behalf Of Heiko
Schocher
Sent: Saturday, January 25, 2014 8:03 AM
To: linux-embedded@xxxxxxxxxxxxxxx
Cc: Wolfgang Denk; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: GPIO triggers kernel reboot

Hello all,

is it possible to reboot current mainline kernel triggered from a GPIO in kernel space?

If not, how can be done this, so that it has a chance to go into mainline?

Thanks for any suggestions

bye,
Heiko

Hi Heiko,
Call kexec() from the GPIO driver.
It will take some effort to get it right :)

Thanks for your answer!
Hmm.. but has this a chance to go into mainline?

Or if a simple reboot is all that you want, examine the several reboot APIs in kernel/reboot.c

A current implementation from a customer is for an arm, am335x based board
to add in board setup code:

        ret = request_irq(OMAP_GPIO_IRQ(RESET_BUTTON_IRQ_GPIO)
                , (irq_handler_t)arm_pm_restart, IRQF_TRIGGER_LOW, "reset button", NULL);

and as I want to bring this board to mainline, I think this is not
an acceptable/good way ... or?

bye,
Heiko
--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux