diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-27 13:20:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-27 13:20:39 -0400 |
commit | ed3f4e239834317934cc73a187e27e44b217056b (patch) | |
tree | 6990e64bde453357c1a58f1378c6c4dace9b9383 | |
parent | c7b7eefa57ae3c8802fdec7d07ac4df6c49d1e7a (diff) | |
parent | cacd9759eea2f1c7e8792ecd91ed4602f963b1a5 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
"Just random driver fixups, nothing exiting"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - avoid using uninitialized variable when probing
Input: xen-kbdfront - mark expected switch fall-through
Input: atmel_mxt_ts - mark expected switch fall-through
Input: cyapa - mark expected switch fall-throughs
Input: wm97xx-ts - fix exit path
Input: of_touchscreen - add support for touchscreen-min-x|y
Input: Fix DIR-685 touchkeys MAINTAINERS entry
Input: elants_i2c - use DMA safe i2c when possible
Input: silead - try firmware reload after unsuccessful resume
Input: st1232 - set INPUT_PROP_DIRECT property
Input: xilinx_ps2 - convert to using %pOFn instead of device_node.name
Input: atmel_mxt_ts - fix multiple <linux/property.h> includes
Input: sun4i-lradc - convert to using %pOFn instead of device_node.name
Input: pwm-vibrator - correct pwms in DT binding example
-rw-r--r-- | Documentation/devicetree/bindings/input/pwm-vibrator.txt | 4 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt | 6 | ||||
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/sun4i-lradc-keys.c | 6 | ||||
-rw-r--r-- | drivers/input/misc/xen-kbdfront.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/cyapa_gen3.c | 4 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 3 | ||||
-rw-r--r-- | drivers/input/touchscreen/elants_i2c.c | 7 | ||||
-rw-r--r-- | drivers/input/touchscreen/of_touchscreen.c | 36 | ||||
-rw-r--r-- | drivers/input/touchscreen/silead.c | 13 | ||||
-rw-r--r-- | drivers/input/touchscreen/st1232.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm97xx-core.c | 3 |
14 files changed, 64 insertions, 29 deletions
diff --git a/Documentation/devicetree/bindings/input/pwm-vibrator.txt b/Documentation/devicetree/bindings/input/pwm-vibrator.txt index 09145d18491d..88c775a3fe21 100644 --- a/Documentation/devicetree/bindings/input/pwm-vibrator.txt +++ b/Documentation/devicetree/bindings/input/pwm-vibrator.txt | |||
@@ -58,8 +58,8 @@ Example from Motorola Droid 4: | |||
58 | 58 | ||
59 | vibrator { | 59 | vibrator { |
60 | compatible = "pwm-vibrator"; | 60 | compatible = "pwm-vibrator"; |
61 | pwms = <&pwm8 0 1000000000 0>, | 61 | pwms = <&pwm9 0 1000000000 0>, |
62 | <&pwm9 0 1000000000 0>; | 62 | <&pwm8 0 1000000000 0>; |
63 | pwm-names = "enable", "direction"; | 63 | pwm-names = "enable", "direction"; |
64 | direction-duty-cycle-ns = <1000000000>; | 64 | direction-duty-cycle-ns = <1000000000>; |
65 | }; | 65 | }; |
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt index d092d5d033a0..8641a2d70851 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt | |||
@@ -1,10 +1,12 @@ | |||
1 | General Touchscreen Properties: | 1 | General Touchscreen Properties: |
2 | 2 | ||
3 | Optional properties for Touchscreens: | 3 | Optional properties for Touchscreens: |
4 | - touchscreen-min-x : minimum x coordinate reported (0 if not set) | ||
5 | - touchscreen-min-y : minimum y coordinate reported (0 if not set) | ||
4 | - touchscreen-size-x : horizontal resolution of touchscreen | 6 | - touchscreen-size-x : horizontal resolution of touchscreen |
5 | (in pixels) | 7 | (maximum x coordinate reported + 1) |
6 | - touchscreen-size-y : vertical resolution of touchscreen | 8 | - touchscreen-size-y : vertical resolution of touchscreen |
7 | (in pixels) | 9 | (maximum y coordinate reported + 1) |
8 | - touchscreen-max-pressure : maximum reported pressure (arbitrary range | 10 | - touchscreen-max-pressure : maximum reported pressure (arbitrary range |
9 | dependent on the controller) | 11 | dependent on the controller) |
10 | - touchscreen-min-pressure : minimum pressure on the touchscreen to be | 12 | - touchscreen-min-pressure : minimum pressure on the touchscreen to be |
diff --git a/MAINTAINERS b/MAINTAINERS index fdb6a298c7e7..30cd3c4d8c7d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4099,7 +4099,7 @@ D-LINK DIR-685 TOUCHKEYS DRIVER | |||
4099 | M: Linus Walleij <linus.walleij@linaro.org> | 4099 | M: Linus Walleij <linus.walleij@linaro.org> |
4100 | L: linux-input@vger.kernel.org | 4100 | L: linux-input@vger.kernel.org |
4101 | S: Supported | 4101 | S: Supported |
4102 | F: drivers/input/dlink-dir685-touchkeys.c | 4102 | F: drivers/input/keyboard/dlink-dir685-touchkeys.c |
4103 | 4103 | ||
4104 | DALLAS/MAXIM DS1685-FAMILY REAL TIME CLOCK | 4104 | DALLAS/MAXIM DS1685-FAMILY REAL TIME CLOCK |
4105 | M: Joshua Kinard <kumba@gentoo.org> | 4105 | M: Joshua Kinard <kumba@gentoo.org> |
diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c index a37c172452e6..57272df34cd5 100644 --- a/drivers/input/keyboard/sun4i-lradc-keys.c +++ b/drivers/input/keyboard/sun4i-lradc-keys.c | |||
@@ -185,19 +185,19 @@ static int sun4i_lradc_load_dt_keymap(struct device *dev, | |||
185 | 185 | ||
186 | error = of_property_read_u32(pp, "channel", &channel); | 186 | error = of_property_read_u32(pp, "channel", &channel); |
187 | if (error || channel != 0) { | 187 | if (error || channel != 0) { |
188 | dev_err(dev, "%s: Inval channel prop\n", pp->name); | 188 | dev_err(dev, "%pOFn: Inval channel prop\n", pp); |
189 | return -EINVAL; | 189 | return -EINVAL; |
190 | } | 190 | } |
191 | 191 | ||
192 | error = of_property_read_u32(pp, "voltage", &map->voltage); | 192 | error = of_property_read_u32(pp, "voltage", &map->voltage); |
193 | if (error) { | 193 | if (error) { |
194 | dev_err(dev, "%s: Inval voltage prop\n", pp->name); | 194 | dev_err(dev, "%pOFn: Inval voltage prop\n", pp); |
195 | return -EINVAL; | 195 | return -EINVAL; |
196 | } | 196 | } |
197 | 197 | ||
198 | error = of_property_read_u32(pp, "linux,code", &map->keycode); | 198 | error = of_property_read_u32(pp, "linux,code", &map->keycode); |
199 | if (error) { | 199 | if (error) { |
200 | dev_err(dev, "%s: Inval linux,code prop\n", pp->name); | 200 | dev_err(dev, "%pOFn: Inval linux,code prop\n", pp); |
201 | return -EINVAL; | 201 | return -EINVAL; |
202 | } | 202 | } |
203 | 203 | ||
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 594f72e39639..24bc5c5d876f 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c | |||
@@ -524,7 +524,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev, | |||
524 | case XenbusStateClosed: | 524 | case XenbusStateClosed: |
525 | if (dev->state == XenbusStateClosed) | 525 | if (dev->state == XenbusStateClosed) |
526 | break; | 526 | break; |
527 | /* Missed the backend's CLOSING state -- fallthrough */ | 527 | /* fall through - Missed the backend's CLOSING state */ |
528 | case XenbusStateClosing: | 528 | case XenbusStateClosing: |
529 | xenbus_frontend_closed(dev); | 529 | xenbus_frontend_closed(dev); |
530 | break; | 530 | break; |
diff --git a/drivers/input/mouse/cyapa_gen3.c b/drivers/input/mouse/cyapa_gen3.c index 076dda4a66da..00e395dfc3d5 100644 --- a/drivers/input/mouse/cyapa_gen3.c +++ b/drivers/input/mouse/cyapa_gen3.c | |||
@@ -1067,7 +1067,7 @@ static int cyapa_gen3_do_operational_check(struct cyapa *cyapa) | |||
1067 | return error; | 1067 | return error; |
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | /* Fallthrough state */ | 1070 | /* Fall through */ |
1071 | case CYAPA_STATE_BL_IDLE: | 1071 | case CYAPA_STATE_BL_IDLE: |
1072 | /* Try to get firmware version in bootloader mode. */ | 1072 | /* Try to get firmware version in bootloader mode. */ |
1073 | cyapa_gen3_bl_query_data(cyapa); | 1073 | cyapa_gen3_bl_query_data(cyapa); |
@@ -1078,7 +1078,7 @@ static int cyapa_gen3_do_operational_check(struct cyapa *cyapa) | |||
1078 | return error; | 1078 | return error; |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | /* Fallthrough state */ | 1081 | /* Fall through */ |
1082 | case CYAPA_STATE_OP: | 1082 | case CYAPA_STATE_OP: |
1083 | /* | 1083 | /* |
1084 | * Reading query data before going back to the full mode | 1084 | * Reading query data before going back to the full mode |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 55d33500d55e..5e85f3cca867 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -99,9 +99,7 @@ static int synaptics_mode_cmd(struct psmouse *psmouse, u8 mode) | |||
99 | int synaptics_detect(struct psmouse *psmouse, bool set_properties) | 99 | int synaptics_detect(struct psmouse *psmouse, bool set_properties) |
100 | { | 100 | { |
101 | struct ps2dev *ps2dev = &psmouse->ps2dev; | 101 | struct ps2dev *ps2dev = &psmouse->ps2dev; |
102 | u8 param[4]; | 102 | u8 param[4] = { 0 }; |
103 | |||
104 | param[0] = 0; | ||
105 | 103 | ||
106 | ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); | 104 | ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); |
107 | ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); | 105 | ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 07de1b49293c..6615c02a08fd 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -245,7 +245,7 @@ static int xps2_of_probe(struct platform_device *ofdev) | |||
245 | unsigned int irq; | 245 | unsigned int irq; |
246 | int error; | 246 | int error; |
247 | 247 | ||
248 | dev_info(dev, "Device Tree Probing \'%s\'\n", dev->of_node->name); | 248 | dev_info(dev, "Device Tree Probing \'%pOFn\'\n", dev->of_node); |
249 | 249 | ||
250 | /* Get iospace for the device */ | 250 | /* Get iospace for the device */ |
251 | error = of_address_to_resource(dev->of_node, 0, &r_mem); | 251 | error = of_address_to_resource(dev->of_node, 0, &r_mem); |
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 3232af5dcf89..d3aacd534e9c 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/property.h> | 29 | #include <linux/property.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/gpio/consumer.h> | 31 | #include <linux/gpio/consumer.h> |
32 | #include <linux/property.h> | ||
33 | #include <asm/unaligned.h> | 32 | #include <asm/unaligned.h> |
34 | #include <media/v4l2-device.h> | 33 | #include <media/v4l2-device.h> |
35 | #include <media/v4l2-ioctl.h> | 34 | #include <media/v4l2-ioctl.h> |
@@ -489,7 +488,7 @@ static int mxt_lookup_bootloader_address(struct mxt_data *data, bool retry) | |||
489 | bootloader = appmode - 0x24; | 488 | bootloader = appmode - 0x24; |
490 | break; | 489 | break; |
491 | } | 490 | } |
492 | /* Fall through for normal case */ | 491 | /* Fall through - for normal case */ |
493 | case 0x4c: | 492 | case 0x4c: |
494 | case 0x4d: | 493 | case 0x4d: |
495 | case 0x5a: | 494 | case 0x5a: |
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index d21ca39b0fdb..f2cb23121833 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c | |||
@@ -147,10 +147,11 @@ struct elants_data { | |||
147 | u8 cmd_resp[HEADER_SIZE]; | 147 | u8 cmd_resp[HEADER_SIZE]; |
148 | struct completion cmd_done; | 148 | struct completion cmd_done; |
149 | 149 | ||
150 | u8 buf[MAX_PACKET_SIZE]; | ||
151 | |||
152 | bool wake_irq_enabled; | 150 | bool wake_irq_enabled; |
153 | bool keep_power_in_suspend; | 151 | bool keep_power_in_suspend; |
152 | |||
153 | /* Must be last to be used for DMA operations */ | ||
154 | u8 buf[MAX_PACKET_SIZE] ____cacheline_aligned; | ||
154 | }; | 155 | }; |
155 | 156 | ||
156 | static int elants_i2c_send(struct i2c_client *client, | 157 | static int elants_i2c_send(struct i2c_client *client, |
@@ -863,7 +864,7 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev) | |||
863 | int i; | 864 | int i; |
864 | int len; | 865 | int len; |
865 | 866 | ||
866 | len = i2c_master_recv(client, ts->buf, sizeof(ts->buf)); | 867 | len = i2c_master_recv_dmasafe(client, ts->buf, sizeof(ts->buf)); |
867 | if (len < 0) { | 868 | if (len < 0) { |
868 | dev_err(&client->dev, "%s: failed to read data: %d\n", | 869 | dev_err(&client->dev, "%s: failed to read data: %d\n", |
869 | __func__, len); | 870 | __func__, len); |
diff --git a/drivers/input/touchscreen/of_touchscreen.c b/drivers/input/touchscreen/of_touchscreen.c index 9642f103b726..6d241d45e312 100644 --- a/drivers/input/touchscreen/of_touchscreen.c +++ b/drivers/input/touchscreen/of_touchscreen.c | |||
@@ -35,7 +35,7 @@ static bool touchscreen_get_prop_u32(struct device *dev, | |||
35 | 35 | ||
36 | static void touchscreen_set_params(struct input_dev *dev, | 36 | static void touchscreen_set_params(struct input_dev *dev, |
37 | unsigned long axis, | 37 | unsigned long axis, |
38 | int max, int fuzz) | 38 | int min, int max, int fuzz) |
39 | { | 39 | { |
40 | struct input_absinfo *absinfo; | 40 | struct input_absinfo *absinfo; |
41 | 41 | ||
@@ -47,6 +47,7 @@ static void touchscreen_set_params(struct input_dev *dev, | |||
47 | } | 47 | } |
48 | 48 | ||
49 | absinfo = &dev->absinfo[axis]; | 49 | absinfo = &dev->absinfo[axis]; |
50 | absinfo->minimum = min; | ||
50 | absinfo->maximum = max; | 51 | absinfo->maximum = max; |
51 | absinfo->fuzz = fuzz; | 52 | absinfo->fuzz = fuzz; |
52 | } | 53 | } |
@@ -68,8 +69,9 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, | |||
68 | struct touchscreen_properties *prop) | 69 | struct touchscreen_properties *prop) |
69 | { | 70 | { |
70 | struct device *dev = input->dev.parent; | 71 | struct device *dev = input->dev.parent; |
72 | struct input_absinfo *absinfo; | ||
71 | unsigned int axis; | 73 | unsigned int axis; |
72 | unsigned int maximum, fuzz; | 74 | unsigned int minimum, maximum, fuzz; |
73 | bool data_present; | 75 | bool data_present; |
74 | 76 | ||
75 | input_alloc_absinfo(input); | 77 | input_alloc_absinfo(input); |
@@ -77,7 +79,10 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, | |||
77 | return; | 79 | return; |
78 | 80 | ||
79 | axis = multitouch ? ABS_MT_POSITION_X : ABS_X; | 81 | axis = multitouch ? ABS_MT_POSITION_X : ABS_X; |
80 | data_present = touchscreen_get_prop_u32(dev, "touchscreen-size-x", | 82 | data_present = touchscreen_get_prop_u32(dev, "touchscreen-min-x", |
83 | input_abs_get_min(input, axis), | ||
84 | &minimum) | | ||
85 | touchscreen_get_prop_u32(dev, "touchscreen-size-x", | ||
81 | input_abs_get_max(input, | 86 | input_abs_get_max(input, |
82 | axis) + 1, | 87 | axis) + 1, |
83 | &maximum) | | 88 | &maximum) | |
@@ -85,10 +90,13 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, | |||
85 | input_abs_get_fuzz(input, axis), | 90 | input_abs_get_fuzz(input, axis), |
86 | &fuzz); | 91 | &fuzz); |
87 | if (data_present) | 92 | if (data_present) |
88 | touchscreen_set_params(input, axis, maximum - 1, fuzz); | 93 | touchscreen_set_params(input, axis, minimum, maximum - 1, fuzz); |
89 | 94 | ||
90 | axis = multitouch ? ABS_MT_POSITION_Y : ABS_Y; | 95 | axis = multitouch ? ABS_MT_POSITION_Y : ABS_Y; |
91 | data_present = touchscreen_get_prop_u32(dev, "touchscreen-size-y", | 96 | data_present = touchscreen_get_prop_u32(dev, "touchscreen-min-y", |
97 | input_abs_get_min(input, axis), | ||
98 | &minimum) | | ||
99 | touchscreen_get_prop_u32(dev, "touchscreen-size-y", | ||
92 | input_abs_get_max(input, | 100 | input_abs_get_max(input, |
93 | axis) + 1, | 101 | axis) + 1, |
94 | &maximum) | | 102 | &maximum) | |
@@ -96,7 +104,7 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, | |||
96 | input_abs_get_fuzz(input, axis), | 104 | input_abs_get_fuzz(input, axis), |
97 | &fuzz); | 105 | &fuzz); |
98 | if (data_present) | 106 | if (data_present) |
99 | touchscreen_set_params(input, axis, maximum - 1, fuzz); | 107 | touchscreen_set_params(input, axis, minimum, maximum - 1, fuzz); |
100 | 108 | ||
101 | axis = multitouch ? ABS_MT_PRESSURE : ABS_PRESSURE; | 109 | axis = multitouch ? ABS_MT_PRESSURE : ABS_PRESSURE; |
102 | data_present = touchscreen_get_prop_u32(dev, | 110 | data_present = touchscreen_get_prop_u32(dev, |
@@ -108,7 +116,7 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, | |||
108 | input_abs_get_fuzz(input, axis), | 116 | input_abs_get_fuzz(input, axis), |
109 | &fuzz); | 117 | &fuzz); |
110 | if (data_present) | 118 | if (data_present) |
111 | touchscreen_set_params(input, axis, maximum, fuzz); | 119 | touchscreen_set_params(input, axis, 0, maximum, fuzz); |
112 | 120 | ||
113 | if (!prop) | 121 | if (!prop) |
114 | return; | 122 | return; |
@@ -117,13 +125,25 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, | |||
117 | 125 | ||
118 | prop->max_x = input_abs_get_max(input, axis); | 126 | prop->max_x = input_abs_get_max(input, axis); |
119 | prop->max_y = input_abs_get_max(input, axis + 1); | 127 | prop->max_y = input_abs_get_max(input, axis + 1); |
128 | |||
120 | prop->invert_x = | 129 | prop->invert_x = |
121 | device_property_read_bool(dev, "touchscreen-inverted-x"); | 130 | device_property_read_bool(dev, "touchscreen-inverted-x"); |
131 | if (prop->invert_x) { | ||
132 | absinfo = &input->absinfo[axis]; | ||
133 | absinfo->maximum -= absinfo->minimum; | ||
134 | absinfo->minimum = 0; | ||
135 | } | ||
136 | |||
122 | prop->invert_y = | 137 | prop->invert_y = |
123 | device_property_read_bool(dev, "touchscreen-inverted-y"); | 138 | device_property_read_bool(dev, "touchscreen-inverted-y"); |
139 | if (prop->invert_y) { | ||
140 | absinfo = &input->absinfo[axis + 1]; | ||
141 | absinfo->maximum -= absinfo->minimum; | ||
142 | absinfo->minimum = 0; | ||
143 | } | ||
144 | |||
124 | prop->swap_x_y = | 145 | prop->swap_x_y = |
125 | device_property_read_bool(dev, "touchscreen-swapped-x-y"); | 146 | device_property_read_bool(dev, "touchscreen-swapped-x-y"); |
126 | |||
127 | if (prop->swap_x_y) | 147 | if (prop->swap_x_y) |
128 | swap(input->absinfo[axis], input->absinfo[axis + 1]); | 148 | swap(input->absinfo[axis], input->absinfo[axis + 1]); |
129 | } | 149 | } |
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c index d196ac3d8b8c..09241d4cdebc 100644 --- a/drivers/input/touchscreen/silead.c +++ b/drivers/input/touchscreen/silead.c | |||
@@ -558,20 +558,33 @@ static int __maybe_unused silead_ts_suspend(struct device *dev) | |||
558 | static int __maybe_unused silead_ts_resume(struct device *dev) | 558 | static int __maybe_unused silead_ts_resume(struct device *dev) |
559 | { | 559 | { |
560 | struct i2c_client *client = to_i2c_client(dev); | 560 | struct i2c_client *client = to_i2c_client(dev); |
561 | bool second_try = false; | ||
561 | int error, status; | 562 | int error, status; |
562 | 563 | ||
563 | silead_ts_set_power(client, SILEAD_POWER_ON); | 564 | silead_ts_set_power(client, SILEAD_POWER_ON); |
564 | 565 | ||
566 | retry: | ||
565 | error = silead_ts_reset(client); | 567 | error = silead_ts_reset(client); |
566 | if (error) | 568 | if (error) |
567 | return error; | 569 | return error; |
568 | 570 | ||
571 | if (second_try) { | ||
572 | error = silead_ts_load_fw(client); | ||
573 | if (error) | ||
574 | return error; | ||
575 | } | ||
576 | |||
569 | error = silead_ts_startup(client); | 577 | error = silead_ts_startup(client); |
570 | if (error) | 578 | if (error) |
571 | return error; | 579 | return error; |
572 | 580 | ||
573 | status = silead_ts_get_status(client); | 581 | status = silead_ts_get_status(client); |
574 | if (status != SILEAD_STATUS_OK) { | 582 | if (status != SILEAD_STATUS_OK) { |
583 | if (!second_try) { | ||
584 | second_try = true; | ||
585 | dev_dbg(dev, "Reloading firmware after unsuccessful resume\n"); | ||
586 | goto retry; | ||
587 | } | ||
575 | dev_err(dev, "Resume error, status: 0x%02x\n", status); | 588 | dev_err(dev, "Resume error, status: 0x%02x\n", status); |
576 | return -ENODEV; | 589 | return -ENODEV; |
577 | } | 590 | } |
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index d5dfa4053bbf..b71673911aac 100644 --- a/drivers/input/touchscreen/st1232.c +++ b/drivers/input/touchscreen/st1232.c | |||
@@ -195,6 +195,7 @@ static int st1232_ts_probe(struct i2c_client *client, | |||
195 | input_dev->id.bustype = BUS_I2C; | 195 | input_dev->id.bustype = BUS_I2C; |
196 | input_dev->dev.parent = &client->dev; | 196 | input_dev->dev.parent = &client->dev; |
197 | 197 | ||
198 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | ||
198 | __set_bit(EV_SYN, input_dev->evbit); | 199 | __set_bit(EV_SYN, input_dev->evbit); |
199 | __set_bit(EV_KEY, input_dev->evbit); | 200 | __set_bit(EV_KEY, input_dev->evbit); |
200 | __set_bit(EV_ABS, input_dev->evbit); | 201 | __set_bit(EV_ABS, input_dev->evbit); |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index 2566b4d8b342..73856c2a8ac0 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -929,7 +929,8 @@ static int __init wm97xx_init(void) | |||
929 | 929 | ||
930 | static void __exit wm97xx_exit(void) | 930 | static void __exit wm97xx_exit(void) |
931 | { | 931 | { |
932 | driver_unregister(&wm97xx_driver); | 932 | if (IS_BUILTIN(CONFIG_AC97_BUS)) |
933 | driver_unregister(&wm97xx_driver); | ||
933 | platform_driver_unregister(&wm97xx_mfd_driver); | 934 | platform_driver_unregister(&wm97xx_mfd_driver); |
934 | } | 935 | } |
935 | 936 | ||