[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=X5tk0tCcDa+vLnu0aoas1TDWuqvkMzM-278dOCX8K1gw@mail.gmail.com>
Date: Fri, 19 Apr 2024 13:41:34 -0700
From: Doug Anderson <dianders@...gle.com>
To: lvzhaoxiong <lvzhaoxiong@...qin.corp-partner.google.com>
Cc: dmitry.torokhov@...il.com, robh@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org, jikos@...nel.org,
benjamin.tissoires@...hat.co, hsinyi@...gle.com,
dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] HID: i2c-hid: elan: Add ili2900 timing
Hi,
On Thu, Apr 18, 2024 at 5:48 AM lvzhaoxiong
<lvzhaoxiong@...qin.corp-partner.google.com> wrote:
>
> ILI2900 requires reset to pull down time greater than 10ms,
> so the configuration post_power_delay_ms is 10, and the chipset
> initial time is required to be greater than 100ms,
> so the post_gpio_reset_on_delay_ms is set to 100.
>
> Signed-off-by: lvzhaoxiong <lvzhaoxiong@...qin.corp-partner.google.com>
Please use a proper name instead of "lvzhaoxiong".
> ---
> drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> index 5b91fb106cfc..3073620b2dec 100644
> --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
> @@ -137,10 +137,18 @@ static const struct elan_i2c_hid_chip_data ilitek_ili2901_chip_data = {
> .main_supply_name = "vcc33",
> };
>
> +static const struct elan_i2c_hid_chip_data ilitek_ili2900_chip_data = {
> + .post_power_delay_ms = 10,
> + .post_gpio_reset_on_delay_ms = 100,
> + .hid_descriptor_address = 0x0001,
> + .main_supply_name = NULL,
There's really no main power supply for this device? It feels likely
that there is one.
Also: other than the main power supply, there is no difference between
this and the ili2901. If you actually do have a main power supply,
then you probably don't need a new table. You probably don't even need
your own compatible string and in the device tree you could just
specify:
compatible = "ilitek,ili2900, "ilitek,ili2901";
..which says "I actually have an ILI 2900, but if you don't have any
special driver for the ILI 2900 it's likely that the driver for the
ILI 2901 will work because the hardware is almost the same."
> +};
> +
> static const struct of_device_id elan_i2c_hid_of_match[] = {
> { .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
> { .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
> { .compatible = "ilitek,ili2901", .data = &ilitek_ili2901_chip_data },
> + { .compatible = "ilitek,ili2900", .data = &ilitek_ili2900_chip_data },
If you do need this, these should be sorted. 2900 should come before 2901.
-Doug
Powered by blists - more mailing lists