SBS compliant battery
Schema identifier ($id): "http://devicetree.org/schemas/power/supply/sbs,sbs-battery.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Sebastian Reichel <sre@kernel.org>"
Battery compatible with the smart battery system specifications
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):power-supply.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"ti,bq20z45","ti,bq20z65","ti,bq20z75"Item 2
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"sbs,sbs-battery"
reg — required here #
Maximum number of items (maxItems): 1
sbs,i2c-retry-count — not listed as required here #
The number of times to retry I2C transactions on I2C IO failure.
Default value (default): 0
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
sbs,poll-retry-count — not listed as required here #
The number of times to try looking for new status after an external change notification.
Default value (default): 0
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
sbs,battery-detect-gpios — not listed as required here #
GPIO which signals battery detection. If this is not supplied, the bus needs to be polled to detect the battery.
Maximum number of items (maxItems): 1
sbs,disable-charger-broadcasts — not listed as required here #
SBS batteries by default send broadcast messages to SBS compliant chargers to configure max. charge current/voltage. If your hardware does not have an SBS compliant charger it should be disabled via this property to avoid blocking the bus. Also some SBS battery fuel gauges are known to have a buggy multi- master implementation.
Value type (type): "boolean"
Required in this object (required): "compatible", "reg"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
battery@b {
compatible = "ti,bq20z75", "sbs,sbs-battery";
reg = <0xb>;
sbs,i2c-retry-count = <2>;
sbs,poll-retry-count = <10>;
sbs,battery-detect-gpios = <&gpio 122 GPIO_ACTIVE_HIGH>;
sbs,disable-charger-broadcasts;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0