From: Frieder Schrempf <frieder@fris.de>
To: linux-arm-kernel@lists.infradead.org,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>,
Bo Liu <liubo03@inspur.com>, Frank Li <Frank.Li@nxp.com>,
Joy Zou <joy.zou@nxp.com>, Marek Vasut <marex@denx.de>,
Robin Gong <yibin.gong@nxp.com>
Subject: [PATCH] regulator: pca9450: Remove duplicate code in probe
Date: Wed, 19 Feb 2025 09:01:48 +0100 [thread overview]
Message-ID: <20250219080152.11883-1-frieder@fris.de> (raw)
From: Frieder Schrempf <frieder.schrempf@kontron.de>
The SD_VSEL GPIO is fetched twice for no reason. Remove the
duplicate code.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
Apparently something went wrong when preparing the v3 patch
that got applied to regulator/for-next and is now in linux-next.
---
drivers/regulator/pca9450-regulator.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 4519e725706cd..8f81d813640d9 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -1100,18 +1100,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
return ret;
}
- /*
- * For LDO5 we need to be able to check the status of the SD_VSEL input in
- * order to know which control register is used. Most boards connect SD_VSEL
- * to the VSELECT signal, so we can use the GPIO that is internally routed
- * to this signal (if SION bit is set in IOMUX).
- */
- pca9450->sd_vsel_gpio = gpiod_get_optional(&ldo5->dev, "sd-vsel", GPIOD_IN);
- if (IS_ERR(pca9450->sd_vsel_gpio)) {
- dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
- return ret;
- }
-
dev_info(&i2c->dev, "%s probed.\n",
type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));
--
2.48.1
next reply other threads:[~2025-02-19 8:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 8:01 Frieder Schrempf [this message]
2025-02-19 23:08 ` [PATCH] regulator: pca9450: Remove duplicate code in probe Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250219080152.11883-1-frieder@fris.de \
--to=frieder@fris.de \
--cc=Frank.Li@nxp.com \
--cc=broonie@kernel.org \
--cc=frieder.schrempf@kontron.de \
--cc=joy.zou@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liubo03@inspur.com \
--cc=marex@denx.de \
--cc=yibin.gong@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox