Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/input/keyboard/cypress_touchkey/cypress-touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@ static int __devinit cypress_touchkey_probe(struct i2c_client *client,

ret = request_threaded_irq(client->irq, NULL,
cypress_touchkey_interrupt,
IRQF_TRIGGER_FALLING, client->dev.driver->name, info);
IRQF_ONESHOT | IRQF_TRIGGER_FALLING, client->dev.driver->name, info);
if (ret < 0) {
dev_info(&client->dev, "Failed to request IRQ %d (err: %d).\n",
client->irq, ret);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,7 @@ static int __devinit cypress_touchkey_probe(struct i2c_client *client,

ret = request_threaded_irq(client->irq, NULL,
cypress_touchkey_interrupt,
IRQF_TRIGGER_FALLING, client->dev.driver->name, info);
IRQF_ONESHOT | IRQF_TRIGGER_FALLING, client->dev.driver->name, info);
if (ret < 0) {
dev_info(&client->dev, "Failed to request IRQ %d (err: %d).\n",
client->irq, ret);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,7 @@ static int __devinit cypress_touchkey_probe(struct i2c_client *client,

ret = request_threaded_irq(client->irq, NULL,
cypress_touchkey_interrupt,
IRQF_TRIGGER_FALLING, client->dev.driver->name, info);
IRQF_ONESHOT | IRQF_TRIGGER_FALLING, client->dev.driver->name, info);
if (ret < 0) {
dev_info(&client->dev, "Failed to request IRQ %d (err: %d).\n",
client->irq, ret);
Expand Down
51 changes: 50 additions & 1 deletion drivers/input/touchscreen/synaptics_s5000/synaptics_i2c_rmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <linux/i2c/synaptics_rmi.h>
#include <linux/of_gpio.h>
#include <linux/regulator/consumer.h>
#ifdef CONFIG_FB
#include <linux/fb.h>
#endif

#define DRIVER_NAME "synaptics_rmi4_i2c"

Expand Down Expand Up @@ -2061,7 +2064,7 @@ static int synaptics_rmi4_irq_enable(struct synaptics_rmi4_data *rmi4_data,
return retval;

retval = request_threaded_irq(rmi4_data->irq, NULL,
synaptics_rmi4_irq, IRQF_TRIGGER_FALLING,
synaptics_rmi4_irq, IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
DRIVER_NAME, rmi4_data);
if (retval < 0) {
dev_err(&rmi4_data->i2c_client->dev,
Expand Down Expand Up @@ -3987,6 +3990,11 @@ static void alloc_tsp_reboot_mode(void)
}
#endif

#ifdef CONFIG_FB
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data);
#endif

/**
* synaptics_rmi4_probe()
*
Expand Down Expand Up @@ -4261,6 +4269,13 @@ static int __devinit synaptics_rmi4_probe(struct i2c_client *client,
#ifdef TSP_TURNOFF_AFTER_PROBE
synaptics_rmi4_stop_device(rmi4_data);
#endif

#ifdef CONFIG_FB
rmi4_data->fb_notif.notifier_call = fb_notifier_callback;
if (fb_register_client(&rmi4_data->fb_notif))
pr_err("%s: could not create fb notifier\n", __func__);
#endif

return retval;

err_sysfs:
Expand Down Expand Up @@ -4328,6 +4343,10 @@ static int __devexit synaptics_rmi4_remove(struct i2c_client *client)

input_free_device(rmi4_data->input_dev);

#ifdef CONFIG_FB
fb_unregister_client(&rmi4_data->fb_notif);
#endif

kfree(rmi4_data);

return 0;
Expand Down Expand Up @@ -4700,6 +4719,36 @@ static int synaptics_rmi4_resume(struct device *dev)
}
#endif

#ifdef CONFIG_FB
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct fb_event *evdata = data;
struct synaptics_rmi4_data *rmi4_data =
container_of(self, struct synaptics_rmi4_data, fb_notif);

if (evdata && evdata->data && event == FB_EVENT_BLANK) {
int *blank = evdata->data;
switch (*blank) {
case FB_BLANK_UNBLANK:
case FB_BLANK_NORMAL:
case FB_BLANK_VSYNC_SUSPEND:
case FB_BLANK_HSYNC_SUSPEND:
synaptics_rmi4_resume(&rmi4_data->i2c_client->dev);
break;
case FB_BLANK_POWERDOWN:
synaptics_rmi4_suspend(&rmi4_data->i2c_client->dev);
break;
default:
/* Don't handle what we don't understand */
break;
}
}

return 0;
}
#endif

static const struct dev_pm_ops synaptics_rmi4_dev_pm_ops = {
.suspend = synaptics_rmi4_suspend,
.resume = synaptics_rmi4_resume,
Expand Down
10 changes: 10 additions & 0 deletions drivers/input/touchscreen/synaptics_s5000/synaptics_i2c_rmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
* Synpatics IC report those data through F51's edge swipe
* fucntionality.
*/

#ifdef CONFIG_FB
#include <linux/notifier.h>
#endif

#define SURFACE_TOUCH

#define USE_OPEN_CLOSE
Expand Down Expand Up @@ -404,6 +409,11 @@ struct synaptics_rmi4_data {
void (*register_cb)(struct synaptics_rmi_callbacks *);
struct synaptics_rmi_callbacks callbacks;
#endif

#ifdef CONFIG_FB
struct notifier_block fb_notif;
#endif

int (*i2c_read)(struct synaptics_rmi4_data *pdata, unsigned short addr,
unsigned char *data, unsigned short length);
int (*i2c_write)(struct synaptics_rmi4_data *pdata, unsigned short addr,
Expand Down