# \[PATCH\] Input: ft5x06 - of\_device\_id using CONFIG\_OF

- Subsystems: INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS, THE REST
- Maintainers: Dmitry Torokhov, Linus Torvalds
- List: linux-input
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-input/2021/01/8932455/t

## \[PATCH\] Input: ft5x06 - of\_device\_id using CONFIG\_OF

- From: jzp0409 \<hidden\>
- Date: 2021-01-20 01:42:42 
- Message: https://ratatoskr.run/linux-input/2021/01/8932455.md

```text
From: jiangzhipeng <redacted>

ft5x06 use of_device_id,Use CONFIG_OF include

Signed-off-by: jiangzhipeng <redacted>
---
 drivers/input/touchscreen/edt-ft5x06.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 2eefbc2..c69fde0 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1371,6 +1371,7 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops,
 };
 MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id);
 
+#ifdef CONFIG_OF
 static const struct of_device_id edt_ft5x06_of_match[] = {
 	{ .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
 	{ .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
@@ -1382,6 +1383,7 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops,
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match);
+#endif
 
 static struct i2c_driver edt_ft5x06_ts_driver = {
 	.driver = {
-- 
1.9.1


```

## Re: \[PATCH\] Input: ft5x06 - of\_device\_id using CONFIG\_OF

- From: Dmitry Torokhov \<dmitry.torokhov@gmail.com\>
- Date: 2021-01-20 01:16:24 
- Message: https://ratatoskr.run/linux-input/2021/01/8932454.md

```text
On Wed, Jan 20, 2021 at 08:53:01AM +0800, jzp0409 wrote:
> From: jiangzhipeng <redacted>
> 
> ft5x06 use of_device_id,Use CONFIG_OF include

This will not compile with !C0NFIG_OF.

> 
> Signed-off-by: jiangzhipeng <redacted>
> ---
>  drivers/input/touchscreen/edt-ft5x06.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index 2eefbc2..c69fde0 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -1371,6 +1371,7 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops,
>  };
>  MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id);
>  
> +#ifdef CONFIG_OF
>  static const struct of_device_id edt_ft5x06_of_match[] = {
>  	{ .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
>  	{ .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
> @@ -1382,6 +1383,7 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops,
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match);
> +#endif
>  
>  static struct i2c_driver edt_ft5x06_ts_driver = {
>  	.driver = {
> -- 
> 1.9.1
> 
> 

Thanks.

-- 
Dmitry
```
