• Hans de Goede's avatar
    gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option · 2ccb21f5
    Hans de Goede authored
    Commit aa23ca3d ("gpiolib: acpi: Add honor_wakeup module-option +
    quirk mechanism") was added to deal with spurious wakeups on one specific
    model of the HP x2 10 series.
    
    The approach taken there was to add a bool controlling wakeup support for
    all ACPI GPIO events. This was sufficient for the specific HP x2 10 model
    the commit was trying to fix, but in the mean time other models have
    turned up which need a similar workaround to avoid spurious wakeups from
    suspend, but only for one of the pins on which the ACPI tables request
    ACPI GPIO events.
    
    Since the honor_wakeup option was added to be able to ignore wake events,
    the name was perhaps not the best, this commit renames it to ignore_wake
    and changes it to a string with the following format:
    gpiolib_acpi.ignore_wake=controller@pin[,controller@pin[,...]]
    
    This allows working around spurious wakeup issues on a per pin basis.
    
    This commit also reworks the existing quirk for the HP x2 10 so that
    it functions as before.
    
    Note:
    -This removes the honor_wakeup parameter. This has only been upstream for
     a short time and to the best of my knowledge there are no users using
     this module parameter.
    
    -The controller@pin[,controller@pin[,...]] syntax is based on an existing
     kernel module parameter using the same controller@pin format. That version
     uses ';' as separator, but in practice that is problematic because grub2
     cannot handle this without taking special care to escape the ';', so here
     we are using a ',' as separator instead which does not have this issue.
    
    Fixes: aa23ca3d ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism")
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Link: https://lore.kernel.org/r/20200302111225.6641-2-hdegoede@redhat.comAcked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
    Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    2ccb21f5
gpiolib-acpi.c 36.9 KB