Re: [PATCH] Input: Add a driver to support for Wacom I2C Stylus Device

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

 



On 12/20/2011 01:46 PM, Tatsunosuke Tobita wrote:

> From: Tatsunosuke Tobita <tobita.tatsunosuke@xxxxxxxxxxx>
> 
> This driver supports for Wacom Stylus Device with I2C interface.
> 
> Signed-off-by: Tatsunosuke Tobita <tobita.tatsunosuke@xxxxxxxxxxx>
> ---
>  drivers/input/touchscreen/wacom_i2c.c |  250 +++++++++++++++++++++++++++++++++
>  drivers/input/touchscreen/wacom_i2c.h |   55 +++++++
>  2 files changed, 305 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/input/touchscreen/wacom_i2c.c
>  create mode 100644 drivers/input/touchscreen/wacom_i2c.h
> 
> diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c
> new file mode 100644
> index 0000000..157bcc5
> --- /dev/null
> +++ b/drivers/input/touchscreen/wacom_i2c.c

> +
> +static struct i2c_driver wacom_i2c_driver = {
> +	.driver = {
> +		.name = "wacom_i2c",
> +		.owner = THIS_MODULE,
> +		.pm = &wacom_i2c_pm,
> +	},
> +
> +	.probe = wacom_i2c_probe,
> +	.remove = __devexit_p(wacom_i2c_remove),
> +	.id_table = wacom_i2c_id,
> +};
> +
> +static int __init wacom_i2c_init(void)
> +{
> +	return i2c_add_driver(&wacom_i2c_driver);
> +}
> +
> +static void __exit wacom_i2c_exit(void)
> +{
> +	i2c_del_driver(&wacom_i2c_driver);
> +}
> +
> +module_init(wacom_i2c_init);
> +module_exit(wacom_i2c_exit);


You can use module_i2c_driver(wacom_i2c_driver) instead of module_init{exit},
it has been queued to driver-core-next already.


Thanks
-Wanlong Gao

--
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