Thread (7 messages) 7 messages, 3 authors, 2020-05-17

Re: [PATCH 1/2] dt-bindings: input: Add bindings for Azoteq IQS269A

From: Rob Herring <robh@kernel.org>
Date: 2020-05-01 12:51:20
Also in: linux-devicetree

On Thu, Apr 30, 2020 at 8:23 PM Jeff LaBundy [off-list ref] wrote:
Hi Rob,

Thank you for your thorough review.

On Thu, Apr 30, 2020 at 10:11:08AM -0500, Rob Herring wrote:
quoted
On Sun, Apr 19, 2020 at 06:47:47PM -0500, Jeff LaBundy wrote:
quoted
This patch adds device tree bindings for the Azoteq IQS269A
capacitive touch controller.

Signed-off-by: Jeff LaBundy <redacted>
---
 .../devicetree/bindings/input/iqs269a.yaml         | 591 +++++++++++++++++++++
 1 file changed, 591 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/iqs269a.yaml
Kind of a lot of properties compared to other devices. Why so many? That
said, nothing looks to be obviously something that doesn't belong in DT.
I don't disagree; this device simply has a lot of knobs for accommodating
multiple sensing modes across different applications. Once I added support
for the ones I expected to be most commonly used, however, I didn't see a
reason to exclude the remaining minority and risk having to add something
later.
quoted
No interdependencies between properties? If there are, use
'dependencies'.
Strictly speaking, no; each property can be specified independently of any
other property and the device's registers will be updated accordingly.

That being said, a couple of properties do impose restrictions on others
within specific channels for certain applications. It wasn't clear if/how
'dependencies' could describe these conditional relationships, so I opted
to include a note in the descriptions where applicable.

[...]
quoted
quoted
+
+  azoteq,rate-np-ms:
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
With a unit suffix, you can drop the type $ref.
Sure thing, thank you for catching these. Once I remove $ref in these cases,
is an 'allOf' still required above the remaining minimum/maximum/etc.?
No. Actually, you can now drop 'allOf' even with $ref. With
json-schema draft 2019.9, the behavior has changed such that $ref can
be mixed with other schema. So now that most everyone has learned the
old way, we're switching. You can use either form, but without 'allOf'
you'll need dt-schema to be up to date (2020.4).
quoted
quoted
+      - minimum: 0
+        maximum: 255
+        default: 16
+    description: Specifies the report rate (in ms) during normal-power mode.
+
On a related note, should all items under an 'allOf' be preceded by a hyphen?
No. It's logically equivalent, but the error reporting is worse.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help