diff --git a/Documentation/devicetree/bindings/fb/mdss-mdp.txt b/Documentation/devicetree/bindings/fb/mdss-mdp.txt index 27b723151899..a616427f21ea 100644 --- a/Documentation/devicetree/bindings/fb/mdss-mdp.txt +++ b/Documentation/devicetree/bindings/fb/mdss-mdp.txt @@ -502,6 +502,10 @@ Subnode properties: - qcom,mdss-idle-power-collapse-enabled: Boolean property that enables support for mdss power collapse in idle screen use cases with smart panels. +- qcom,boot-indication-enabled: Boolean property that enables turning on the blue + LED for notifying that the device is in boot + process. + - qcom,mdss-pp-offets: A node that lists the offsets of post processing blocks from base module. -- qcom,mdss-mdss-sspp-igc-lut-off: This 32 bit value provides the diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 2787bb98c2d6..106e8544bfbd 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -239,6 +238,11 @@ static void mdss_fb_set_bl_brightness(struct led_classdev *led_cdev, struct msm_fb_data_type *mfd = dev_get_drvdata(led_cdev->dev->parent); int bl_lvl; + if (mfd->boot_notification_led) { + led_trigger_event(mfd->boot_notification_led, 0); + mfd->boot_notification_led = NULL; + } + if (value > mfd->panel_info->brightness_max) value = mfd->panel_info->brightness_max; @@ -758,6 +762,15 @@ static int mdss_fb_probe(struct platform_device *pdev) mfd->split_mode = MDP_DUAL_LM_DUAL_DISPLAY; mfd->mdp = *mdp_instance; + + rc = of_property_read_bool(pdev->dev.of_node, + "qcom,boot-indication-enabled"); + + if (rc) { + led_trigger_register_simple("boot-indication", + &(mfd->boot_notification_led)); + } + INIT_LIST_HEAD(&mfd->proc_list); mutex_init(&mfd->bl_lock); diff --git a/drivers/video/fbdev/msm/mdss_fb.h b/drivers/video/fbdev/msm/mdss_fb.h index 15f29d1cf540..c1919ab8a3a8 100644 --- a/drivers/video/fbdev/msm/mdss_fb.h +++ b/drivers/video/fbdev/msm/mdss_fb.h @@ -19,6 +19,7 @@ #include #include #include +#include #include "mdss_panel.h" #include "mdss_mdp_splash_logo.h" @@ -309,6 +310,7 @@ struct msm_fb_data_type { u32 thermal_level; int fb_mmap_type; + struct led_trigger *boot_notification_led; }; static inline void mdss_fb_update_notify_update(struct msm_fb_data_type *mfd)