From: Aleksei Mamlin <mamlinav@gmail.com>
To: Antonio Ospite <ao2@ao2.it>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3] input: goodix: Add device tree support
Date: Sun, 18 Jan 2015 19:12:43 +0400 [thread overview]
Message-ID: <CAF==cZWvqCdgVTJ76d4NoWhc09EnU=kxArgMQtz8=x5TesGpVQ@mail.gmail.com> (raw)
In-Reply-To: <20150118152247.34aa149f16c60bf30cebbb42@ao2.it>
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@ao2.it>:
> On Sun, 18 Jan 2015 16:25:35 +0400
> Алексей Мамлин <mamlinav@gmail.com> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-01-18 15:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-17 14:34 [PATCH 0/3] Add device tree support for Goodix GT9xx series touchscreen controller Aleksei Mamlin
[not found] ` <1421505253-7474-1-git-send-email-mamlinav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-17 14:36 ` [PATCH 1/3] input: goodix: Add device tree support Aleksei Mamlin
[not found] ` <1421505361-8871-1-git-send-email-mamlinav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-17 20:38 ` Bastien Nocera
[not found] ` <1421527085.2075.12.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
2015-01-18 12:25 ` Алексей Мамлин
2015-01-18 14:22 ` Antonio Ospite
2015-01-18 15:12 ` Aleksei Mamlin [this message]
2015-01-17 14:36 ` [PATCH 2/3] dt-bindings: Add vendor-prefix for Goodix Aleksei Mamlin
2015-01-17 14:36 ` [PATCH 3/3] input: goodix: Add bindings documentation Aleksei Mamlin
2015-01-19 12:13 ` Arnd Bergmann
2015-01-17 20:37 ` [PATCH 0/3] Add device tree support for Goodix GT9xx series touchscreen controller Bastien Nocera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAF==cZWvqCdgVTJ76d4NoWhc09EnU=kxArgMQtz8=x5TesGpVQ@mail.gmail.com' \
--to=mamlinav@gmail.com \
--cc=ao2@ao2.it \
--cc=devicetree@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).