Re: [PATCH v2 1/2] dt-bindings: leds: Add leds-meter binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 27, 2019 at 11:09:38PM +0900, Akinobu Mita wrote:
> Add DT binding for generic LED level meter which consists of multiple LED
> devices by different drivers.

Do you have some pointers to actual h/w?
 
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Bjorn Andersson <bjorn@xxxxxxx>
> Cc: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
> Cc: Jean-Jacques Hiblot <jjhiblot@xxxxxx>
> Cc: Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx>
> Cc: Pavel Machek <pavel@xxxxxx>
> Cc: Dan Murphy <dmurphy@xxxxxx>
> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
> ---
>  .../devicetree/bindings/leds/leds-meter.yaml       | 67 ++++++++++++++++++++++
>  1 file changed, 67 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-meter.yaml
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-meter.yaml b/Documentation/devicetree/bindings/leds/leds-meter.yaml
> new file mode 100644
> index 0000000..b5fcd98
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-meter.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/leds-meter.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic LED level meter
> +
> +maintainers:
> +  - Akinobu Mita <akinobu.mita@xxxxxxxxx>
> +
> +description:
> +  Generic LED level meter consists of multiple LED devices by different drivers.

Googling this, the only thing I see is audio level meters though those 
are all just a voltage level input, so it could be any source I guess.

> +
> +properties:
> +  $nodename:
> +    pattern: "^meter-leds(@.*)?"
> +
> +  compatible:
> +    const: meter-leds
> +
> +  leds:
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/phandle-array
> +    description: List of phandles to LED node that are members of a level meter.
> +
> +  brightness-weights:
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32-array
> +    description: |
> +      By default, the brightness of the LED level meter is proportional to the
> +      number of actual LEDs that are turned on.  We can optionally specify
> +      the contribution ratio for each LED within a level meter by this
> +      property.  The example below shows how to setup an exponential
> +      relationship between the number of LEDs turned on and the brightness of
> +      meter-leds.

This seems oddly named if this is a bar graph. Yes, more LEDs on is 
brighter, but it's really a piecewise linear graph you want. 

Each LED could have variable brightness, so you could also ramp the 
brightness for an individual LED.

Rob



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux