• Stefan Seyfried's avatar
    Fix sleep / suspend keys for Toughbook CF-51 · 58c68865
    Stefan Seyfried authored
    Hi all,
    
    my panasonic cf-51 does no longer react to the suspend and hibernate
    keys. I cannot tell when this started since I no longer use the machine
    on a daily basis, but I suspect it started when userspace switched from
    using /proc/acpi/event to the input layer, wich was quite some time ago ;-)
    
    Today I investigated the issue and found that the firmware simply does
    not generate any event on "key down" for those keys, but only on "key up".
    
    The attached patch works around the problem.
    
    Best regards,
    
    	Stefan
    --
    Stefan Seyfried
    Linux Consultant & Developer -- GPG Key: 0x731B665B
    
    B1 Systems GmbH
    Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
    GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
    
    >From 7c96fee748cfd3e64732a7ac142f5dea07d7379f Mon Sep 17 00:00:00 2001
    From: Stefan Seyfried <seife+kernel@b1-systems.com>
    Date: Sun, 2 Mar 2014 17:50:01 +0100
    Subject: [PATCH] panasonic-laptop: fix sleep keys on CF-51
    
    At least on my CF-51, both sleep and hibernate keys do not
    generate "key down" events, only "key up". Because of this,
    the input layer does ignore both keys. The work around is
    to generate a key down event before the key up. To avoid
    double events on non-broken firmware, this is only done if
    no key down is ever seen for those keys.
    Signed-off-by: default avatarStefan Seyfried <seife+kernel@b1-systems.com>
    Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
    58c68865
panasonic-laptop.c 18 KB