mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
input: touchscreen: gsl3673: fixes the correct way during s2r
The early used the fb for display, the new drm display can't callback the suspend to resume function in gsl3673 driver. Change-Id: I36c7d89edaf4052e614c5a354f7a0a12c9c4275a Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This commit is contained in:
@@ -1025,7 +1025,7 @@ error_unreg_device:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int gsl_ts_suspend(struct device *dev)
|
||||
static int __maybe_unused gsl_ts_suspend(struct device *dev)
|
||||
{
|
||||
struct gsl_ts *ts = dev_get_drvdata(dev);
|
||||
int i;
|
||||
@@ -1056,7 +1056,7 @@ static int gsl_ts_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gsl_ts_resume(struct device *dev)
|
||||
static int __maybe_unused gsl_ts_resume(struct device *dev)
|
||||
{
|
||||
struct gsl_ts *ts = dev_get_drvdata(dev);
|
||||
int i;
|
||||
@@ -1089,23 +1089,6 @@ static int gsl_ts_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gsl_ts_early_suspend(struct tp_device *tp_d)
|
||||
{
|
||||
struct gsl_ts *ts = container_of(tp_d, struct gsl_ts, tp);
|
||||
|
||||
gsl_ts_suspend(&ts->client->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gsl_ts_late_resume(struct tp_device *tp_d)
|
||||
{
|
||||
struct gsl_ts *ts = container_of(tp_d, struct gsl_ts, tp);
|
||||
int rc;
|
||||
|
||||
rc = gsl_ts_resume(&ts->client->dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void gsl_download_fw_work(struct work_struct *work)
|
||||
{
|
||||
struct gsl_ts *ts = container_of(work, struct gsl_ts, download_fw_work);
|
||||
@@ -1134,8 +1117,6 @@ static int gsl_ts_probe(struct i2c_client *client,
|
||||
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
|
||||
if (!ts)
|
||||
return -ENOMEM;
|
||||
ts->tp.tp_resume = gsl_ts_late_resume;
|
||||
ts->tp.tp_suspend = gsl_ts_early_suspend;
|
||||
tp_register_fb(&ts->tp);
|
||||
ts->client = client;
|
||||
i2c_set_clientdata(client, ts);
|
||||
@@ -1197,6 +1178,8 @@ static int gsl_ts_remove(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(gsl_ts_pm, gsl_ts_suspend, gsl_ts_resume);
|
||||
|
||||
static const struct of_device_id gsl_ts_ids[] = {
|
||||
{.compatible = "GSL,GSL3673"},
|
||||
{ }
|
||||
@@ -1214,6 +1197,7 @@ static struct i2c_driver gsl_ts_driver = {
|
||||
.name = GSL3673_I2C_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_match_ptr(gsl_ts_ids),
|
||||
.pm = &gsl_ts_pm,
|
||||
},
|
||||
.probe = gsl_ts_probe,
|
||||
.remove = gsl_ts_remove,
|
||||
|
||||
Reference in New Issue
Block a user