Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull more power supply updates from Sebastian Reichel:

- Fix DT binding for Richtek RT9467

- Fix a NULL pointer check in the power-supply core

- Document meaning of absent "present" property

* tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
dt-bindings: power: supply: Revise Richtek RT9467 compatible name
ABI: testing: sysfs-class-power: Document absence of "present" property
power: supply: fix null pointer check order in __power_supply_register

+8 -7
+2 -1
Documentation/ABI/testing/sysfs-class-power
··· 437 437 Date: May 2007 438 438 Contact: linux-pm@vger.kernel.org 439 439 Description: 440 - Reports whether a battery is present or not in the system. 440 + Reports whether a battery is present or not in the system. If the 441 + property does not exist, the battery is considered to be present. 441 442 442 443 Access: Read 443 444
+3 -3
Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.yaml Documentation/devicetree/bindings/power/supply/richtek,rt9467.yaml
··· 1 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 2 %YAML 1.2 3 3 --- 4 - $id: http://devicetree.org/schemas/power/supply/richtek,rt9467-charger.yaml# 4 + $id: http://devicetree.org/schemas/power/supply/richtek,rt9467.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 7 title: Richtek RT9467 Switching Battery Charger with Power Path Management ··· 25 25 26 26 properties: 27 27 compatible: 28 - const: richtek,rt9467-charger 28 + const: richtek,rt9467 29 29 30 30 reg: 31 31 maxItems: 1 ··· 65 65 #size-cells = <0>; 66 66 67 67 charger@5b { 68 - compatible = "richtek,rt9467-charger"; 68 + compatible = "richtek,rt9467"; 69 69 reg = <0x5b>; 70 70 wakeup-source; 71 71 interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
+3 -3
drivers/power/supply/power_supply_core.c
··· 1207 1207 struct power_supply *psy; 1208 1208 int rc; 1209 1209 1210 + if (!desc || !desc->name || !desc->properties || !desc->num_properties) 1211 + return ERR_PTR(-EINVAL); 1212 + 1210 1213 if (!parent) 1211 1214 pr_warn("%s: Expected proper parent device for '%s'\n", 1212 1215 __func__, desc->name); 1213 - 1214 - if (!desc || !desc->name || !desc->properties || !desc->num_properties) 1215 - return ERR_PTR(-EINVAL); 1216 1216 1217 1217 if (psy_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && 1218 1218 (!desc->usb_types || !desc->num_usb_types))