diff options
Diffstat (limited to 'drivers/misc/bq5105x_detect.c')
| -rw-r--r-- | drivers/misc/bq5105x_detect.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/bq5105x_detect.c b/drivers/misc/bq5105x_detect.c index fbf82962743..5c67a1bb1d0 100644 --- a/drivers/misc/bq5105x_detect.c +++ b/drivers/misc/bq5105x_detect.c @@ -29,6 +29,7 @@  #include <linux/switch.h>  #include <linux/wakelock.h>  #include <linux/workqueue.h> +#include <linux/wakeup_source_notify.h>  /*   * Detect when a device is placed on a wireless charger and report this to user @@ -127,6 +128,11 @@ static void bq5105x_detect_set_docked(struct bq5105x_detect *chip, bool docked)  {  	if (chip->docked != docked) {  		dev_dbg(&chip->pdev->dev, "docked=%d\n", docked); +#ifdef CONFIG_WAKEUP_SOURCE_NOTIFY +		wakeup_source_notify_subscriber(docked +						? DISPLAY_WAKE_EVENT_DOCKON +						: DISPLAY_WAKE_EVENT_DOCKOFF); +#endif  		chip->docked = docked;  		power_supply_changed(&chip->charger);  		switch_set_state(chip->sdev, chip->docked);  |