Subject: [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver

From: AngeloGioacchino Del Regno <[email protected]>

This patch series adds support for the Novatek NT36xxx Series' In-Cell
touchscreen (integrated into the DriverIC).

This patch series has been tested against the following devices:
- Sony Xperia 10 (SDM630 Ganges Kirin)
- Sony Xperia 10 Plus (SDM636 Ganges Mermaid)

Changes in v2:
- Fixed sparse warnings from lkp kernel test robot

Changes in v3 (as requested by Dmitry Torokhov):
- Using shorthand u16/u32 (sorry for the overlook!)
- Now using more input and touchscreen APIs
- Fixed useless workqueue involvements
- Removed useless locking
- Switched reads and writes to use regmap
- Moved header contents to nt36xxx.c
- Fixed reset gpio handling
- Other cleanups
- P.S.: Thanks, Dmitry!

Changes in v4:
- Fixed regmap read length for CRC_ERR_FLAG final check
- Fixed YAML binding, as requested by Krzysztof Kozlowski

Changes in v5:
- Replaced subsystem maintainer's name with .. mine,
usage of additionalProperties to unevaluatedProperties
and a typo fix for reset-gpios as per Rob Herring's review
- Changed compatible string as per Krzysztof K. request
- Renamed the novatek,nt36xxx.yaml file to just nt36xxx.yaml
in order to now reflect the driver name instead of the DT
compatible
- Fixed blank line at EOF

Changes in v6:
- Removed include of_gpio.h, added mod_devicetable.h and
gpio/consumer.h
- Added kerneldoc to relevant functions/enum
- Used traditional patterns for error checking where possible
- Documented calls to usleep/msleep
- Using be16_to_cpu / get_unaligned_be16 where possible
- Added helper for CRC error check on retrieved buffer
- Decreased indentation in the CRC reboot recovery function
- Removed instances of error code sum
- Dropped all likely/unlikely optimization as per request
- Removed redundant reset_gpio checks
- Dropped of_match_ptr and ifdefs for CONFIG_OF

Changes in v7:
- Fixed typo in nt36xxx.c

Changes in v8:
- Fixed typo reset-gpio -> reset-gpios in dt-bindings

Changes in v9:
- Includes are now sorted
- Used proposed sizeof variable instead of sizeof type
- Fixed a return value check for common pattern
- Added NULL check to devm_kasprintf call
- Returning ret on probe function to be consistent

AngeloGioacchino Del Regno (3):
dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.
Input: Add Novatek NT36xxx touchscreen driver
dt-bindings: touchscreen: Add binding for Novatek NT36xxx series
driver

.../bindings/input/touchscreen/nt36xxx.yaml | 59 ++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
drivers/input/touchscreen/Kconfig | 12 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/nt36xxx.c | 894 ++++++++++++++++++
drivers/input/touchscreen/nt36xxx.h | 122 +++
6 files changed, 1090 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nt36xxx.yaml
create mode 100644 drivers/input/touchscreen/nt36xxx.c
create mode 100644 drivers/input/touchscreen/nt36xxx.h

--
2.28.0


Subject: [PATCH v9 1/3] dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.

From: AngeloGioacchino Del Regno <[email protected]>

Add prefix for Novatek Microelectronics Corp.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 66e45112a8d7..f98ea0af487d 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -740,6 +740,8 @@ patternProperties:
description: Nokia
"^nordic,.*":
description: Nordic Semiconductor
+ "^novatek,.*":
+ description: Novatek Microelectronics Corp.
"^novtech,.*":
description: NovTech, Inc.
"^nutsboard,.*":
--
2.28.0

2020-10-29 15:52:55

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v9 1/3] dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.

On Wed, 28 Oct 2020 23:13:00 +0100, [email protected] wrote:
> From: AngeloGioacchino Del Regno <[email protected]>
>
> Add prefix for Novatek Microelectronics Corp.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>


Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.

Subject: Re: [PATCH v9 1/3] dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.

Il giorno gio 29 ott 2020 alle ore 16:50 Rob Herring <[email protected]>
ha scritto:
>
> On Wed, 28 Oct 2020 23:13:00 +0100, [email protected] wrote:
> > From: AngeloGioacchino Del Regno <[email protected]>
> >
> > Add prefix for Novatek Microelectronics Corp.
> >
> > Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> > ---
> > Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> > 1 file changed, 2 insertions(+)
> >
>
>
> Please add Acked-by/Reviewed-by tags when posting new versions. However,
> there's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.
>
> If a tag was not added on purpose, please state why and what changed.
>
The intention was to add the tag and I even recall adding it... probably
my finger slipped and the changes didn't get saved, my bad disattention.
I should probably stop developing when I'm overtired.

I'm sorry for that.

2020-11-23 10:15:59

by Amit Pundir

[permalink] [raw]
Subject: Re: [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver

Hi,

On Thu, 29 Oct 2020 at 06:32, <[email protected]> wrote:
>
> From: AngeloGioacchino Del Regno <[email protected]>
>
> This patch series adds support for the Novatek NT36xxx Series' In-Cell
> touchscreen (integrated into the DriverIC).
>
> This patch series has been tested against the following devices:
> - Sony Xperia 10 (SDM630 Ganges Kirin)
> - Sony Xperia 10 Plus (SDM636 Ganges Mermaid)

Tested the patch series on Xiaomi Poco F1 (SDM845 Beryllium) using
Novatek NT36672A IC. May I suggest adding "novatek,nt36672a" in the
list of compatible of_device_id{} as well.

Regards,
Amit Pundir


>
> Changes in v2:
> - Fixed sparse warnings from lkp kernel test robot
>
> Changes in v3 (as requested by Dmitry Torokhov):
> - Using shorthand u16/u32 (sorry for the overlook!)
> - Now using more input and touchscreen APIs
> - Fixed useless workqueue involvements
> - Removed useless locking
> - Switched reads and writes to use regmap
> - Moved header contents to nt36xxx.c
> - Fixed reset gpio handling
> - Other cleanups
> - P.S.: Thanks, Dmitry!
>
> Changes in v4:
> - Fixed regmap read length for CRC_ERR_FLAG final check
> - Fixed YAML binding, as requested by Krzysztof Kozlowski
>
> Changes in v5:
> - Replaced subsystem maintainer's name with .. mine,
> usage of additionalProperties to unevaluatedProperties
> and a typo fix for reset-gpios as per Rob Herring's review
> - Changed compatible string as per Krzysztof K. request
> - Renamed the novatek,nt36xxx.yaml file to just nt36xxx.yaml
> in order to now reflect the driver name instead of the DT
> compatible
> - Fixed blank line at EOF
>
> Changes in v6:
> - Removed include of_gpio.h, added mod_devicetable.h and
> gpio/consumer.h
> - Added kerneldoc to relevant functions/enum
> - Used traditional patterns for error checking where possible
> - Documented calls to usleep/msleep
> - Using be16_to_cpu / get_unaligned_be16 where possible
> - Added helper for CRC error check on retrieved buffer
> - Decreased indentation in the CRC reboot recovery function
> - Removed instances of error code sum
> - Dropped all likely/unlikely optimization as per request
> - Removed redundant reset_gpio checks
> - Dropped of_match_ptr and ifdefs for CONFIG_OF
>
> Changes in v7:
> - Fixed typo in nt36xxx.c
>
> Changes in v8:
> - Fixed typo reset-gpio -> reset-gpios in dt-bindings
>
> Changes in v9:
> - Includes are now sorted
> - Used proposed sizeof variable instead of sizeof type
> - Fixed a return value check for common pattern
> - Added NULL check to devm_kasprintf call
> - Returning ret on probe function to be consistent
>
> AngeloGioacchino Del Regno (3):
> dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.
> Input: Add Novatek NT36xxx touchscreen driver
> dt-bindings: touchscreen: Add binding for Novatek NT36xxx series
> driver
>
> .../bindings/input/touchscreen/nt36xxx.yaml | 59 ++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> drivers/input/touchscreen/Kconfig | 12 +
> drivers/input/touchscreen/Makefile | 1 +
> drivers/input/touchscreen/nt36xxx.c | 894 ++++++++++++++++++
> drivers/input/touchscreen/nt36xxx.h | 122 +++
> 6 files changed, 1090 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nt36xxx.yaml
> create mode 100644 drivers/input/touchscreen/nt36xxx.c
> create mode 100644 drivers/input/touchscreen/nt36xxx.h
>
> --
> 2.28.0
>

Subject: Re: [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver

Il giorno lun 23 nov 2020 alle ore 11:13 Amit Pundir
<[email protected]> ha scritto:
>
> Hi,
>
> On Thu, 29 Oct 2020 at 06:32, <[email protected]> wrote:
> >
> > From: AngeloGioacchino Del Regno <[email protected]>
> >
> > This patch series adds support for the Novatek NT36xxx Series' In-Cell
> > touchscreen (integrated into the DriverIC).
> >
> > This patch series has been tested against the following devices:
> > - Sony Xperia 10 (SDM630 Ganges Kirin)
> > - Sony Xperia 10 Plus (SDM636 Ganges Mermaid)
>
> Tested the patch series on Xiaomi Poco F1 (SDM845 Beryllium) using
> Novatek NT36672A IC. May I suggest adding "novatek,nt36672a" in the
> list of compatible of_device_id{} as well.
>
> Regards,
> Amit Pundir
>
>
> >
> > Changes in v2:
> > - Fixed sparse warnings from lkp kernel test robot
> >
> > Changes in v3 (as requested by Dmitry Torokhov):
> > - Using shorthand u16/u32 (sorry for the overlook!)
> > - Now using more input and touchscreen APIs
> > - Fixed useless workqueue involvements
> > - Removed useless locking
> > - Switched reads and writes to use regmap
> > - Moved header contents to nt36xxx.c
> > - Fixed reset gpio handling
> > - Other cleanups
> > - P.S.: Thanks, Dmitry!
> >
> > Changes in v4:
> > - Fixed regmap read length for CRC_ERR_FLAG final check
> > - Fixed YAML binding, as requested by Krzysztof Kozlowski
> >
> > Changes in v5:
> > - Replaced subsystem maintainer's name with .. mine,
> > usage of additionalProperties to unevaluatedProperties
> > and a typo fix for reset-gpios as per Rob Herring's review
> > - Changed compatible string as per Krzysztof K. request
> > - Renamed the novatek,nt36xxx.yaml file to just nt36xxx.yaml
> > in order to now reflect the driver name instead of the DT
> > compatible
> > - Fixed blank line at EOF
> >
> > Changes in v6:
> > - Removed include of_gpio.h, added mod_devicetable.h and
> > gpio/consumer.h
> > - Added kerneldoc to relevant functions/enum
> > - Used traditional patterns for error checking where possible
> > - Documented calls to usleep/msleep
> > - Using be16_to_cpu / get_unaligned_be16 where possible
> > - Added helper for CRC error check on retrieved buffer
> > - Decreased indentation in the CRC reboot recovery function
> > - Removed instances of error code sum
> > - Dropped all likely/unlikely optimization as per request
> > - Removed redundant reset_gpio checks
> > - Dropped of_match_ptr and ifdefs for CONFIG_OF
> >
> > Changes in v7:
> > - Fixed typo in nt36xxx.c
> >
> > Changes in v8:
> > - Fixed typo reset-gpio -> reset-gpios in dt-bindings
> >
> > Changes in v9:
> > - Includes are now sorted
> > - Used proposed sizeof variable instead of sizeof type
> > - Fixed a return value check for common pattern
> > - Added NULL check to devm_kasprintf call
> > - Returning ret on probe function to be consistent
> >
> > AngeloGioacchino Del Regno (3):
> > dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.
> > Input: Add Novatek NT36xxx touchscreen driver
> > dt-bindings: touchscreen: Add binding for Novatek NT36xxx series
> > driver
> >
> > .../bindings/input/touchscreen/nt36xxx.yaml | 59 ++
> > .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> > drivers/input/touchscreen/Kconfig | 12 +
> > drivers/input/touchscreen/Makefile | 1 +
> > drivers/input/touchscreen/nt36xxx.c | 894 ++++++++++++++++++
> > drivers/input/touchscreen/nt36xxx.h | 122 +++
> > 6 files changed, 1090 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nt36xxx.yaml
> > create mode 100644 drivers/input/touchscreen/nt36xxx.c
> > create mode 100644 drivers/input/touchscreen/nt36xxx.h
> >
> > --
> > 2.28.0
> >
Mind releasing a Tested-By tag for this?

Anyway, I was suggested to add a compatible only for the "oldest" IC that
is supported in this driver, since there is autodetection, that's why you see
only the 36525 compatible here!

Yours,
Angelo

2020-11-27 08:51:35

by Amit Pundir

[permalink] [raw]
Subject: Re: [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver

On Thu, 29 Oct 2020 at 06:32, <[email protected]> wrote:
>
> From: AngeloGioacchino Del Regno <[email protected]>
>
> This patch series adds support for the Novatek NT36xxx Series' In-Cell
> touchscreen (integrated into the DriverIC).
>
> This patch series has been tested against the following devices:
> - Sony Xperia 10 (SDM630 Ganges Kirin)
> - Sony Xperia 10 Plus (SDM636 Ganges Mermaid)
>

Tested the patch series on Xiaomi Poco F1 (SDM845 Beryllium, Novatek
NT36672A IC).

For the whole series:
Tested-by: Amit Pundir <[email protected]>

Regards,
Amit Pundir


> Changes in v2:
> - Fixed sparse warnings from lkp kernel test robot
>
> Changes in v3 (as requested by Dmitry Torokhov):
> - Using shorthand u16/u32 (sorry for the overlook!)
> - Now using more input and touchscreen APIs
> - Fixed useless workqueue involvements
> - Removed useless locking
> - Switched reads and writes to use regmap
> - Moved header contents to nt36xxx.c
> - Fixed reset gpio handling
> - Other cleanups
> - P.S.: Thanks, Dmitry!
>
> Changes in v4:
> - Fixed regmap read length for CRC_ERR_FLAG final check
> - Fixed YAML binding, as requested by Krzysztof Kozlowski
>
> Changes in v5:
> - Replaced subsystem maintainer's name with .. mine,
> usage of additionalProperties to unevaluatedProperties
> and a typo fix for reset-gpios as per Rob Herring's review
> - Changed compatible string as per Krzysztof K. request
> - Renamed the novatek,nt36xxx.yaml file to just nt36xxx.yaml
> in order to now reflect the driver name instead of the DT
> compatible
> - Fixed blank line at EOF
>
> Changes in v6:
> - Removed include of_gpio.h, added mod_devicetable.h and
> gpio/consumer.h
> - Added kerneldoc to relevant functions/enum
> - Used traditional patterns for error checking where possible
> - Documented calls to usleep/msleep
> - Using be16_to_cpu / get_unaligned_be16 where possible
> - Added helper for CRC error check on retrieved buffer
> - Decreased indentation in the CRC reboot recovery function
> - Removed instances of error code sum
> - Dropped all likely/unlikely optimization as per request
> - Removed redundant reset_gpio checks
> - Dropped of_match_ptr and ifdefs for CONFIG_OF
>
> Changes in v7:
> - Fixed typo in nt36xxx.c
>
> Changes in v8:
> - Fixed typo reset-gpio -> reset-gpios in dt-bindings
>
> Changes in v9:
> - Includes are now sorted
> - Used proposed sizeof variable instead of sizeof type
> - Fixed a return value check for common pattern
> - Added NULL check to devm_kasprintf call
> - Returning ret on probe function to be consistent
>
> AngeloGioacchino Del Regno (3):
> dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.
> Input: Add Novatek NT36xxx touchscreen driver
> dt-bindings: touchscreen: Add binding for Novatek NT36xxx series
> driver
>
> .../bindings/input/touchscreen/nt36xxx.yaml | 59 ++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> drivers/input/touchscreen/Kconfig | 12 +
> drivers/input/touchscreen/Makefile | 1 +
> drivers/input/touchscreen/nt36xxx.c | 894 ++++++++++++++++++
> drivers/input/touchscreen/nt36xxx.h | 122 +++
> 6 files changed, 1090 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nt36xxx.yaml
> create mode 100644 drivers/input/touchscreen/nt36xxx.c
> create mode 100644 drivers/input/touchscreen/nt36xxx.h
>
> --
> 2.28.0
>

2022-04-26 11:45:16

by Dang Huynh

[permalink] [raw]
Subject: Re: [PATCH v9 0/3] Add Novatek NT36xxx touchscreen driver

Patch series tested, works fine on the Xiaomi Redmi Note 7 (SDM660, NT36672A IC)

To the whole patch series:
Tested-by: Dang Huynh <[email protected]>

On Wed, 28 Oct 2020 23:12:59 +0100
[email protected] wrote:

> From: AngeloGioacchino Del Regno <[email protected]>
>
> This patch series adds support for the Novatek NT36xxx Series' In-Cell
> touchscreen (integrated into the DriverIC).
>
> This patch series has been tested against the following devices:
> - Sony Xperia 10 (SDM630 Ganges Kirin)
> - Sony Xperia 10 Plus (SDM636 Ganges Mermaid)
>
> Changes in v2:
> - Fixed sparse warnings from lkp kernel test robot
>
> Changes in v3 (as requested by Dmitry Torokhov):
> - Using shorthand u16/u32 (sorry for the overlook!)
> - Now using more input and touchscreen APIs
> - Fixed useless workqueue involvements
> - Removed useless locking
> - Switched reads and writes to use regmap
> - Moved header contents to nt36xxx.c
> - Fixed reset gpio handling
> - Other cleanups
> - P.S.: Thanks, Dmitry!
>
> Changes in v4:
> - Fixed regmap read length for CRC_ERR_FLAG final check
> - Fixed YAML binding, as requested by Krzysztof Kozlowski
>
> Changes in v5:
> - Replaced subsystem maintainer's name with .. mine,
> usage of additionalProperties to unevaluatedProperties
> and a typo fix for reset-gpios as per Rob Herring's review
> - Changed compatible string as per Krzysztof K. request
> - Renamed the novatek,nt36xxx.yaml file to just nt36xxx.yaml
> in order to now reflect the driver name instead of the DT
> compatible
> - Fixed blank line at EOF
>
> Changes in v6:
> - Removed include of_gpio.h, added mod_devicetable.h and
> gpio/consumer.h
> - Added kerneldoc to relevant functions/enum
> - Used traditional patterns for error checking where possible
> - Documented calls to usleep/msleep
> - Using be16_to_cpu / get_unaligned_be16 where possible
> - Added helper for CRC error check on retrieved buffer
> - Decreased indentation in the CRC reboot recovery function
> - Removed instances of error code sum
> - Dropped all likely/unlikely optimization as per request
> - Removed redundant reset_gpio checks
> - Dropped of_match_ptr and ifdefs for CONFIG_OF
>
> Changes in v7:
> - Fixed typo in nt36xxx.c
>
> Changes in v8:
> - Fixed typo reset-gpio -> reset-gpios in dt-bindings
>
> Changes in v9:
> - Includes are now sorted
> - Used proposed sizeof variable instead of sizeof type
> - Fixed a return value check for common pattern
> - Added NULL check to devm_kasprintf call
> - Returning ret on probe function to be consistent
>
> AngeloGioacchino Del Regno (3):
> dt-bindings: Add vendor prefix for Novatek Microelectronics Corp.
> Input: Add Novatek NT36xxx touchscreen driver
> dt-bindings: touchscreen: Add binding for Novatek NT36xxx series
> driver
>
> .../bindings/input/touchscreen/nt36xxx.yaml | 59 ++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> drivers/input/touchscreen/Kconfig | 12 +
> drivers/input/touchscreen/Makefile | 1 +
> drivers/input/touchscreen/nt36xxx.c | 894 ++++++++++++++++++
> drivers/input/touchscreen/nt36xxx.h | 122 +++
> 6 files changed, 1090 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nt36xxx.yaml
> create mode 100644 drivers/input/touchscreen/nt36xxx.c
> create mode 100644 drivers/input/touchscreen/nt36xxx.h
>
> --
> 2.28.0
>