mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
mfd: clear interrupt status in probe
VRS RTC may assert interrupt if battery mounted. Clear the status registers before interrupt enabled to prevent bad logic. Bug 3910065 Bug 3742306 Change-Id: I02dc6ce9352b1f1932cc539e6988375da4098014 Signed-off-by: Chenjian <jackchen@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2833620 (cherry picked from commit a50dd0a752641a30d84a5edfed426a12f2641acc) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2839704 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3418233 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Shubhi Garg <shgarg@nvidia.com> Tested-by: Kevin Fu <chunhuaif@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
858da4d574
commit
a196aadaf7
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Voltage Regulator Specification: Power Sequencer MFD Driver
|
||||
*
|
||||
* Copyright (C) 2020-2023 NVIDIA CORPORATION. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
@@ -228,6 +228,14 @@ static int nvvrs_pseq_probe(struct i2c_client *client,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* When battery mounted, the chip may have IRQ asserted. */
|
||||
/* Clear it before IRQ requested. */
|
||||
ret = nvvrs_pseq_irq_clear(nvvrs_chip);
|
||||
if (ret < 0) {
|
||||
dev_err(nvvrs_chip->dev, "Failed to clear IRQ: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
nvvrs_pseq_irq_chip.irq_drv_data = nvvrs_chip;
|
||||
ret = devm_regmap_add_irq_chip(nvvrs_chip->dev, nvvrs_chip->rmap, client->irq,
|
||||
IRQF_ONESHOT | IRQF_SHARED, 0,
|
||||
|
||||
Reference in New Issue
Block a user