From: Krzysztof Kozlowski <krzk@kernel.org>
To: wangshuaijie@awinic.com, jic23@kernel.org, lars@metafoo.de,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
waqar.hameed@axis.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: liweilei@awinic.com, kangjiajun@awinic.com
Subject: Re: [PATCH V3 1/2] dt-bindings: iio: Add YAML to Awinic proximity sensor
Date: Fri, 12 Jul 2024 13:55:09 +0200 [thread overview]
Message-ID: <c466de06-cbc3-4ce7-90fe-4decc6e0fb89@kernel.org> (raw)
In-Reply-To: <20240712113200.2468249-2-wangshuaijie@awinic.com>
On 12/07/2024 13:31, wangshuaijie@awinic.com wrote:
> From: shuaijie wang <wangshuaijie@awinic.com>
>
> Add the awinic,aw96xxx.yaml file to adapt to the awinic proximity sensor driver.
> Addressing the issues raised in the previous version.
> 1. Add a description about the hardware device.
> 2. Remove inappropriate configuration items.
> 3. Modify the formatting issues.
That's commit msg or changelog? Don't mix both. Read submitting patches.
>
> Signed-off-by: shuaijie wang <wangshuaijie@awinic.com>
> ---
> .../iio/proximity/awinic,aw96xxx.yaml | 127 ++++++++++++++++++
> 1 file changed, 127 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/proximity/awinic,aw96xxx.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/proximity/awinic,aw96xxx.yaml b/Documentation/devicetree/bindings/iio/proximity/awinic,aw96xxx.yaml
> new file mode 100644
> index 000000000000..459cb1644d3c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/proximity/awinic,aw96xxx.yaml
> @@ -0,0 +1,127 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/awinic,aw96xxx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Awinic's AW96XXX capacitive proximity sensor
> +
> +maintainers:
> + - Shuaijie Wang <wangshuaijie@awinic.com>
> +
> +description: |
> + Awinic's AW96XXX proximity sensor.
> + The specific absorption rate (SAR) is a metric that measures
> + the degree of absorption of electromagnetic radiation emitted by wireless
> + devices, such as mobile phones and tablets, by human tissue.
> + In mobile phone applications, the proximity sensor is primarily used to detect
> + the proximity of the human body to the phone. When the phone approaches the human body,
> + it will actively reduce the transmit power of the antenna to keep the SAR within a safe
> + range. Therefore, we also refer to the proximity sensor as a SAR sensor.
Wrap at 80 (see Coding style).
> +
> +properties:
> + compatible:
> + enum:
> + - awinic,aw96103
> + - awinic,aw96105
> + - awinic,aw96303
> + - awinic,aw96305
> + - awinic,aw96308
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + description:
> + Generated by the device to announce that a close/far
> + proximity event has happened.
> + maxItems: 1
> +
> + awinic,sar-num:
Drop the property. I already asked.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Set the number of the SAR(Specific Absorption Rate) sensor.
> + It is set to 0 if one awinic sar chip is used.
> + If two awinic sar chips are used, awinic,sar-label in the first
> + awinic-sar should be set to 0 and awinic,sar-label in the second
> + awinic-sar should be set to 1.
> + In an application where a device utilizes multiple proximity sensors,
> + it is used to retrieve the names of the register configuration files
> + that the drivers need to load. For example: aw963xx_reg_0.bin/aw963xx_reg_1.bin
> +
> + awinic,regulator-power-supply:
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.
> + description:
> + Choose if you want to use a regulator to power the chip. Then the
> + vccX-supply has to be set.
> +
> + vcc0-supply:
> + description:
> + Optional regulator for chip, 1.7V-3.6V.
> + If two awinic sar chips are used, the first regulator
> + should set the ID to vcc0-supply and the second regulator
> + should set the ID to vcc1-supply.
> +
> + awinic,channel-use-mask:
Aren't there existing IIO properties like this?
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + The mask of channels used.
> + Configure according to the specific chip channel used.
> + Bit[31:0] Each bit represents a channel.
> + If the customer uses ch0 and ch2, then channel_use_mask=<0x05>
> + For a 3-channel chip, the maximum value is 0x07;
> + For a 5-channel chip, the maximum value is 0x1F;
> + For a 8-channel chip, the maximum value is 0xFF;
> +
> + awinic,monitor-esd:
> + type: boolean
> + description:
> + Choose if you want to monitor ESD.
Why this is a choice? How does this describe hardware.
> +
> + awinic,pin-set-inter-pull-up:
> + type: boolean
> + description:
> + Choose if you want to set the interrupt pin to internal pull-up.
> +
> + awinic,using-pm-ops:
NAK, drop all such OS policies.
> + type: boolean
> + description:
> + Choose if you want to change the chip mode on suppend and resume.
> +
> + awinic,use-plug-cail:> + type: boolean
> + description:
> + Choose If you want to perform calibration when plugging and unplugging the charger.
And why this is board dependent?
> +
> + awinic,irq-mux:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [2, 5]
> + description:
> + You only need to set this configuration item if you are using AW96308 adn AW96305BFOR.
> + If CS2 is used as the interrupt pin, this item should be set to 2.
> + If CS5 is used as the interrupt pin, this item should be set to 5.
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-07-12 11:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 11:31 [PATCH V3 0/2] Add support for Awinic SAR sensor wangshuaijie
2024-07-12 11:31 ` [PATCH V3 1/2] dt-bindings: iio: Add YAML to Awinic proximity sensor wangshuaijie
2024-07-12 11:55 ` Krzysztof Kozlowski [this message]
2024-07-13 12:15 ` Jonathan Cameron
2024-07-25 12:47 ` wangshuaijie
2024-07-25 13:53 ` Krzysztof Kozlowski
2024-07-12 12:34 ` Rob Herring (Arm)
2024-07-12 11:32 ` [PATCH V3 2/2] Add support for " wangshuaijie
2024-07-12 12:01 ` Krzysztof Kozlowski
2024-07-25 12:48 ` wangshuaijie
2024-07-12 14:33 ` Markus Elfring
2024-07-12 22:22 ` kernel test robot
2024-07-13 6:15 ` kernel test robot
2024-07-13 8:50 ` kernel test robot
2024-07-13 10:33 ` kernel test robot
2024-07-13 14:27 ` Jonathan Cameron
2024-07-25 12:47 ` wangshuaijie
2024-07-27 12:22 ` Jonathan Cameron
2024-07-12 11:49 ` [PATCH V3 0/2] Add support for Awinic SAR sensor Waqar Hameed
2024-07-25 12:48 ` wangshuaijie
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=c466de06-cbc3-4ce7-90fe-4decc6e0fb89@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kangjiajun@awinic.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liweilei@awinic.com \
--cc=robh@kernel.org \
--cc=wangshuaijie@awinic.com \
--cc=waqar.hameed@axis.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;
as well as URLs for NNTP newsgroup(s).