lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251005064503.2216520-1-wbg@kernel.org>
Date: Sun,  5 Oct 2025 15:45:01 +0900
From: William Breathitt Gray <wbg@...nel.org>
To: Lakshay Piplani <lakshay.piplani@....com>
Cc: William Breathitt Gray <wbg@...nel.org>,
	linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	robh@...nel.org,
	krzk+dt@...nel.org,
	conor+dt@...nel.org,
	devicetree@...r.kernel.org,
	vikash.bansal@....com,
	priyanka.jain@....com,
	shashank.rebbapragada@....com
Subject: Re: [PATCH 1/2] dt-bindings: counter: Add binding for NXP PCF85263/PCF85363 stopwatch

On Mon, Sep 15, 2025 at 12:44:14PM +0530, Lakshay Piplani wrote:
> Add a devicetree binding schema for the NXP PCF8263/PCF85363 devices when used in
> stopwatch (counter) mode.
> 
> In this configuration, the device operates as a high resolution stopwatch over I2C,
> counting in centiseconds (1/100th of a second) up to 999,999 hours.
> 
> Signed-off-by: Lakshay Piplani <lakshay.piplani@....com>
> ---
>  .../counter/nxp,pcf85363-stopwatch.yaml       | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/counter/nxp,pcf85363-stopwatch.yaml
> 
> diff --git a/Documentation/devicetree/bindings/counter/nxp,pcf85363-stopwatch.yaml b/Documentation/devicetree/bindings/counter/nxp,pcf85363-stopwatch.yaml
> new file mode 100644
> index 000000000000..5fbb3f22ace4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/counter/nxp,pcf85363-stopwatch.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/counter/nxp,pcf85363-stopwatch.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP PCF85263ATL/PCF85363ATL Stopwatch (counter) mode
> +
> +maintainers:
> +  - Lakshay Piplani <lakshay.piplani@....com>
> +
> +description: |
> +  Binding for NXP PCF82563ATL/PCF85363ATL devices when used in the
> +  stopwatch mode. In this mode, the device provides a centi-seconds
> +  (1/100th of a second) resolution operating over i2c.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - nxp,pcf85263atl
> +      - nxp,pcf85363atl
> +
> +  reg:
> +    maxItems: 1
> +
> +  quartz-load-femtofarads:
> +    description:
> +      The capacitive load of the quartz(x-tal).
> +    enum: [6000, 7000, 12500]
> +    default: 7000
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      counter@51 {
> +        compatible = "nxp,pcf85363atl";
> +        reg = <0x51>;
> +        quartz-load-femtofarads = <7000>;
> +      };
> +    };

Hi Lakshay,

It sounds like you're trying to implement a clock. Is there any
particular reason you are trying to do this as a counter driver instead
of using the common clk[^1] framework? The Linux counter interface isn't
specifically designed for clock operations so I suspect a stopwatch
module would fit better in the clk subsystem instead.

Wiliam Breathitt Gray

[^1] https://docs.kernel.org/driver-api/clk.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ