Re: [patch 1/1] TOUCHSCREEN: S3C24XX touchscreen driver from Arnaud Patard.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ben,

On Wed, 2009-11-18 at 18:59 -0800, Dmitry Torokhov wrote:

> > +#ifdef CONFIG_PM
> > +static int s3c2410ts_suspend(struct platform_device *pdev, pm_message_t state)
> > +{
> > +	writel(TSC_SLEEP, ts.io + S3C2410_ADCTSC);
> > +	disable_irq(ts.irq_tc);
> > +	clk_disable(ts.clock);
> > +
> > +	return 0;
> > +}
> > +
> > +static int s3c2410ts_resume(struct platform_device *pdev)
> > +{
> > +	struct s3c2410_ts_mach_info *info = pdev->dev.platform_data;
> > +
> > +	clk_enable(ts.clock);
> > +
> > +	/* Initialise registers */
> > +	if ((info->delay & 0xffff) > 0)
> > +		writel(info->delay & 0xffff, ts.io + S3C2410_ADCDLY);
> > +
> > +	writel(WAIT4INT | INT_DOWN, ts.io + S3C2410_ADCTSC);
> > +
> > +	return 0;
> > +}
> > +
> > +#else
> > +#define s3c2410ts_suspend NULL
> > +#define s3c2410ts_resume  NULL
> > +#endif
> > +
> > +static struct platform_device_id s3cts_driver_ids[] = {
> > +	{ "s3c2410-ts", 0 },
> > +	{ "s3c2440-ts", 1 },
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(platform, s3cts_driver_ids);
> > +
> > +static struct platform_driver s3c_ts_driver = {
> > +	.driver         = {
> > +		.name   = "s3c24xx-ts",
> > +		.owner  = THIS_MODULE,
> > +	},
> > +	.id_table	= s3cts_driver_ids,
> > +	.probe		= s3c2410ts_probe,
> > +	.remove		= s3c2410ts_remove,
> 
> __devexit_p()
> 
> > +	.suspend	= s3c2410ts_suspend,
> > +	.resume		= s3c2410ts_resume,
> 
> Switch to pm_ops.

For these comments from Dmitry I have implemented in my patch last month
send to linux-input. You can refer
http://patchwork.kernel.org/patch/54933/ which maybe save some time for
you.


Regards,

Shine Liu


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux