Skip to content

Commit afbd65f

Browse files
committed
Merge branch 'next' into for-linus
Prepare second round of updates for 5.5 merge window.
2 parents 976e364 + a284e11 commit afbd65f

File tree

7 files changed

+51
-17
lines changed

7 files changed

+51
-17
lines changed

drivers/input/keyboard/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ config KEYBOARD_SNVS_PWRKEY
450450
depends on OF
451451
help
452452
This is the snvs powerkey driver for the Freescale i.MX application
453-
processors that are newer than i.MX6 SX.
453+
processors.
454454

455455
To compile this driver as a module, choose M here; the
456456
module will be called snvs_pwrkey.

drivers/input/keyboard/snvs_pwrkey.c

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@
1919
#include <linux/mfd/syscon.h>
2020
#include <linux/regmap.h>
2121

22-
#define SNVS_LPSR_REG 0x4C /* LP Status Register */
23-
#define SNVS_LPCR_REG 0x38 /* LP Control Register */
24-
#define SNVS_HPSR_REG 0x14
25-
#define SNVS_HPSR_BTN BIT(6)
26-
#define SNVS_LPSR_SPO BIT(18)
27-
#define SNVS_LPCR_DEP_EN BIT(5)
22+
#define SNVS_HPVIDR1_REG 0xF8
23+
#define SNVS_LPSR_REG 0x4C /* LP Status Register */
24+
#define SNVS_LPCR_REG 0x38 /* LP Control Register */
25+
#define SNVS_HPSR_REG 0x14
26+
#define SNVS_HPSR_BTN BIT(6)
27+
#define SNVS_LPSR_SPO BIT(18)
28+
#define SNVS_LPCR_DEP_EN BIT(5)
2829

29-
#define DEBOUNCE_TIME 30
30-
#define REPEAT_INTERVAL 60
30+
#define DEBOUNCE_TIME 30
31+
#define REPEAT_INTERVAL 60
3132

3233
struct pwrkey_drv_data {
3334
struct regmap *snvs;
@@ -37,6 +38,7 @@ struct pwrkey_drv_data {
3738
int wakeup;
3839
struct timer_list check_timer;
3940
struct input_dev *input;
41+
u8 minor_rev;
4042
};
4143

4244
static void imx_imx_snvs_check_for_events(struct timer_list *t)
@@ -67,13 +69,29 @@ static irqreturn_t imx_snvs_pwrkey_interrupt(int irq, void *dev_id)
6769
{
6870
struct platform_device *pdev = dev_id;
6971
struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev);
72+
struct input_dev *input = pdata->input;
7073
u32 lp_status;
7174

72-
pm_wakeup_event(pdata->input->dev.parent, 0);
75+
pm_wakeup_event(input->dev.parent, 0);
7376

7477
regmap_read(pdata->snvs, SNVS_LPSR_REG, &lp_status);
75-
if (lp_status & SNVS_LPSR_SPO)
76-
mod_timer(&pdata->check_timer, jiffies + msecs_to_jiffies(DEBOUNCE_TIME));
78+
if (lp_status & SNVS_LPSR_SPO) {
79+
if (pdata->minor_rev == 0) {
80+
/*
81+
* The first generation i.MX6 SoCs only sends an
82+
* interrupt on button release. To mimic power-key
83+
* usage, we'll prepend a press event.
84+
*/
85+
input_report_key(input, pdata->keycode, 1);
86+
input_sync(input);
87+
input_report_key(input, pdata->keycode, 0);
88+
input_sync(input);
89+
pm_relax(input->dev.parent);
90+
} else {
91+
mod_timer(&pdata->check_timer,
92+
jiffies + msecs_to_jiffies(DEBOUNCE_TIME));
93+
}
94+
}
7795

7896
/* clear SPO status */
7997
regmap_write(pdata->snvs, SNVS_LPSR_REG, SNVS_LPSR_SPO);
@@ -90,10 +108,11 @@ static void imx_snvs_pwrkey_act(void *pdata)
90108

91109
static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
92110
{
93-
struct pwrkey_drv_data *pdata = NULL;
94-
struct input_dev *input = NULL;
111+
struct pwrkey_drv_data *pdata;
112+
struct input_dev *input;
95113
struct device_node *np;
96114
int error;
115+
u32 vid;
97116

98117
/* Get SNVS register Page */
99118
np = pdev->dev.of_node;
@@ -121,6 +140,9 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
121140
if (pdata->irq < 0)
122141
return -EINVAL;
123142

143+
regmap_read(pdata->snvs, SNVS_HPVIDR1_REG, &vid);
144+
pdata->minor_rev = vid & 0xff;
145+
124146
regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_DEP_EN, SNVS_LPCR_DEP_EN);
125147

126148
/* clear the unexpected interrupt before driver ready */

drivers/input/misc/uinput.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ static __poll_t uinput_poll(struct file *file, poll_table *wait)
695695
if (udev->head != udev->tail)
696696
return EPOLLIN | EPOLLRDNORM;
697697

698-
return 0;
698+
return EPOLLOUT | EPOLLWRNORM;
699699
}
700700

701701
static int uinput_release(struct inode *inode, struct file *file)

drivers/input/rmi4/rmi_f34v7.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,9 @@ int rmi_f34v7_do_reflash(struct f34_data *f34, const struct firmware *fw)
11891189
{
11901190
int ret;
11911191

1192+
f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
1193+
f34->fn->irq_mask);
1194+
11921195
rmi_f34v7_read_queries_bl_version(f34);
11931196

11941197
f34->v7.image = fw->data;

drivers/input/rmi4/rmi_smbus.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,
163163
/* prepare to write next block of bytes */
164164
cur_len -= SMB_MAX_COUNT;
165165
databuff += SMB_MAX_COUNT;
166-
rmiaddr += SMB_MAX_COUNT;
167166
}
168167
exit:
169168
mutex_unlock(&rmi_smb->page_mutex);
@@ -215,7 +214,6 @@ static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,
215214
/* prepare to read next block of bytes */
216215
cur_len -= SMB_MAX_COUNT;
217216
databuff += SMB_MAX_COUNT;
218-
rmiaddr += SMB_MAX_COUNT;
219217
}
220218

221219
retval = 0;

drivers/input/touchscreen/goodix.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ static const unsigned long goodix_irq_flags[] = {
128128
*/
129129
static const struct dmi_system_id rotated_screen[] = {
130130
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
131+
{
132+
.ident = "Teclast X89",
133+
.matches = {
134+
/* tPAD is too generic, also match on bios date */
135+
DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
136+
DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
137+
DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
138+
},
139+
},
131140
{
132141
.ident = "WinBook TW100",
133142
.matches = {

include/uapi/linux/input-event-codes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,8 @@
649649
*/
650650
#define KEY_DATA 0x277
651651
#define KEY_ONSCREEN_KEYBOARD 0x278
652+
/* Electronic privacy screen control */
653+
#define KEY_PRIVACY_SCREEN_TOGGLE 0x279
652654

653655
#define BTN_TRIGGER_HAPPY 0x2c0
654656
#define BTN_TRIGGER_HAPPY1 0x2c0

0 commit comments

Comments
 (0)