• Kristen Carlson Accardi's avatar
    ACPI: dock: add immediate_undock option · a0cd35fd
    Kristen Carlson Accardi authored
    Allow the driver to be loaded with an option that will allow userspace to
    control whether the laptop is ejected immediately when the user presses the
    button, or only when the syfs undock file is written.
    
    if immediate_undock == 1, then when the user presses the undock button, the
    laptop will send an event to userspace to notify userspace of the undock, but
    then immediately undock without waiting for userspace.  This is the current
    behavior, and I set this to be the default.
    
    if immediate_undock == 0, then when the user presses the undock button, the
    laptop will send an event to userspace and do nothing.  User space can query
    the "flags" sysfs entry to determine if an undock request has been made by
    the user (if bit 1 is set).  User space will then need to write the undock
    sysfs entry to complete the undocking process.
    Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    a0cd35fd
dock.c 23.9 KB