From dd1086f43dc7205b451ae95e37d4813a9c28611d Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 3 Jul 2008 11:24:36 +0100 Subject: [PATCH] [ARM] JIVE: Add power off on shutdown support Add pm_power_off hook to allow the Logitech Jive to shutdown when asked to halt. Signed-off-by: Ben Dooks --- arch/arm/mach-s3c2412/mach-jive.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 7f5d0025060..7f592471348 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c @@ -528,6 +528,14 @@ static void __init jive_map_io(void) s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs)); } +static void jive_power_off(void) +{ + printk(KERN_INFO "powering system down...\n"); + + s3c2410_gpio_setpin(S3C2410_GPC5, 1); + s3c2410_gpio_cfgpin(S3C2410_GPC5, S3C2410_GPIO_OUTPUT); +} + static void __init jive_machine_init(void) { /* register system devices for managing low level suspend */ @@ -661,6 +669,8 @@ static void __init jive_machine_init(void) s3c_device_i2c.dev.platform_data = &jive_i2c_cfg; i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); + pm_power_off = jive_power_off; + platform_add_devices(jive_devices, ARRAY_SIZE(jive_devices)); } -- 2.41.1