Skip to content
  • Vaibhav Gupta's avatar
    0c90789a
    staging: rtl8192e: use generic power management · 0c90789a
    Vaibhav Gupta authored
    
    
    The structure of working of PM hooks for source files is:
        drivers/staging/rtl8192e/rtl8192e/rtl_pm.h   : callbacks declared
        drivers/staging/rtl8192e/rtl8192e/rtl_pm.c   : callbacks defined
        drivers/staging/rtl8192e/rtl8192e/rtl_core.c : callbacks used
    
    Drivers should not use legacy power management as they have to manage power
    states and related operations, for the device, themselves. This driver was
    handling them with the help of PCI helper functions like
    pci_save/restore_state(), pci_enable/disable_device(), etc.
    
    With generic PM, all essentials will be handled by the PCI core. Driver
    needs to do only device-specific operations.
    
    The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
    device_wakeup_disable() instead. Use device_set_wakeup_enable() where WOL
    is decided by the value of a variable during runtime.
    
    Compile-tested only.
    
    Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
    Link: https://lore.kernel.org/r/20200629082819.216405-3-vaibhavgupta40@gmail.com
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    0c90789a
    staging: rtl8192e: use generic power management
    Vaibhav Gupta authored
    
    
    The structure of working of PM hooks for source files is:
        drivers/staging/rtl8192e/rtl8192e/rtl_pm.h   : callbacks declared
        drivers/staging/rtl8192e/rtl8192e/rtl_pm.c   : callbacks defined
        drivers/staging/rtl8192e/rtl8192e/rtl_core.c : callbacks used
    
    Drivers should not use legacy power management as they have to manage power
    states and related operations, for the device, themselves. This driver was
    handling them with the help of PCI helper functions like
    pci_save/restore_state(), pci_enable/disable_device(), etc.
    
    With generic PM, all essentials will be handled by the PCI core. Driver
    needs to do only device-specific operations.
    
    The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
    device_wakeup_disable() instead. Use device_set_wakeup_enable() where WOL
    is decided by the value of a variable during runtime.
    
    Compile-tested only.
    
    Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
    Link: https://lore.kernel.org/r/20200629082819.216405-3-vaibhavgupta40@gmail.com
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading