Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a63f456044 | ||
|
|
0222d10465 | ||
|
|
9b1bd6fa6a | ||
|
|
423451dde7 | ||
| 919a2a99ff | |||
| b88cc47233 |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "KernelSU-Next"]
|
||||||
|
path = KernelSU-Next
|
||||||
|
url = https://github.com/KernelSU-Next/KernelSU-Next
|
||||||
1
KernelSU-Next
Submodule
1
KernelSU-Next
Submodule
Submodule KernelSU-Next added at 2241696498
@@ -234,4 +234,5 @@ source "drivers/sensors/Kconfig"
|
|||||||
source "drivers/gpu/msm/Kconfig"
|
source "drivers/gpu/msm/Kconfig"
|
||||||
|
|
||||||
source "drivers/energy_model/Kconfig"
|
source "drivers/energy_model/Kconfig"
|
||||||
|
source "drivers/kernelsu/Kconfig"
|
||||||
endmenu
|
endmenu
|
||||||
|
|||||||
@@ -193,3 +193,5 @@ obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
|
|||||||
obj-$(CONFIG_SIOX) += siox/
|
obj-$(CONFIG_SIOX) += siox/
|
||||||
obj-$(CONFIG_GNSS) += gnss/
|
obj-$(CONFIG_GNSS) += gnss/
|
||||||
obj-$(CONFIG_SENSORS_SSC) += sensors/
|
obj-$(CONFIG_SENSORS_SSC) += sensors/
|
||||||
|
|
||||||
|
obj-$(CONFIG_KSU) += kernelsu/
|
||||||
|
|||||||
@@ -533,6 +533,22 @@ static struct tp_common_ops double_tap_ops = {
|
|||||||
.show = double_tap_show,
|
.show = double_tap_show,
|
||||||
.store = double_tap_store,
|
.store = double_tap_store,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_TOUCHSCREEN_FOD
|
||||||
|
static ssize_t fp_state_show(struct kobject *kobj,
|
||||||
|
struct kobj_attribute *attr, char *buf)
|
||||||
|
{
|
||||||
|
if (!fts_info)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
return sprintf(buf, "%d,%d,%d\n", fts_info->fod_pressed_x, fts_info->fod_pressed_y,
|
||||||
|
fts_info->fod_pressed);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct tp_common_ops fp_state_ops = {
|
||||||
|
.show = fp_state_show,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GRIP_MODE
|
#ifdef GRIP_MODE
|
||||||
@@ -4303,6 +4319,10 @@ static void fts_gesture_event_handler(struct fts_ts_info *info,
|
|||||||
needCoords = 1;
|
needCoords = 1;
|
||||||
#ifdef CONFIG_TOUCHSCREEN_FOD
|
#ifdef CONFIG_TOUCHSCREEN_FOD
|
||||||
if (event[2] == GEST_ID_LONG_PRESS) {
|
if (event[2] == GEST_ID_LONG_PRESS) {
|
||||||
|
info->fod_pressed = true;
|
||||||
|
info->fod_pressed_x = x;
|
||||||
|
info->fod_pressed_y = y;
|
||||||
|
tp_common_notify_fp_state();
|
||||||
if (!info->fod_down &&
|
if (!info->fod_down &&
|
||||||
(info->fod_status == 1 || info->fod_status == 2)) {
|
(info->fod_status == 1 || info->fod_status == 2)) {
|
||||||
MI_TOUCH_LOGI(1, "%s %s: FOD Down\n", tag,
|
MI_TOUCH_LOGI(1, "%s %s: FOD Down\n", tag,
|
||||||
@@ -4327,7 +4347,6 @@ static void fts_gesture_event_handler(struct fts_ts_info *info,
|
|||||||
if ((info->sensor_sleep &&
|
if ((info->sensor_sleep &&
|
||||||
!info->sleep_finger) ||
|
!info->sleep_finger) ||
|
||||||
!info->sensor_sleep) {
|
!info->sensor_sleep) {
|
||||||
info->fod_pressed = true;
|
|
||||||
input_report_key(info->input_dev,
|
input_report_key(info->input_dev,
|
||||||
BTN_INFO, 1);
|
BTN_INFO, 1);
|
||||||
input_sync(info->input_dev);
|
input_sync(info->input_dev);
|
||||||
@@ -4422,6 +4441,9 @@ static void fts_gesture_event_handler(struct fts_ts_info *info,
|
|||||||
info->sleep_finger = 0;
|
info->sleep_finger = 0;
|
||||||
info->fod_overlap = 0;
|
info->fod_overlap = 0;
|
||||||
info->fod_pressed = false;
|
info->fod_pressed = false;
|
||||||
|
info->fod_pressed_x = 0;
|
||||||
|
info->fod_pressed_y = 0;
|
||||||
|
tp_common_notify_fp_state();
|
||||||
goto gesture_done;
|
goto gesture_done;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -8241,6 +8263,7 @@ static int fts_probe(struct spi_device *client)
|
|||||||
tp_common_set_double_tap_ops(&double_tap_ops);
|
tp_common_set_double_tap_ops(&double_tap_ops);
|
||||||
#ifdef CONFIG_TOUCHSCREEN_FOD
|
#ifdef CONFIG_TOUCHSCREEN_FOD
|
||||||
tp_common_set_fod_status_ops(&fod_status_ops);
|
tp_common_set_fod_status_ops(&fod_status_ops);
|
||||||
|
tp_common_set_fp_state_ops(&fp_state_ops);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -387,6 +387,8 @@ struct fts_ts_info {
|
|||||||
unsigned long fod_id;
|
unsigned long fod_id;
|
||||||
unsigned long fod_x;
|
unsigned long fod_x;
|
||||||
unsigned long fod_y;
|
unsigned long fod_y;
|
||||||
|
unsigned long fod_pressed_x;
|
||||||
|
unsigned long fod_pressed_y;
|
||||||
struct mutex fod_mutex;
|
struct mutex fod_mutex;
|
||||||
struct mutex cmd_update_mutex;
|
struct mutex cmd_update_mutex;
|
||||||
bool fod_coordinate_update;
|
bool fod_coordinate_update;
|
||||||
|
|||||||
@@ -13,10 +13,18 @@ struct kobject *touchpanel_kobj;
|
|||||||
return sysfs_create_file(touchpanel_kobj, &kattr.attr); \
|
return sysfs_create_file(touchpanel_kobj, &kattr.attr); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TS_ENABLE_NOTIFY(type) \
|
||||||
|
void tp_common_notify_##type(void) \
|
||||||
|
{ \
|
||||||
|
sysfs_notify(touchpanel_kobj, NULL, __stringify(type)); \
|
||||||
|
}
|
||||||
|
|
||||||
TS_ENABLE_FOPS(capacitive_keys)
|
TS_ENABLE_FOPS(capacitive_keys)
|
||||||
TS_ENABLE_FOPS(double_tap)
|
TS_ENABLE_FOPS(double_tap)
|
||||||
TS_ENABLE_FOPS(fod_status)
|
TS_ENABLE_FOPS(fod_status)
|
||||||
|
TS_ENABLE_FOPS(fp_state)
|
||||||
TS_ENABLE_FOPS(reversed_keys)
|
TS_ENABLE_FOPS(reversed_keys)
|
||||||
|
TS_ENABLE_NOTIFY(fp_state)
|
||||||
|
|
||||||
static int __init tp_common_init(void)
|
static int __init tp_common_init(void)
|
||||||
{
|
{
|
||||||
|
|||||||
1
drivers/kernelsu
Symbolic link
1
drivers/kernelsu
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../KernelSU-Next/kernel
|
||||||
@@ -387,10 +387,7 @@ static bool pd_get_bms_digest_verified(struct usbpd_pm *pdpm)
|
|||||||
|
|
||||||
pr_err("pval.intval: %d\n", pval.intval);
|
pr_err("pval.intval: %d\n", pval.intval);
|
||||||
|
|
||||||
if (pval.intval == 1)
|
return true;
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get bq27z561 chip ok*/
|
/* get bq27z561 chip ok*/
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ extern int finish_automount(struct vfsmount *, struct path *);
|
|||||||
extern int sb_prepare_remount_readonly(struct super_block *);
|
extern int sb_prepare_remount_readonly(struct super_block *);
|
||||||
|
|
||||||
extern void __init mnt_init(void);
|
extern void __init mnt_init(void);
|
||||||
|
int path_umount(struct path *path, int flags);
|
||||||
|
|
||||||
extern int __mnt_want_write_file(struct file *);
|
extern int __mnt_want_write_file(struct file *);
|
||||||
extern void __mnt_drop_write_file(struct file *);
|
extern void __mnt_drop_write_file(struct file *);
|
||||||
|
|||||||
@@ -1645,6 +1645,40 @@ static inline bool may_mandlock(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int can_umount(const struct path *path, int flags)
|
||||||
|
{
|
||||||
|
struct mount *mnt = real_mount(path->mnt);
|
||||||
|
|
||||||
|
if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW))
|
||||||
|
return -EINVAL;
|
||||||
|
if (!may_mount())
|
||||||
|
return -EPERM;
|
||||||
|
if (path->dentry != path->mnt->mnt_root)
|
||||||
|
return -EINVAL;
|
||||||
|
if (!check_mnt(mnt))
|
||||||
|
return -EINVAL;
|
||||||
|
if (mnt->mnt.mnt_flags & MNT_LOCKED) /* Check optimistically */
|
||||||
|
return -EINVAL;
|
||||||
|
if (flags & MNT_FORCE && !capable(CAP_SYS_ADMIN))
|
||||||
|
return -EPERM;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int path_umount(struct path *path, int flags)
|
||||||
|
{
|
||||||
|
struct mount *mnt = real_mount(path->mnt);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = can_umount(path, flags);
|
||||||
|
if (!ret)
|
||||||
|
ret = do_umount(mnt, flags);
|
||||||
|
|
||||||
|
/* we mustn't call path_put() as that would clear mnt_expiry_mark */
|
||||||
|
dput(path->dentry);
|
||||||
|
mntput_no_expire(mnt);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now umount can handle mount points as well as block devices.
|
* Now umount can handle mount points as well as block devices.
|
||||||
* This is important for filesystems which use unnamed block devices.
|
* This is important for filesystems which use unnamed block devices.
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ struct tp_common_ops {
|
|||||||
const char *buf, size_t count);
|
const char *buf, size_t count);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void tp_common_notify_fp_state(void);
|
||||||
int tp_common_set_capacitive_keys_ops(struct tp_common_ops *ops);
|
int tp_common_set_capacitive_keys_ops(struct tp_common_ops *ops);
|
||||||
int tp_common_set_double_tap_ops(struct tp_common_ops *ops);
|
int tp_common_set_double_tap_ops(struct tp_common_ops *ops);
|
||||||
int tp_common_set_fod_status_ops(struct tp_common_ops *ops);
|
int tp_common_set_fod_status_ops(struct tp_common_ops *ops);
|
||||||
|
int tp_common_set_fp_state_ops(struct tp_common_ops *ops);
|
||||||
int tp_common_set_reversed_keys_ops(struct tp_common_ops *ops);
|
int tp_common_set_reversed_keys_ops(struct tp_common_ops *ops);
|
||||||
|
|||||||
Reference in New Issue
Block a user