Skip to content

Commit

Permalink
merge upstream (6.0.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
vantu5z committed Oct 19, 2022
1 parent 955e90c commit b951c96
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 17 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

This is patched kernel module for touchpads with enable/disable LED button in left corner.

Originaly patches comes from Takashi Iwai from SUSE for supporting the LED in Synaptics touchpads.
Originally patches comes from Takashi Iwai from SUSE for supporting the LED in Synaptics touchpads.

This [video](https://www.youtube.com/watch?v=fj1Yf4ASag0) show how these touchpads looks like.

## Upstream
Kernel sources are taken from [repo.or.cz](https://repo.or.cz/linux.git) at [linux-rolling-stable](https://repo.or.cz/linux.git/shortlog/refs/heads/linux-rolling-stable) (or `linux-5.x.y`) head. Changes will be monitored and applied.
Kernel sources are taken from [repo.or.cz](https://repo.or.cz/linux.git) at [linux-rolling-stable](https://repo.or.cz/linux.git/shortlog/refs/heads/linux-rolling-stable) (or `linux-6.x.y`) head. Changes will be monitored and applied.
```
git archive --remote="git://repo.or.cz/linux.git" "linux-rolling-stable" drivers/input/mouse | tar -x
```
Expand Down
16 changes: 8 additions & 8 deletions synaptics-led/kernel.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -ur upstream/Kconfig mouse/Kconfig
--- upstream/Kconfig 2022-05-15 21:20:54.000000000 +0300
+++ mouse/Kconfig 2021-03-22 11:45:19.777536626 +0300
+++ mouse/Kconfig 2022-10-19 09:45:24.217471642 +0300
@@ -101,6 +101,15 @@

If unsure, say Y.
Expand All @@ -18,8 +18,8 @@ diff -ur upstream/Kconfig mouse/Kconfig
bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EXPERT
default y
diff -ur upstream/synaptics.c mouse/synaptics.c
--- upstream/synaptics.c 2022-07-12 17:42:27.000000000 +0300
+++ mouse/synaptics.c 2022-07-21 13:01:58.049896055 +0300
--- upstream/synaptics.c 2022-10-15 09:02:59.000000000 +0300
+++ mouse/synaptics.c 2022-10-19 09:45:24.217471642 +0300
@@ -26,6 +26,7 @@
#include <linux/input/mt.h>
#include <linux/serio.h>
Expand All @@ -28,7 +28,7 @@ diff -ur upstream/synaptics.c mouse/synaptics.c
#include <linux/rmi.h>
#include <linux/i2c.h>
#include <linux/slab.h>
@@ -729,6 +730,141 @@
@@ -728,6 +729,141 @@
serio_register_port(serio);
}

Expand Down Expand Up @@ -170,15 +170,15 @@ diff -ur upstream/synaptics.c mouse/synaptics.c
/*****************************************************************************
* Functions to interpret the absolute mode packets
****************************************************************************/
@@ -1416,6 +1552,7 @@
@@ -1415,6 +1551,7 @@
device_remove_file(&psmouse->ps2dev.serio->dev,
&psmouse_attr_disable_gesture.dattr);

+ synaptics_free_led(psmouse);
synaptics_reset(psmouse);
kfree(priv);
psmouse->private = NULL;
@@ -1476,6 +1613,8 @@
@@ -1475,6 +1612,8 @@
return -ENXIO;
}

Expand All @@ -187,7 +187,7 @@ diff -ur upstream/synaptics.c mouse/synaptics.c
return 0;
}

@@ -1594,6 +1733,9 @@
@@ -1593,6 +1732,9 @@
info->capabilities, info->ext_cap, info->ext_cap_0c,
info->ext_cap_10, info->board_id, info->firmware_id);

Expand All @@ -199,7 +199,7 @@ diff -ur upstream/synaptics.c mouse/synaptics.c
psmouse_err(psmouse,
diff -ur upstream/synaptics.h mouse/synaptics.h
--- upstream/synaptics.h 2022-05-15 21:20:54.000000000 +0300
+++ mouse/synaptics.h 2021-03-22 11:45:16.794085572 +0300
+++ mouse/synaptics.h 2022-10-19 09:45:24.217471642 +0300
@@ -177,6 +177,8 @@
u32 x_min, y_min; /* Min coordinates (from FW) */
};
Expand Down
2 changes: 1 addition & 1 deletion synaptics-led/mouse/cyapa_gen6.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct pip_app_resp_head {
* The value of data_status can be the first byte of data or
* the command status or the unsupported command code depending on the
* requested command code.
*/
*/
u8 data_status;
} __packed;

Expand Down
2 changes: 1 addition & 1 deletion synaptics-led/mouse/cypress_ps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ int cypress_init(struct psmouse *psmouse)
err_exit:
/*
* Reset Cypress Trackpad as a standard mouse. Then
* let psmouse driver commmunicating with it as default PS2 mouse.
* let psmouse driver communicating with it as default PS2 mouse.
*/
cypress_reset(psmouse);

Expand Down
2 changes: 1 addition & 1 deletion synaptics-led/mouse/gpio_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct gpio_mouse {

/*
* Timer function which is run every scan_ms ms when the device is opened.
* The dev input variable is set to the the input_dev pointer.
* The dev input variable is set to the input_dev pointer.
*/
static void gpio_mouse_scan(struct input_dev *input)
{
Expand Down
11 changes: 9 additions & 2 deletions synaptics-led/mouse/psmouse-smbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ struct psmouse_smbus_dev {
static LIST_HEAD(psmouse_smbus_list);
static DEFINE_MUTEX(psmouse_smbus_mutex);

static struct workqueue_struct *psmouse_smbus_wq;

static void psmouse_smbus_check_adapter(struct i2c_adapter *adapter)
{
struct psmouse_smbus_dev *smbdev;
Expand Down Expand Up @@ -161,7 +163,7 @@ static void psmouse_smbus_schedule_remove(struct i2c_client *client)
INIT_WORK(&rwork->work, psmouse_smbus_remove_i2c_device);
rwork->client = client;

schedule_work(&rwork->work);
queue_work(psmouse_smbus_wq, &rwork->work);
}
}

Expand Down Expand Up @@ -305,9 +307,14 @@ int __init psmouse_smbus_module_init(void)
{
int error;

psmouse_smbus_wq = alloc_workqueue("psmouse-smbus", 0, 0);
if (!psmouse_smbus_wq)
return -ENOMEM;

error = bus_register_notifier(&i2c_bus_type, &psmouse_smbus_notifier);
if (error) {
pr_err("failed to register i2c bus notifier: %d\n", error);
destroy_workqueue(psmouse_smbus_wq);
return error;
}

Expand All @@ -317,5 +324,5 @@ int __init psmouse_smbus_module_init(void)
void psmouse_smbus_module_exit(void)
{
bus_unregister_notifier(&i2c_bus_type, &psmouse_smbus_notifier);
flush_scheduled_work();
destroy_workqueue(psmouse_smbus_wq);
}
1 change: 0 additions & 1 deletion synaptics-led/mouse/pxa930_trkball.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/io.h>
#include <linux/slab.h>

#include <mach/hardware.h>
#include <linux/platform_data/mouse-pxa930_trkball.h>

/* Trackball Controller Register Definitions */
Expand Down
1 change: 0 additions & 1 deletion synaptics-led/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ static const char * const smbus_pnp_ids[] = {
"LEN2044", /* L470 */
"LEN2054", /* E480 */
"LEN2055", /* E580 */
"LEN2064", /* T14 Gen 1 AMD / P14s Gen 1 AMD */
"LEN2068", /* T14 Gen 1 */
"SYN3052", /* HP EliteBook 840 G4 */
"SYN3221", /* HP 15-ay000 */
Expand Down
14 changes: 14 additions & 0 deletions synaptics-led/mouse/vmmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,19 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
return 0;
}

/**
* vmmouse_reset - Disable vmmouse and reset
*
* @psmouse: Pointer to the psmouse struct
*
* Tries to disable vmmouse mode before enter suspend.
*/
static void vmmouse_reset(struct psmouse *psmouse)
{
vmmouse_disable(psmouse);
psmouse_reset(psmouse);
}

/**
* vmmouse_disconnect - Take down vmmouse driver
*
Expand Down Expand Up @@ -472,6 +485,7 @@ int vmmouse_init(struct psmouse *psmouse)
psmouse->protocol_handler = vmmouse_process_byte;
psmouse->disconnect = vmmouse_disconnect;
psmouse->reconnect = vmmouse_reconnect;
psmouse->cleanup = vmmouse_reset;

return 0;

Expand Down

0 comments on commit b951c96

Please sign in to comment.