Merge "mfd: qcom-i2c-pmic: Skip suspend/resume callbacks when interrupts undefined"

This commit is contained in:
qctecmdr 2024-01-10 12:47:38 -08:00 committed by Gerrit - the friendly Code Review server
commit 2eb18da253

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#define pr_fmt(fmt) "I2C PMIC: %s: " fmt, __func__
@ -606,6 +606,7 @@ static int i2c_pmic_probe(struct i2c_client *client,
devm_regmap_qti_debugfs_register(chip->dev, chip->regmap);
i2c_set_clientdata(client, chip);
chip->summary_irq = -EINVAL;
if (!of_property_read_bool(chip->dev->of_node, "interrupt-controller"))
goto probe_children;
@ -700,6 +701,9 @@ static int i2c_pmic_suspend(struct device *dev)
struct i2c_pmic_periph *periph;
int rc = 0, i;
if (chip->summary_irq < 0)
return 0;
for (i = 0; i < chip->num_periphs; i++) {
periph = &chip->periph[i];
@ -733,6 +737,9 @@ static int i2c_pmic_resume(struct device *dev)
struct i2c_pmic_periph *periph;
int rc = 0, i;
if (chip->summary_irq < 0)
return 0;
for (i = 0; i < chip->num_periphs; i++) {
periph = &chip->periph[i];