mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
This commit is contained in:
@@ -525,7 +525,7 @@ Description:
|
||||
|
||||
Valid values:
|
||||
"Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe",
|
||||
"NiCd", "LiMn"
|
||||
"NiCd", "LiMn", "PbAc", "NiZn", "RAM", "ZnAr"
|
||||
|
||||
|
||||
What: /sys/class/power_supply/<supply_name>/voltage_avg,
|
||||
|
||||
@@ -17,12 +17,16 @@ description: |
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,pm8916-pon
|
||||
- qcom,pm8941-pon
|
||||
- qcom,pms405-pon
|
||||
- qcom,pm8998-pon
|
||||
- qcom,pmk8350-pon
|
||||
oneOf:
|
||||
- enum:
|
||||
- qcom,pm8916-pon
|
||||
- qcom,pm8941-pon
|
||||
- qcom,pms405-pon
|
||||
- qcom,pm8998-pon
|
||||
- qcom,pmk8350-pon
|
||||
- items:
|
||||
- const: qcom,pmm8654au-pon
|
||||
- const: qcom,pmk8350-pon
|
||||
|
||||
reg:
|
||||
description: |
|
||||
@@ -79,6 +83,10 @@ allOf:
|
||||
reg-names:
|
||||
items:
|
||||
- const: pon
|
||||
patternProperties:
|
||||
# Negative look-ahead to disallow unsupported modes. The '$' has to be
|
||||
# part of lookahead group to work, instead of trailing outside of ().
|
||||
"^mode-(?!(bootloader$|recovery$))": false
|
||||
else:
|
||||
patternProperties:
|
||||
"^mode-.*$": false
|
||||
|
||||
@@ -67,13 +67,11 @@ properties:
|
||||
Voltage threshold to report battery as over voltage (in mV).
|
||||
Default is not to report over-voltage events.
|
||||
|
||||
power-supplies: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -44,9 +44,40 @@ properties:
|
||||
maxItems: 1
|
||||
description: USB suspend pin (active high, output)
|
||||
|
||||
dc-current-limit-gpios:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
description:
|
||||
GPIOs controlling DC input current limit via resistor mux.
|
||||
Used with dc-current-limit-mapping to select charging current.
|
||||
|
||||
dc-current-limit-mapping:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-matrix
|
||||
minItems: 2
|
||||
maxItems: 16
|
||||
description: |
|
||||
Array of (current_microamps, gpio_bit_pattern) pairs defining available
|
||||
DC current limits. The gpio_bit_pattern is applied to dc-current-limit-gpios
|
||||
to select that current level.
|
||||
items:
|
||||
items:
|
||||
- description: Current limit in microamps
|
||||
- description: GPIO bit pattern value
|
||||
|
||||
usb-current-limit-gpios:
|
||||
maxItems: 1
|
||||
description:
|
||||
GPIO driving the MAX8903 IUSB pin. IUSB is a silicon-fixed
|
||||
two-state input - low selects 100 mA, high selects 500 mA.
|
||||
Only the GPIO mapping is board-specific.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
dependentRequired:
|
||||
dc-current-limit-gpios: [dc-current-limit-mapping]
|
||||
dc-current-limit-mapping: [dc-current-limit-gpios]
|
||||
|
||||
anyOf:
|
||||
- required:
|
||||
- dok-gpios
|
||||
@@ -65,3 +96,25 @@ examples:
|
||||
chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
|
||||
cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
- |
|
||||
/* Example with DC and USB current limit control */
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
charger {
|
||||
compatible = "maxim,max8903";
|
||||
dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
|
||||
flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
||||
chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
|
||||
cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
dcm-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
/* DC input current limit via IDC resistor mux */
|
||||
dc-current-limit-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>,
|
||||
<&gpio1 1 GPIO_ACTIVE_HIGH>;
|
||||
dc-current-limit-mapping = <750000 0>, /* GPIO[1:0]=0b00 */
|
||||
<900000 1>, /* GPIO[1:0]=0b01 */
|
||||
<1400000 3>, /* GPIO[1:0]=0b11 */
|
||||
<2000000 2>; /* GPIO[1:0]=0b10 */
|
||||
|
||||
/* USB current limit: IUSB pin, 100 mA (low) / 500 mA (high) */
|
||||
usb-current-limit-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/power/supply/sgmicro,sgm41542.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: SGM41542 Battery Charger
|
||||
|
||||
description:
|
||||
The SGMicro SGM41542 is a single cell battery charger/boost controller.
|
||||
|
||||
maintainers:
|
||||
- Chris Morgan <macromorgan@hotmail.com>
|
||||
- Xu Shengfei <xsf@rock-chips.com>
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: sgmicro,sgm41542
|
||||
|
||||
input-current-limit-microamp:
|
||||
default: 2400000
|
||||
minimum: 100000
|
||||
maximum: 3800000
|
||||
|
||||
input-voltage-limit-microvolt:
|
||||
default: 4500000
|
||||
minimum: 3900000
|
||||
maximum: 12000000
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
monitored-battery:
|
||||
description: |
|
||||
The charger uses the following battery properties
|
||||
constant-charge-current-max-microamp (default 2040000)
|
||||
constant-charge-voltage-max-microvolt (default 4208000)
|
||||
charge-term-current-microamp (default 180000)
|
||||
precharge-current-microamp (default 180000)
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
regulators:
|
||||
type: object
|
||||
properties:
|
||||
otg-vbus:
|
||||
type: object
|
||||
description: OTG boost regulator
|
||||
$ref: /schemas/regulator/regulator.yaml
|
||||
unevaluatedProperties: false
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
battery: battery {
|
||||
compatible = "simple-battery";
|
||||
constant-charge-current-max-microamp = <10000000>;
|
||||
constant-charge-voltage-max-microvolt = <4350000>;
|
||||
precharge-current-microamp = <180000>;
|
||||
charge-term-current-microamp = <300000>;
|
||||
};
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
charger@3b {
|
||||
compatible = "sgmicro,sgm41542";
|
||||
reg = <0x3b>;
|
||||
input-current-limit-microamp = <3000000>;
|
||||
input-voltage-limit-microvolt = <4500000>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
|
||||
monitored-battery = <&battery>;
|
||||
|
||||
regulators {
|
||||
otg-vbus {
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/power/supply/ti,bq25630.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: TI BQ25630 battery charger
|
||||
|
||||
maintainers:
|
||||
- Waqar Hameed <waqar.hameed@axis.com>
|
||||
|
||||
description: |
|
||||
I2C controlled single cell Li-ion and Li-polymer 5A buck charger.
|
||||
Datasheet: https://www.ti.com/lit/gpn/bq25630
|
||||
|
||||
allOf:
|
||||
- $ref: power-supply.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ti,bq25630
|
||||
|
||||
reg:
|
||||
const: 0x6b
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description:
|
||||
Device sends active low 256 µs pulse. Type should therefore be
|
||||
IRQ_TYPE_EDGE_FALLING.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- monitored-battery
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
charger@6b {
|
||||
compatible = "ti,bq25630";
|
||||
reg = <0x6b>;
|
||||
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
|
||||
monitored-battery = <&bat>;
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -10330,6 +10330,12 @@ S: Maintained
|
||||
F: drivers/mmc/host/sdhci-esdhc-mcf.c
|
||||
F: include/linux/platform_data/mmc-esdhc-mcf.h
|
||||
|
||||
FREESCALE COLDFIRE M5441X RCM POWER-ON REASON DRIVER
|
||||
M: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
|
||||
L: linux-m68k@lists.linux-m68k.org
|
||||
S: Maintained
|
||||
F: drivers/power/reset/mcf-rcm-reset.c
|
||||
|
||||
FREESCALE DIU FRAMEBUFFER DRIVER
|
||||
M: Timur Tabi <timur@kernel.org>
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
|
||||
@@ -128,6 +128,18 @@ config POWER_RESET_LINKSTATION
|
||||
|
||||
Say Y here if you have a Buffalo LinkStation LS421D/E.
|
||||
|
||||
config POWER_RESET_MCF_RCM
|
||||
tristate "Freescale ColdFire RCM power-on reason driver"
|
||||
depends on M5441x || COMPILE_TEST
|
||||
depends on HAS_IOMEM
|
||||
help
|
||||
This driver exposes the cause of the last reset on Freescale
|
||||
ColdFire 5441x SoCs through the standard power_on_reason sysfs
|
||||
ABI. It reads the Reset Status Register (RSR) of the Reset
|
||||
Controller Module once at probe time and reports a normalised
|
||||
string (regular power-up, reset button action, software reset
|
||||
or unknown reason).
|
||||
|
||||
config POWER_RESET_MACSMC
|
||||
tristate "Apple SMC reset/power-off driver"
|
||||
depends on MFD_MACSMC
|
||||
|
||||
@@ -13,6 +13,7 @@ obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
|
||||
obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
|
||||
obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
|
||||
obj-$(CONFIG_POWER_RESET_LINKSTATION) += linkstation-poweroff.o
|
||||
obj-$(CONFIG_POWER_RESET_MCF_RCM) += mcf-rcm-reset.o
|
||||
obj-$(CONFIG_POWER_RESET_MACSMC) += macsmc-reboot.o
|
||||
obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o
|
||||
obj-$(CONFIG_POWER_RESET_MT6323) += mt6323-poweroff.o
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Freescale ColdFire MCF5441x RCM power-on reason driver
|
||||
*
|
||||
* Copyright (C) 2026 Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/power/power_on_reason.h>
|
||||
|
||||
/*
|
||||
* Reset Status Register (RSR) layout, MCF54418 Reference Manual chapter
|
||||
* 12.3.2. The register is 8-bit read-only and latches the cause (or
|
||||
* causes) of the most recent reset until the next one occurs.
|
||||
*/
|
||||
#define MCF_RSR_SOFT 0x20 /* Last reset caused by software */
|
||||
#define MCF_RSR_LOC 0x10 /* Last reset caused by PLL loss of clock */
|
||||
#define MCF_RSR_POR 0x08 /* Last reset caused by power-on */
|
||||
#define MCF_RSR_EXT 0x04 /* Last reset caused by external pin */
|
||||
#define MCF_RSR_WDRCORE 0x02 /* Last reset caused by core watchdog */
|
||||
#define MCF_RSR_LOL 0x01 /* Last reset caused by PLL loss of lock */
|
||||
|
||||
#define MCF_RSR_KNOWN_CAUSES (MCF_RSR_POR | MCF_RSR_EXT | MCF_RSR_WDRCORE | \
|
||||
MCF_RSR_LOC | MCF_RSR_LOL | MCF_RSR_SOFT)
|
||||
|
||||
struct mcf_rcm {
|
||||
const char *reason;
|
||||
};
|
||||
|
||||
/*
|
||||
* Decode RSR into a power_on_reason string.
|
||||
*
|
||||
* The MCF5441x Reset Status Register can latch several cause bits at the
|
||||
* same time (Reference Manual chapter 12.3.2: "one or more status bits
|
||||
* may be set at the same time"). A power-on, for example, also resets
|
||||
* the PLL and may co-flag LOC and LOL during the boot sequence. The
|
||||
* power_on_reason ABI carries a single string, so this routine picks
|
||||
* one cause; the chosen priority surfaces the most explanatory one for
|
||||
* diagnostics:
|
||||
*
|
||||
* POR cold boot dominates any spurious co-flagged cause
|
||||
* EXT operator action via the RESET pin
|
||||
* WDRCORE core watchdog timeout, a fault to investigate
|
||||
* LOC, LOL PLL clock or lock failure, hardware fault
|
||||
* SOFT explicit software-requested reset
|
||||
*/
|
||||
static const char *mcf_rcm_decode(u8 rsr)
|
||||
{
|
||||
if (rsr & MCF_RSR_POR)
|
||||
return POWER_ON_REASON_REGULAR;
|
||||
if (rsr & MCF_RSR_EXT)
|
||||
return POWER_ON_REASON_RST_BTN;
|
||||
if (rsr & MCF_RSR_WDRCORE)
|
||||
return POWER_ON_REASON_WATCHDOG;
|
||||
if (rsr & (MCF_RSR_LOC | MCF_RSR_LOL))
|
||||
return POWER_ON_REASON_CPU_CLK_FAIL;
|
||||
if (rsr & MCF_RSR_SOFT)
|
||||
return POWER_ON_REASON_SOFTWARE;
|
||||
return POWER_ON_REASON_UNKNOWN;
|
||||
}
|
||||
|
||||
static ssize_t power_on_reason_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct mcf_rcm *rcm = platform_get_drvdata(to_platform_device(dev));
|
||||
|
||||
return sysfs_emit(buf, "%s\n", rcm->reason);
|
||||
}
|
||||
static DEVICE_ATTR_RO(power_on_reason);
|
||||
|
||||
static struct attribute *mcf_rcm_attrs[] = {
|
||||
&dev_attr_power_on_reason.attr,
|
||||
NULL,
|
||||
};
|
||||
ATTRIBUTE_GROUPS(mcf_rcm);
|
||||
|
||||
static int mcf_rcm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct mcf_rcm *rcm;
|
||||
void __iomem *base;
|
||||
u8 rsr;
|
||||
|
||||
rcm = devm_kzalloc(&pdev->dev, sizeof(*rcm), GFP_KERNEL);
|
||||
if (!rcm)
|
||||
return -ENOMEM;
|
||||
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
rsr = readb_relaxed(base);
|
||||
rcm->reason = mcf_rcm_decode(rsr);
|
||||
|
||||
platform_set_drvdata(pdev, rcm);
|
||||
|
||||
if (!(rsr & MCF_RSR_KNOWN_CAUSES))
|
||||
dev_warn(&pdev->dev, "Unknown reset cause (RSR=0x%02x)\n", rsr);
|
||||
else
|
||||
dev_info(&pdev->dev, "Starting after %s (RSR=0x%02x)\n",
|
||||
rcm->reason, rsr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct platform_device_id mcf_rcm_id[] = {
|
||||
{ "mcf-rcm-reset" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, mcf_rcm_id);
|
||||
|
||||
static struct platform_driver mcf_rcm_driver = {
|
||||
.probe = mcf_rcm_probe,
|
||||
.id_table = mcf_rcm_id,
|
||||
.driver = {
|
||||
.name = "mcf-rcm-reset",
|
||||
.dev_groups = mcf_rcm_groups,
|
||||
},
|
||||
};
|
||||
module_platform_driver(mcf_rcm_driver);
|
||||
|
||||
MODULE_AUTHOR("Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>");
|
||||
MODULE_DESCRIPTION("Freescale ColdFire RCM power-on reason driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -96,6 +96,7 @@ static const struct pci_device_id piix4_poweroff_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3) },
|
||||
{ 0 },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, piix4_poweroff_ids);
|
||||
|
||||
static struct pci_driver piix4_poweroff_driver = {
|
||||
.name = "piix4-poweroff",
|
||||
|
||||
@@ -68,8 +68,6 @@ static int pwr_mlxbf_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
|
||||
err = devm_request_irq(dev, irq, pwr_mlxbf_irq, 0, hid, priv);
|
||||
if (err)
|
||||
dev_err(dev, "Failed request of %s irq\n", priv->hid);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/reboot-mode.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -168,10 +169,11 @@ error:
|
||||
*/
|
||||
int reboot_mode_register(struct reboot_mode_driver *reboot)
|
||||
{
|
||||
struct mode_info *info;
|
||||
struct mode_info *info = NULL;
|
||||
struct property *prop;
|
||||
struct device_node *np = reboot->dev->of_node;
|
||||
size_t len = strlen(PREFIX);
|
||||
u32 magic;
|
||||
int ret;
|
||||
|
||||
INIT_LIST_HEAD(&reboot->head);
|
||||
@@ -180,22 +182,22 @@ int reboot_mode_register(struct reboot_mode_driver *reboot)
|
||||
if (strncmp(prop->name, PREFIX, len))
|
||||
continue;
|
||||
|
||||
info = devm_kzalloc(reboot->dev, sizeof(*info), GFP_KERNEL);
|
||||
if (device_property_read_u32(reboot->dev, prop->name, &magic)) {
|
||||
dev_dbg(reboot->dev, "reboot mode %s without magic number\n",
|
||||
prop->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
info = kzalloc_obj(*info, GFP_KERNEL);
|
||||
if (!info) {
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (of_property_read_u32(np, prop->name, &info->magic)) {
|
||||
dev_err(reboot->dev, "reboot mode %s without magic number\n",
|
||||
info->mode);
|
||||
devm_kfree(reboot->dev, info);
|
||||
continue;
|
||||
}
|
||||
|
||||
info->magic = magic;
|
||||
info->mode = kstrdup_const(prop->name + len, GFP_KERNEL);
|
||||
if (!info->mode) {
|
||||
ret = -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
} else if (info->mode[0] == '\0') {
|
||||
kfree_const(info->mode);
|
||||
@@ -206,6 +208,7 @@ int reboot_mode_register(struct reboot_mode_driver *reboot)
|
||||
}
|
||||
|
||||
list_add_tail(&info->list, &reboot->head);
|
||||
info = NULL;
|
||||
}
|
||||
|
||||
reboot->reboot_notifier.notifier_call = reboot_mode_notify;
|
||||
@@ -218,6 +221,7 @@ int reboot_mode_register(struct reboot_mode_driver *reboot)
|
||||
return 0;
|
||||
|
||||
error:
|
||||
kfree(info);
|
||||
reboot_mode_unregister(reboot);
|
||||
return ret;
|
||||
}
|
||||
@@ -261,12 +265,16 @@ static inline void reboot_mode_unregister_device(struct reboot_mode_driver *rebo
|
||||
int reboot_mode_unregister(struct reboot_mode_driver *reboot)
|
||||
{
|
||||
struct mode_info *info;
|
||||
struct mode_info *next;
|
||||
|
||||
unregister_reboot_notifier(&reboot->reboot_notifier);
|
||||
reboot_mode_unregister_device(reboot);
|
||||
|
||||
list_for_each_entry(info, &reboot->head, list)
|
||||
list_for_each_entry_safe(info, next, &reboot->head, list) {
|
||||
list_del(&info->list);
|
||||
kfree_const(info->mode);
|
||||
kfree(info);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ static int syscon_reboot_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct syscon_reboot_context *ctx;
|
||||
struct device *dev = &pdev->dev;
|
||||
int priority;
|
||||
u32 priority;
|
||||
int err;
|
||||
|
||||
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
@@ -81,7 +81,7 @@ static int syscon_reboot_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(ctx->map);
|
||||
}
|
||||
|
||||
if (of_property_read_s32(pdev->dev.of_node, "priority", &priority))
|
||||
if (of_property_read_u32(pdev->dev.of_node, "priority", &priority))
|
||||
priority = 192;
|
||||
|
||||
ctx->rd = of_device_get_match_data(dev);
|
||||
|
||||
@@ -959,20 +959,14 @@ static int pm860x_battery_probe(struct platform_device *pdev)
|
||||
ret = devm_request_threaded_irq(chip->dev, info->irq_cc, NULL,
|
||||
pm860x_coulomb_handler, IRQF_ONESHOT,
|
||||
"coulomb", info);
|
||||
if (ret < 0) {
|
||||
dev_err(chip->dev, "Failed to request IRQ: #%d: %d\n",
|
||||
info->irq_cc, ret);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = devm_request_threaded_irq(chip->dev, info->irq_batt, NULL,
|
||||
pm860x_batt_handler,
|
||||
IRQF_ONESHOT, "battery", info);
|
||||
if (ret < 0) {
|
||||
dev_err(chip->dev, "Failed to request IRQ: #%d: %d\n",
|
||||
info->irq_batt, ret);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -716,11 +716,8 @@ static int pm860x_charger_probe(struct platform_device *pdev)
|
||||
pm860x_irq_descs[i].handler,
|
||||
IRQF_ONESHOT,
|
||||
pm860x_irq_descs[i].name, info);
|
||||
if (ret < 0) {
|
||||
dev_err(chip->dev, "Failed to request IRQ: #%d: %d\n",
|
||||
info->irq[i], ret);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -839,6 +839,13 @@ config CHARGER_BQ25980
|
||||
Say Y to enable support for the TI BQ25980, BQ25975 and BQ25960
|
||||
series of fast battery chargers.
|
||||
|
||||
config CHARGER_BQ25630
|
||||
tristate "TI BQ25630 battery charger driver"
|
||||
depends on I2C
|
||||
select REGMAP_I2C
|
||||
help
|
||||
Say Y to enable support for the TI BQ25630 battery charger.
|
||||
|
||||
config CHARGER_BQ256XX
|
||||
tristate "TI BQ256XX battery charger driver"
|
||||
depends on I2C
|
||||
@@ -866,6 +873,15 @@ config CHARGER_S2M
|
||||
devices provide USB power supply information and also required
|
||||
for USB OTG role switching.
|
||||
|
||||
config CHARGER_SGM41542
|
||||
tristate "SGM41542 charger driver"
|
||||
depends on I2C
|
||||
depends on GPIOLIB || COMPILE_TEST
|
||||
depends on REGULATOR
|
||||
select REGMAP_I2C
|
||||
help
|
||||
Say Y to enable support for the SGM41542 battery charger.
|
||||
|
||||
config CHARGER_SMB347
|
||||
tristate "Summit Microelectronics SMB3XX Battery Charger"
|
||||
depends on I2C
|
||||
|
||||
@@ -105,9 +105,11 @@ obj-$(CONFIG_CHARGER_BQ2515X) += bq2515x_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ257XX) += bq257xx_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ25890) += bq25890_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ25980) += bq25980_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ25630) += bq25630_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ256XX) += bq256xx_charger.o
|
||||
obj-$(CONFIG_CHARGER_RK817) += rk817_charger.o
|
||||
obj-$(CONFIG_CHARGER_S2M) += s2m-charger.o
|
||||
obj-$(CONFIG_CHARGER_SGM41542) += sgm41542_charger.o
|
||||
obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o
|
||||
obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
|
||||
obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
|
||||
|
||||
@@ -787,11 +787,8 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
|
||||
IRQF_SHARED | IRQF_NO_SUSPEND | IRQF_ONESHOT,
|
||||
ab8500_btemp_irq[i].name, di);
|
||||
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to request %s IRQ %d: %d\n"
|
||||
, ab8500_btemp_irq[i].name, irq, ret);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
dev_dbg(dev, "Requested %s IRQ %d: %d\n",
|
||||
ab8500_btemp_irq[i].name, irq, ret);
|
||||
}
|
||||
|
||||
@@ -3605,11 +3605,8 @@ static int ab8500_charger_probe(struct platform_device *pdev)
|
||||
IRQF_SHARED | IRQF_NO_SUSPEND | IRQF_ONESHOT,
|
||||
ab8500_charger_irq[i].name, di);
|
||||
|
||||
if (ret != 0) {
|
||||
dev_err(dev, "failed to request %s IRQ %d: %d\n"
|
||||
, ab8500_charger_irq[i].name, irq, ret);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
dev_dbg(dev, "Requested %s IRQ %d: %d\n",
|
||||
ab8500_charger_irq[i].name, irq, ret);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user