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

Commit 4fd2301e authored by tracychui(71954)'s avatar tracychui(71954)
Browse files

Revert "Add memory detect node for service menu"

This reverts commit 53c2191d.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Icf20ce4fb3c48e18632704faf3d301ba38484e6a
parent 53c2191d
Loading
Loading
Loading
Loading
+1 −72
Original line number Diff line number Diff line
@@ -44,43 +44,12 @@
#define XO_CLK_RATE	19200000
#define CMDLINE_DSI_CTL_NUM_STRING_LEN 2

/*[20191024][TracyChui]Add memory detect node for service menu start */
static u8 memorycid[20] = {0};
/*[20191024][TracyChui]Add memory detect node for service menu end */

/* Master structure to hold all the information about the DSI/panel */
static struct mdss_dsi_data *mdss_dsi_res;

#define DSI_DISABLE_PC_LATENCY 100
#define DSI_ENABLE_PC_LATENCY PM_QOS_DEFAULT_VALUE

/*[20191024][TracyChui]Add memory detect node for service menu start */
void Arima_read_file_func(char *pFilePath, u8 *pBuf, u16 nLength)
{
    struct file *pFile = NULL;
    mm_segment_t old_fs;
    ssize_t nReadBytes = 0;

    old_fs = get_fs();
    set_fs(get_ds());

    pFile = filp_open(pFilePath, O_RDONLY, 0);

    if (IS_ERR(pFile)) {
        printk ( "[Tracy]Open file failed: %s\n", pFilePath);
        return;
    }

    pFile->f_op->llseek(pFile, 0, SEEK_SET);
    nReadBytes = pFile->f_op->read(pFile, pBuf, nLength, &pFile->f_pos);
    printk ( "[Tracy]Read %d bytes!\n", (int)nReadBytes);

    set_fs(old_fs);

    filp_close(pFile, NULL);
}
/*[20191024][TracyChui]Add memory detect node for service menu end */

static struct pm_qos_request mdss_dsi_pm_qos_request;

void mdss_dump_dsi_debug_bus(u32 bus_dump_flag,
@@ -1556,13 +1525,6 @@ int mdss_dsi_on(struct mdss_panel_data *pdata)
	struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL;
	int cur_power_state;

/*[20191024][TracyChui]Add memory detect node for service menu start */
	if (memorycid[0]!=0x31)
		{
			Arima_read_file_func(MEMORY_CID_PATCH, memorycid, 20);
		}
/*[20191024][TracyChui]Add memory detect node for service menu end */

	if (pdata == NULL) {
		pr_err("%s: Invalid input data\n", __func__);
		return -EINVAL;
@@ -3394,35 +3356,6 @@ static const struct file_operations proc_lcm_revision_fops = {

/*[Arima_8901][Jialongjhan] Expose display revision 20190326 end*/

/*[20191024][TracyChui]Add memory detect node for service menu start */
static int proc_memory_vendor_show(struct seq_file *m, void *v)
{
	printk("[Tracy]memory cid : %s \n", memorycid);

	if(memorycid[6]==0x35)
		{
	      seq_printf(m, "SAMSUNG_2ND\n");
		}
	else
		{
		 seq_printf(m, "SAMSUNG_Main\n");
		}
    return 0;
}

static int proc_memory_vendor_open(struct inode *inode, struct file *file)
{
    return single_open(file, proc_memory_vendor_show, NULL);
}

static const struct file_operations proc_memory_vendor_fops = {
    .open  = proc_memory_vendor_open,
    .read = seq_read,
    .llseek = seq_lseek,
    .release = single_release,
};
/*[20191024][TracyChui]Add memory detect node for service menu end */

static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
{
	int rc = 0;
@@ -3622,10 +3555,6 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
    proc_create("lcm_revision", 0666, NULL, &proc_lcm_revision_fops);
    //[Arima_8901][Jialongjhan] Expose display revision 20190326 end
	
	/*[20191024][TracyChui]Add memory detect node for service menu start */
	proc_create("memory_vendor", 0666, NULL, &proc_memory_vendor_fops);
	/*[20191024][TracyChui]Add memory detect node for service menu end */

	return 0;

error_shadow_clk_deinit:
+0 −7
Original line number Diff line number Diff line
@@ -19,9 +19,6 @@
#include <linux/irqreturn.h>
#include <linux/pinctrl/consumer.h>
#include <linux/gpio.h>
/*[20191024][TracyChui]Add memory detect node for service menu start */
#include <linux/file.h>
/*[20191024][TracyChui]Add memory detect node for service menu end */

#include "mdss_panel.h"
#include "mdss_dsi_cmd.h"
@@ -68,10 +65,6 @@
#define MDSS_STATUS_TE_WAIT_MAX		3
#define NONE_PANEL "none"

/*[20191024][TracyChui]Add memory detect node for service menu start */
#define MEMORY_CID_PATCH "/sys/class/mmc_host/mmc0/mmc0:0001/cid"
/*[20191024][TracyChui]Add memory detect node for service menu end */

enum {		/* mipi dsi panel */
	DSI_VIDEO_MODE,
	DSI_CMD_MODE,