Files
android_kernel_samsung_sm87…/bindings/power/supply/lego,ev3-battery.yaml
Melody Olvera 6f18ce8026 dt-bindings: Add devicetree bindings
Add snapshot of device tree bindings from keystone common kernel, branch
"android-mainline-keystone-qcom-release" at c4c12103f9c0 ("Snap for 9228065
from e32903b9a63bb558df8b803b076619c53c16baad to
android-mainline-keystone-qcom-release").

Change-Id: I7682079615cbd9f29340a5c1f2a1d84ec441a1f1
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
2023-04-03 15:40:37 -07:00

56 lines
1.3 KiB
YAML

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/lego,ev3-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LEGO MINDSTORMS EV3 Battery
maintainers:
- David Lechner <david@lechnology.com>
- Sebastian Reichel <sre@kernel.org>
description: |
LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery.
It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is
detected by a key switch in the battery compartment.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: lego,ev3-battery
io-channels:
items:
- description: ADC channel for battery voltage
- description: ADC channel for battery current
io-channel-names:
items:
- const: voltage
- const: current
rechargeable-gpios:
maxItems: 1
description: Rechargeable battery indication gpio
required:
- compatible
- io-channels
- io-channel-names
- rechargeable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
battery {
compatible = "lego,ev3-battery";
io-channels = <&adc 4>, <&adc 3>;
io-channel-names = "voltage", "current";
rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>;
};