Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6e38df1 authored by Shimrit Malichi's avatar Shimrit Malichi
Browse files

msm: mdss: Add support for boot LED indication



By turning on the blue LED we get a notification that the boot-
process has started. The blue LED will be turned-on in
bootloader and be turned off when HLOS display takes over.

Change-Id: Ia8f97a507a5deda9d692f0a8b53488a684f5efd2
Signed-off-by: default avatarShimrit Malichi <smalichi@codeaurora.org>
parent 9b973c48
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -499,6 +499,9 @@ 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.

Example:
	mdss_mdp: qcom,mdss_mdp@fd900000 {
+15 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * Core MDSS framebuffer driver.
 *
 * Copyright (C) 2007 Google Incorporated
 * Copyright (c) 2008-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2008-2015, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -27,7 +27,6 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/memory.h>
#include <linux/mm.h>
#include <linux/module.h>
@@ -216,6 +215,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;

@@ -716,6 +720,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);
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2008-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -19,6 +19,7 @@
#include <linux/msm_mdp.h>
#include <linux/types.h>
#include <linux/notifier.h>
#include <linux/leds.h>

#include "mdss_panel.h"
#include "mdss_mdp_splash_logo.h"
@@ -284,6 +285,7 @@ struct msm_fb_data_type {

	u32 wait_for_kickoff;
	u32 thermal_level;
	struct led_trigger *boot_notification_led;
};

static inline void mdss_fb_update_notify_update(struct msm_fb_data_type *mfd)