Skip to content

Commit

Permalink
[SQUASH] Revert Some Unnecessary and Junk Commits.
Browse files Browse the repository at this point in the history
This reverts commit 18a5f0f.
This reverts commit d12c5e5.
This reverts commit 389d30c.
This reverts commit 4b0fd83.
This reverts commit 5df7d63.
This reverts commit 3b8e0d0.
This reverts commit 886fcfb.
This reverts commit fc9c562.
This reverts commit 8f30b4c.
This reverts commit 407cf41.
This reverts commit 601da39.
This reverts commit 5e362f4.
This reverts commit 76581a4.
This reverts commit 8aa5a55.
This reverts commit b9dc3ae.
This reverts commit ad944bb.

Signed-off-by: ElectroPerf <kunmun.devroms@gmail.com>
  • Loading branch information
ElectroPerf committed May 26, 2021
1 parent a927e2a commit 7a51ef7
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 122 deletions.
16 changes: 8 additions & 8 deletions arch/arm/boot/dts/qcom/sdm660.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

CPU0: cpu@0 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x0>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile0>;
Expand Down Expand Up @@ -78,7 +78,7 @@

CPU1: cpu@1 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x1>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile0>;
Expand All @@ -102,7 +102,7 @@

CPU2: cpu@2 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x2>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile0>;
Expand All @@ -126,7 +126,7 @@

CPU3: cpu@3 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x3>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile0>;
Expand All @@ -150,7 +150,7 @@

CPU4: cpu@100 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x100>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile1>;
Expand Down Expand Up @@ -178,7 +178,7 @@

CPU5: cpu@101 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x101>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile2>;
Expand All @@ -202,7 +202,7 @@

CPU6: cpu@102 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x102>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile3>;
Expand All @@ -226,7 +226,7 @@

CPU7: cpu@103 {
device_type = "cpu";
compatible = "arm,kryo";
compatible = "arm,armv8";
reg = <0x0 0x103>;
enable-method = "psci";
qcom,limits-info = <&mitigation_profile4>;
Expand Down
1 change: 0 additions & 1 deletion drivers/char/adsprpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3653,7 +3653,6 @@ static struct platform_driver fastrpc_driver = {
.name = "fastrpc",
.owner = THIS_MODULE,
.of_match_table = fastrpc_match_table,
.probe_type = PROBE_FORCE_SYNCHRONOUS,
},
};

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/msm/adreno.c
Original file line number Diff line number Diff line change
Expand Up @@ -2877,7 +2877,6 @@ static struct platform_driver adreno_platform_driver = {
.name = DEVICE_3D_NAME,
.pm = &kgsl_pm_ops,
.of_match_table = adreno_match_table,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
}
};

Expand Down
54 changes: 32 additions & 22 deletions drivers/misc/fastchg.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/*
* Author: Chad Froebel <chadfroebel@gmail.com>
*
* Ported by: engstk <eng.stk@sapo.pt>
* Refactored by: Edrick Vince Sinsuan <sedrickvince@gmail.com>
* Port to cheeseburger: engstk <eng.stk@sapo.pt>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
Expand All @@ -12,6 +11,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/

/*
Expand All @@ -21,19 +21,23 @@
* 1 - Force faster charge
*/

#include <linux/module.h>

#include <linux/kobject.h>
#include <linux/sysfs.h>
#include <linux/fastchg.h>
#include <linux/string.h>
#include <linux/module.h>

int force_fast_charge = 1;

static int __init get_fastcharge_opt(char *ffc)
{
if (!strcmp(ffc, "1"))
if (strcmp(ffc, "0") == 0) {
force_fast_charge = 0;
} else if (strcmp(ffc, "1") == 0) {
force_fast_charge = 1;
else
} else {
force_fast_charge = 0;

}
return 1;
}

Expand All @@ -48,43 +52,49 @@ static ssize_t force_fast_charge_show(struct kobject *kobj, struct kobj_attribut

static ssize_t force_fast_charge_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count)
{
int temp;
sscanf(buf, "%d ", &temp);
force_fast_charge = (temp != 1) ? 0 : 1;
sscanf(buf, "%d ", &force_fast_charge);
if (force_fast_charge < 0 || force_fast_charge > 1)
force_fast_charge = 0;

return count;
}

static struct kobj_attribute force_fast_charge_attribute =
__ATTR(force_fast_charge, 0664, force_fast_charge_show, force_fast_charge_store);
__ATTR(force_fast_charge, 0664, force_fast_charge_show, force_fast_charge_store);

static struct attribute *force_fast_charge_attrs[] = {
&force_fast_charge_attribute.attr,
NULL
&force_fast_charge_attribute.attr,
NULL,
};

static struct attribute_group force_fast_charge_attr_group = {
.attrs = force_fast_charge_attrs
.attrs = force_fast_charge_attrs,
};

/* Initialize fast charge sysfs folder */
static struct kobject *force_fast_charge_kobj;

static int force_fast_charge_init(void)
int force_fast_charge_init(void)
{
int ret = 0;
int force_fast_charge_retval;

force_fast_charge_kobj = kobject_create_and_add("fast_charge", kernel_kobj);
if (!force_fast_charge_kobj)
return -ENOMEM;
if (!force_fast_charge_kobj) {
return -ENOMEM;
}

force_fast_charge_retval = sysfs_create_group(force_fast_charge_kobj, &force_fast_charge_attr_group);

if (force_fast_charge_retval)
kobject_put(force_fast_charge_kobj);

ret = sysfs_create_group(force_fast_charge_kobj, &force_fast_charge_attr_group);
if (ret)
if (force_fast_charge_retval)
kobject_put(force_fast_charge_kobj);

return ret;
return (force_fast_charge_retval);
}

static void force_fast_charge_exit(void)
void force_fast_charge_exit(void)
{
kobject_put(force_fast_charge_kobj);
}
Expand Down
18 changes: 3 additions & 15 deletions drivers/power/supply/qcom/smb-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,15 +955,9 @@ static int set_sdp_current(struct smb_charger *chg, int icl_ua)
const struct apsd_result *apsd_result = smblib_get_apsd_result(chg);

#ifdef CONFIG_FORCE_FAST_CHARGE
if (force_fast_charge) {
/*
* Apply properly forced fast charge according to USB version,
* do not set higher than supported mA.
*/
if (icl_ua == USBIN_100MA)
icl_ua = USBIN_500MA;
else if (icl_ua == USBIN_150MA)
icl_ua = USBIN_900MA;
if (force_fast_charge > 0 && icl_ua == USBIN_500MA)
{
icl_ua = USBIN_900MA;
}
#endif

Expand Down Expand Up @@ -1027,12 +1021,6 @@ static int get_sdp_current(struct smb_charger *chg, int *icl_ua)
return rc;
}

#ifdef CONFIG_FORCE_FAST_CHARGE
/* Always set higher mA if force_fast_charge */
if (force_fast_charge)
icl_options |= USB51_MODE_BIT;
#endif

usb3 = (icl_options & CFG_USB3P0_SEL_BIT);

if (icl_options & USB51_MODE_BIT)
Expand Down
6 changes: 3 additions & 3 deletions drivers/slimbus/slim-msm-ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ enum mgr_intr {

enum frm_cfg {
FRM_ACTIVE = 1,
CLK_GEAR = 11,
ROOT_FREQ = 31,
CLK_GEAR = 7,
ROOT_FREQ = 11,
REF_CLK_GEAR = 15,
INTR_WAKE = 19,
};
Expand Down Expand Up @@ -207,7 +207,7 @@ static irqreturn_t msm_slim_interrupt(int irq, void *d)
* signalling completion/exiting ISR
*/
mb();
msm_slim_manage_tx_msgq(dev, false, NULL, 0);
msm_slim_manage_tx_msgq(dev, false, NULL);
}
if (stat & MGR_INT_RX_MSG_RCVD) {
u32 rx_buf[10];
Expand Down
1 change: 0 additions & 1 deletion drivers/soc/qcom/icnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -5022,7 +5022,6 @@ static struct platform_driver icnss_driver = {
.pm = &icnss_pm_ops,
.owner = THIS_MODULE,
.of_match_table = icnss_dt_match,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};

Expand Down
1 change: 0 additions & 1 deletion drivers/staging/android/ion/msm/msm_ion.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,6 @@ static struct platform_driver msm_ion_driver = {
.driver = {
.name = "ion-msm",
.of_match_table = msm_ion_match_table,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};

Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/lmh_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static LIST_HEAD(lmh_device_list);
_data, _ops); \
if (IS_ERR(_node)) { \
_ret = PTR_ERR(_node); \
pr_debug("Error creating debugfs file:%s. err:%d\n", \
pr_err("Error creating debugfs file:%s. err:%d\n", \
_name, _ret); \
} \
} while (0)
Expand All @@ -117,7 +117,7 @@ static LIST_HEAD(lmh_device_list);
_node = debugfs_create_dir(_name, _parent); \
if (IS_ERR(_node)) { \
_ret = PTR_ERR(_node); \
pr_debug("Error creating debugfs dir:%s. err:%d\n", \
pr_err("Error creating debugfs dir:%s. err:%d\n", \
_name, _ret); \
} \
} while (0)
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/msm/mdss_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4342,7 +4342,7 @@ static int __maybe_unused mdss_dp_usbpd_setup(struct mdss_dp_drv_pdata *dp_drv)
pd_phandle);

if (IS_ERR(dp_drv->pd)) {
pr_debug("get_usbpd phandle failed (%ld)\n",
pr_err("get_usbpd phandle failed (%ld)\n",
PTR_ERR(dp_drv->pd));
return PTR_ERR(dp_drv->pd);
}
Expand Down Expand Up @@ -4416,7 +4416,7 @@ static int mdss_dp_probe(struct platform_device *pdev)

#ifndef CONFIG_MACH_ASUS_X00T
if (mdss_dp_usbpd_setup(dp_drv)) {
pr_debug("Error usbpd setup!\n");
pr_err("Error usbpd setup!\n");
devm_kfree(&pdev->dev, dp_drv);
dp_drv = NULL;
return -EPROBE_DEFER;
Expand Down
47 changes: 1 addition & 46 deletions fs/proc/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/setup.h>

static char new_command_line[COMMAND_LINE_SIZE];

static int cmdline_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "%s\n", new_command_line);
seq_printf(m, "%s\n", saved_command_line);
return 0;
}

Expand All @@ -24,50 +21,8 @@ static const struct file_operations cmdline_proc_fops = {
.release = single_release,
};

static void patch_flag(char *cmd, const char *flag, const char *val)
{
size_t flag_len, val_len;
char *start, *end;

start = strstr(cmd, flag);
if (!start)
return;

flag_len = strlen(flag);
val_len = strlen(val);
end = start + flag_len + strcspn(start + flag_len, " ");
memmove(start + flag_len + val_len, end, strlen(end) + 1);
memcpy(start + flag_len, val, val_len);
}

static void patch_safetynet_flags(char *cmd)
{
patch_flag(cmd, "androidboot.flash.locked=", "1");
patch_flag(cmd, "androidboot.verifiedbootstate=", "green");
patch_flag(cmd, "androidboot.veritymode=", "enforcing");
patch_flag(cmd, "androidboot.vbmeta.device_state=", "locked");
}

static bool in_recovery;

static int __init boot_mode_setup(char *value)
{
in_recovery = !strcmp(value, "recovery");
return 1;
}
__setup("androidboot.mode=", boot_mode_setup);

static int __init proc_cmdline_init(void)
{
strcpy(new_command_line, saved_command_line);

/*
* Patch various flags from command line seen by userspace in order to
* pass SafetyNet checks.
*/
if (!in_recovery)
patch_safetynet_flags(new_command_line);

proc_create("cmdline", 0, NULL, &cmdline_proc_fops);
return 0;
}
Expand Down
11 changes: 0 additions & 11 deletions include/linux/slimbus/slimbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,6 @@ enum slim_ch_rate {
SLIM_RATE_1HZ,
SLIM_RATE_4000HZ,
SLIM_RATE_11025HZ,
SLIM_RATE_12000HZ,
SLIM_RATE_16000HZ,
SLIM_RATE_22050HZ,
SLIM_RATE_24000HZ,
SLIM_RATE_32000HZ,
SLIM_RATE_44100HZ,
SLIM_RATE_48000HZ,
SLIM_RATE_64000HZ,
SLIM_RATE_88200HZ,
SLIM_RATE_96000HZ,
SLIM_RATE_128000HZ,
};

/*
Expand Down
Loading

0 comments on commit 7a51ef7

Please sign in to comment.