* [PATCH 0/2] Add ili9882t timing @ 2023-06-02 14:09 Cong Yang 2023-06-02 14:09 ` [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip Cong Yang 2023-06-02 14:09 ` [PATCH 2/2] HID: i2c-hid: elan: Add ili9882t timing Cong Yang 0 siblings, 2 replies; 6+ messages in thread From: Cong Yang @ 2023-06-02 14:09 UTC (permalink / raw) To: robh+dt, krzysztof.kozlowski+dt, conor+dt, dmitry.torokhov, jikos, benjamin.tissoires, dianders, hsinyi Cc: linux-input, devicetree, linux-kernel, Cong Yang Add ili9882t dt-bindings and timing Cong Yang (2): dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip HID: i2c-hid: elan: Add ili9882t timing .../bindings/input/elan,ekth6915.yaml | 36 ++++++++++++++----- drivers/hid/i2c-hid/i2c-hid-of-elan.c | 20 ++++++++--- 2 files changed, 43 insertions(+), 13 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip 2023-06-02 14:09 [PATCH 0/2] Add ili9882t timing Cong Yang @ 2023-06-02 14:09 ` Cong Yang 2023-06-02 14:19 ` Krzysztof Kozlowski 2023-06-02 15:14 ` Rob Herring 2023-06-02 14:09 ` [PATCH 2/2] HID: i2c-hid: elan: Add ili9882t timing Cong Yang 1 sibling, 2 replies; 6+ messages in thread From: Cong Yang @ 2023-06-02 14:09 UTC (permalink / raw) To: robh+dt, krzysztof.kozlowski+dt, conor+dt, dmitry.torokhov, jikos, benjamin.tissoires, dianders, hsinyi Cc: linux-input, devicetree, linux-kernel, Cong Yang Add an ilitek touch screen chip ili9882t. Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> --- .../bindings/input/elan,ekth6915.yaml | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml index 05e6f2df604c..73e94cb6c4e0 100644 --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml @@ -15,11 +15,15 @@ description: properties: compatible: - items: - - const: elan,ekth6915 + oneOf: + - enum: + - elan,ekth6915 + - ilitek,ili9882t reg: - const: 0x10 + enum: + - 0x10 + - 0x41 interrupts: maxItems: 1 @@ -29,17 +33,31 @@ properties: vcc33-supply: description: The 3.3V supply to the touchscreen. + If using ili9882t then this supply will not be needed. vccio-supply: description: The IO supply to the touchscreen. Need not be specified if this is the same as the 3.3V supply. - -required: - - compatible - - reg - - interrupts - - vcc33-supply + If using ili9882t, the IO supply is required. + + required: + - compatible + - reg + - interrupts + - vcc33-supply + +if: + properties: + compatible: + contains: + const: ilitek,ili9882t +then: + required: + - compatible + - reg + - interrupts + - vccio-supply additionalProperties: false -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip 2023-06-02 14:09 ` [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip Cong Yang @ 2023-06-02 14:19 ` Krzysztof Kozlowski 2023-06-05 6:03 ` cong yang 2023-06-02 15:14 ` Rob Herring 1 sibling, 1 reply; 6+ messages in thread From: Krzysztof Kozlowski @ 2023-06-02 14:19 UTC (permalink / raw) To: Cong Yang, robh+dt, krzysztof.kozlowski+dt, conor+dt, dmitry.torokhov, jikos, benjamin.tissoires, dianders, hsinyi Cc: linux-input, devicetree, linux-kernel On 02/06/2023 16:09, Cong Yang wrote: > Add an ilitek touch screen chip ili9882t. > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> It does not look like you tested the bindings, at least after quick look. Please run `make dt_binding_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Maybe you need to update your dtschema and yamllint. There is no way this would work and if you test you will see error msg. Feel free to ping if message is unclear. > --- > .../bindings/input/elan,ekth6915.yaml | 36 ++++++++++++++----- > 1 file changed, 27 insertions(+), 9 deletions(-) > > diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml > index 05e6f2df604c..73e94cb6c4e0 100644 > --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml > +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml > @@ -15,11 +15,15 @@ description: > > properties: > compatible: > - items: > - - const: elan,ekth6915 > + oneOf: It's not oneOf. Just enum > + - enum: > + - elan,ekth6915 > + - ilitek,ili9882t > > reg: > - const: 0x10 > + enum: > + - 0x10 > + - 0x41 > > interrupts: > maxItems: 1 > @@ -29,17 +33,31 @@ properties: > > vcc33-supply: > description: The 3.3V supply to the touchscreen. > + If using ili9882t then this supply will not be needed. Are you sure these are compatible devices then? What does it mean "not needed"? Is the pin there or is not? > > vccio-supply: > description: > The IO supply to the touchscreen. Need not be specified if this is the > same as the 3.3V supply. > - > -required: > - - compatible > - - reg > - - interrupts > - - vcc33-supply > + If using ili9882t, the IO supply is required. > + > + required: NAK. Really. Test patches before sending. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip 2023-06-02 14:19 ` Krzysztof Kozlowski @ 2023-06-05 6:03 ` cong yang 0 siblings, 0 replies; 6+ messages in thread From: cong yang @ 2023-06-05 6:03 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, dmitry.torokhov, jikos, benjamin.tissoires, dianders, hsinyi, linux-input, devicetree, linux-kernel Hi,Krzysztof, Thanks for Krzysztof.Sorry, I didn't run `make dt_binding_check. I will check before sending V2 patch. On Fri, Jun 2, 2023 at 10:19 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 02/06/2023 16:09, Cong Yang wrote: > > Add an ilitek touch screen chip ili9882t. > > > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> > > It does not look like you tested the bindings, at least after quick > look. Please run `make dt_binding_check` (see > Documentation/devicetree/bindings/writing-schema.rst for instructions). > Maybe you need to update your dtschema and yamllint. > > There is no way this would work and if you test you will see error msg. > Feel free to ping if message is unclear. > > > --- > > .../bindings/input/elan,ekth6915.yaml | 36 ++++++++++++++----- > > 1 file changed, 27 insertions(+), 9 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml > > index 05e6f2df604c..73e94cb6c4e0 100644 > > --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml > > +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml > > @@ -15,11 +15,15 @@ description: > > > > properties: > > compatible: > > - items: > > - - const: elan,ekth6915 > > + oneOf: > > It's not oneOf. Just enum Done,thanks. > > > + - enum: > > + - elan,ekth6915 > > + - ilitek,ili9882t > > > > reg: > > - const: 0x10 > > + enum: > > + - 0x10 > > + - 0x41 > > > > interrupts: > > maxItems: 1 > > @@ -29,17 +33,31 @@ properties: > > > > vcc33-supply: > > description: The 3.3V supply to the touchscreen. > > + If using ili9882t then this supply will not be needed. > > Are you sure these are compatible devices then? What does it mean "not > needed"? Is the pin there or is not? Yes,ili9882t this touch ic not needed 3.3V supply,this pin does not exist. > > > > > vccio-supply: > > description: > > The IO supply to the touchscreen. Need not be specified if this is the > > same as the 3.3V supply. > > - > > -required: > > - - compatible > > - - reg > > - - interrupts > > - - vcc33-supply > > + If using ili9882t, the IO supply is required. > > + > > + required: > > NAK. Really. Test patches before sending. > > Best regards, > Krzysztof > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip 2023-06-02 14:09 ` [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip Cong Yang 2023-06-02 14:19 ` Krzysztof Kozlowski @ 2023-06-02 15:14 ` Rob Herring 1 sibling, 0 replies; 6+ messages in thread From: Rob Herring @ 2023-06-02 15:14 UTC (permalink / raw) To: Cong Yang Cc: dmitry.torokhov, jikos, conor+dt, linux-input, benjamin.tissoires, linux-kernel, devicetree, hsinyi, krzysztof.kozlowski+dt, robh+dt, dianders On Fri, 02 Jun 2023 22:09:47 +0800, Cong Yang wrote: > Add an ilitek touch screen chip ili9882t. > > Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> > --- > .../bindings/input/elan,ekth6915.yaml | 36 ++++++++++++++----- > 1 file changed, 27 insertions(+), 9 deletions(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: ./Documentation/devicetree/bindings/input/elan,ekth6915.yaml:20:9: [warning] wrong indentation: expected 10 but found 8 (indentation) dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/elan,ekth6915.yaml: properties:required: ['compatible', 'reg', 'interrupts', 'vcc33-supply'] is not of type 'object', 'boolean' from schema $id: http://json-schema.org/draft-07/schema# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/elan,ekth6915.yaml: properties: 'required' should not be valid under {'$ref': '#/definitions/json-schema-prop-names'} hint: A json-schema keyword was found instead of a DT property name. from schema $id: http://devicetree.org/meta-schemas/keywords.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/elan,ekth6915.yaml: ignoring, error in schema: properties: required Documentation/devicetree/bindings/input/elan,ekth6915.example.dtb: /example-0/i2c/touchscreen@10: failed to match any schema with compatible: ['elan,ekth6915'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230602140948.2138668-2-yangcong5@huaqin.corp-partner.google.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] HID: i2c-hid: elan: Add ili9882t timing 2023-06-02 14:09 [PATCH 0/2] Add ili9882t timing Cong Yang 2023-06-02 14:09 ` [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip Cong Yang @ 2023-06-02 14:09 ` Cong Yang 1 sibling, 0 replies; 6+ messages in thread From: Cong Yang @ 2023-06-02 14:09 UTC (permalink / raw) To: robh+dt, krzysztof.kozlowski+dt, conor+dt, dmitry.torokhov, jikos, benjamin.tissoires, dianders, hsinyi Cc: linux-input, devicetree, linux-kernel, Cong Yang The ili9882t is a TDDI IC (Touch with Display Driver). The datasheet specifies there should be 60ms between touch SDA sleep and panel RESX. Doug's series[1] allows panels and touchscreens to power on/off together, so we can add the 65 ms delay in i2c_hid_core_suspend before panel_unprepare. [1]: https: //lore.kernel.org/all/20230523193017.4109557-1-dianders@chromium.org/ Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com> --- drivers/hid/i2c-hid/i2c-hid-of-elan.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c index 76ddc8be1cbb..411d7ea2725d 100644 --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c @@ -18,7 +18,8 @@ #include "i2c-hid.h" struct elan_i2c_hid_chip_data { - unsigned int post_gpio_reset_delay_ms; + unsigned int post_gpio_reset_on_delay_ms; + unsigned int post_gpio_reset_off_delay_ms; unsigned int post_power_delay_ms; u16 hid_descriptor_address; }; @@ -52,8 +53,8 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops) msleep(ihid_elan->chip_data->post_power_delay_ms); gpiod_set_value_cansleep(ihid_elan->reset_gpio, 0); - if (ihid_elan->chip_data->post_gpio_reset_delay_ms) - msleep(ihid_elan->chip_data->post_gpio_reset_delay_ms); + if (ihid_elan->chip_data->post_gpio_reset_on_delay_ms) + msleep(ihid_elan->chip_data->post_gpio_reset_on_delay_ms); return 0; } @@ -64,6 +65,9 @@ static void elan_i2c_hid_power_down(struct i2chid_ops *ops) container_of(ops, struct i2c_hid_of_elan, ops); gpiod_set_value_cansleep(ihid_elan->reset_gpio, 1); + if (ihid_elan->chip_data->post_gpio_reset_off_delay_ms) + msleep(ihid_elan->chip_data->post_gpio_reset_off_delay_ms); + regulator_disable(ihid_elan->vccio); regulator_disable(ihid_elan->vcc33); } @@ -101,12 +105,20 @@ static int i2c_hid_of_elan_probe(struct i2c_client *client) static const struct elan_i2c_hid_chip_data elan_ekth6915_chip_data = { .post_power_delay_ms = 1, - .post_gpio_reset_delay_ms = 300, + .post_gpio_reset_on_delay_ms = 300, + .hid_descriptor_address = 0x0001, +}; + +static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = { + .post_power_delay_ms = 1, + .post_gpio_reset_on_delay_ms = 200, + .post_gpio_reset_off_delay_ms = 65, .hid_descriptor_address = 0x0001, }; 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 }, { } }; MODULE_DEVICE_TABLE(of, elan_i2c_hid_of_match); -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-05 6:03 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-06-02 14:09 [PATCH 0/2] Add ili9882t timing Cong Yang 2023-06-02 14:09 ` [PATCH 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip Cong Yang 2023-06-02 14:19 ` Krzysztof Kozlowski 2023-06-05 6:03 ` cong yang 2023-06-02 15:14 ` Rob Herring 2023-06-02 14:09 ` [PATCH 2/2] HID: i2c-hid: elan: Add ili9882t timing Cong Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox