Re: [PATCH 1/3] input: goodix: Add device tree support

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

 



Do you mean that I should use #ifdef CONFIG_ACPI and ACPI_PTR?

#ifdef CONFIG_ACPI
static const struct acpi_device_id goodix_acpi_match[] = {
	{ "GDIX1001", 0 },
	{ }
};
MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
#endif

#ifdef CONFIG_OF
static struct of_device_id goodix_of_match[] = {
	{ .compatible = "goodix,gt9xx" },
	{ }
};
MODULE_DEVICE_TABLE(of, goodix_of_match);
#endif

static struct i2c_driver goodix_ts_driver = {
	...
		.acpi_match_table = ACPI_PTR(goodix_acpi_match),
		.of_match_table = of_match_ptr(goodix_of_match),
}

2015-01-18 17:22 GMT+03:00, Antonio Ospite <ao2@xxxxxx>:
> On Sun, 18 Jan 2015 16:25:35 +0400
> Алексей Мамлин <mamlinav@xxxxxxxxx> wrote:
>
>> Look at include/linux/of.h
>>
>> #ifdef CONFIG_OF
>>  ...
>> #define of_match_ptr(_ptr)	(_ptr)
>>  ...
>> #else /* CONFIG_OF */
>>  ...
>> #define of_match_ptr(_ptr)	NULL
>>  ...
>> #endif /* CONFIG_OF */
>>
>> So it would be compiled. Similarly in other touchscreen drivers.
>> But Kconfig should be fixed to enable CONFIG_OF. Will be fixed in v2.
>>
>
> I was thinking, instead of depending on (ACPI || OF), can we make ACPI
> optional as well and remove the dependency on it?
> Does it make sense to allow selecting a driver even with no
> enabled mechanism to pass platform data to it?
>
> Thanks,
>    Antonio
>
> --
> Antonio Ospite
> http://ao2.it
>
> A: Because it messes up the order in which people normally read text.
>    See http://en.wikipedia.org/wiki/Posting_style
> Q: Why is top-posting such a bad thing?
>


-- 
Thanks and regards,
Aleksei Mamlin
--
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