From: Yasin Lee <yasin.lee.x@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
yasin.lee.x@outlook.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: tyhx,hx9023s: Add performance tuning configuration
Date: Thu, 26 Sep 2024 15:58:28 +0800 [thread overview]
Message-ID: <13e92a64-5921-46ad-b685-87b98807208d@gmail.com> (raw)
In-Reply-To: <mzymeyslfhnxpnmiqtmmavn2tyx4mm67f5oy6m5pw7sogcuqn4@uexouiqfkdeb>
On 9/26/24 14:53, Krzysztof Kozlowski wrote:
> On Thu, Sep 26, 2024 at 12:40:17AM +0800, Yasin Lee wrote:
>> When hardware design introduces significant sensor data noise,
>> performance can be improved by adjusting register settings.
>>
>> Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
>> ---
>> .../bindings/iio/proximity/tyhx,hx9023s.yaml | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
>> index 64ce8bc8bd36..0673c40472bd 100644
>> --- a/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
>> +++ b/Documentation/devicetree/bindings/iio/proximity/tyhx,hx9023s.yaml
>> @@ -28,6 +28,18 @@ properties:
>>
>> vdd-supply: true
>>
>> + tyhx,performance-tuning:
>> + description:
>> + Optional, When hardware design introduces significant sensor data noise,
>> + performance can be improved by adjusting register settings, including
>> + but not limited to sample integration time and average sample count.
>> + Performance tuning parameters represented as register address-value pairs.
>> + The array consists of 8-bit values, where each pair represents a register
>> + address followed by the value to be written to that register.
>> + $ref: /schemas/types.yaml#/definitions/uint8-array
> I think you wanted here in such case uint8-matrix with one dimension set
> to two and other 256 or whatever.
>
> I also wonder why do allow any register to be tuned. To me "tuning"
> sounds like improving or tweaking the configuration, so for example I
> would not expect to change some control-like registers, e.g. interrupts,
> enable/disable, reset etc.
>
>
>> + minItems: 2
>> + maxItems: 512
>> +
>> "#address-cells":
>> const: 1
>>
>> @@ -65,6 +77,13 @@ examples:
>> interrupt-parent = <&pio>;
>> interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
>> vdd-supply = <&pp1800_prox>;
>> + tyhx,performance-tuning = [00 00
> This above is clearing entirely the GLOBAL_CTRL0 register, which is not
> tuning.
>
> You are basically avoiding hardware description as properties in DT and
> just dump a blob.
>
>
> Best regards,
> Krzysztof
Hi Krzysztof,
Thank you for your feedback.
You're absolutely right about the operation on the 00 register. That was
indeed a mistake on my part, and it was not my intention to clear the
GLOBAL_CTRL0 register. It was only meant to serve as an example.
I also now understand that importing a data block in this manner doesn't
align with the design philosophy of device trees. Moving forward, I will
abstract each possible tuning configuration into separate properties.
Since there are quite a few properties to handle, this will result in a
larger codebase.
Given the additional work required, I will take a few more days to
revise the patch and resubmit it.
Thank you again for your valuable input.
Best regards,
Yasin Lee
next prev parent reply other threads:[~2024-09-26 7:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 16:40 [PATCH v2 0/2] iio: proximity: hx9023s: Add performance tuning function Yasin Lee
2024-09-25 16:40 ` [PATCH v2 1/2] dt-bindings: iio: tyhx,hx9023s: Add performance tuning configuration Yasin Lee
2024-09-26 6:53 ` Krzysztof Kozlowski
2024-09-26 7:58 ` Yasin Lee [this message]
2024-09-25 16:40 ` [PATCH v2 2/2] iio: proximity: hx9023s: Add performance tuning function Yasin Lee
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=13e92a64-5921-46ad-b685-87b98807208d@gmail.com \
--to=yasin.lee.x@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=yasin.lee.x@outlook.com \
/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
all inboxes | Powered by JetHome®