From: Conor Dooley <conor@kernel.org>
To: Linus Walleij <linusw@kernel.org>
Cc: conor@kernel.org, Conor Dooley <conor.dooley@microchip.com>,
Yixun Lan <dlan@kernel.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev
Subject: [RFC v1 3/4] pinctrl: spacemit: delete check_power()
Date: Wed, 6 May 2026 10:57:41 +0100 [thread overview]
Message-ID: <20260506-backtalk-pregnant-ff4cbd27b4d0@spud> (raw)
In-Reply-To: <20260506-energize-dramatize-051909e54256@spud>
From: Conor Dooley <conor.dooley@microchip.com>
AFAICT, this is pointless because generate_config performs this check
too.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
drivers/pinctrl/spacemit/pinctrl-k1.c | 37 ---------------------------
1 file changed, 37 deletions(-)
diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c
index 62cab6f6cd0a8..41d8a34bc386b 100644
--- a/drivers/pinctrl/spacemit/pinctrl-k1.c
+++ b/drivers/pinctrl/spacemit/pinctrl-k1.c
@@ -409,38 +409,6 @@ static inline u32 spacemit_get_drive_strength_mA(enum spacemit_pin_io_type type,
}
}
-static int spacemit_pctrl_check_power(struct pinctrl_dev *pctldev,
- struct device_node *dn,
- struct spacemit_pin_mux_config *pinmuxs,
- int num_pins, const char *grpname)
-{
- struct spacemit_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
- struct device *dev = pctrl->dev;
- enum spacemit_pin_io_type type;
- u32 power = 0, i;
-
- of_property_read_u32(dn, "power-source", &power);
-
- for (i = 0; i < num_pins; i++) {
- type = spacemit_to_pin_io_type(pinmuxs[i].pin);
-
- if (type != IO_TYPE_EXTERNAL)
- continue;
-
- switch (power) {
- case PIN_POWER_STATE_1V8:
- case PIN_POWER_STATE_3V3:
- break;
- default:
- dev_err(dev, "group %s has unsupported power\n",
- grpname);
- return -ENOTSUPP;
- }
- }
-
- return 0;
-}
-
static void spacemit_set_io_pwr_domain(struct spacemit_pinctrl *pctrl,
const struct spacemit_pin *spin,
const enum spacemit_pin_io_type type)
@@ -548,11 +516,6 @@ static int spacemit_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
return dev_err_probe(dev, -ENODEV, "failed to get pin %d\n", pins[i]);
}
- ret = spacemit_pctrl_check_power(pctldev, child, pinmuxs,
- npins, grpname);
- if (ret < 0)
- return ret;
-
map[nmaps].type = PIN_MAP_TYPE_MUX_GROUP;
map[nmaps].data.mux.function = np->name;
map[nmaps].data.mux.group = grpname;
--
2.53.0
next prev parent reply other threads:[~2026-05-06 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 9:57 [RFC v1 0/4] generic pinmux dt_node_to_map implementation Conor Dooley
2026-05-06 9:57 ` [RFC v1 1/4] pinctrl: generic: change signature of pinctrl_generic_to_map() to pass void data Conor Dooley
2026-05-06 9:57 ` [RFC v1 2/4] pinctrl: add new generic groups/function creation function for pinmux Conor Dooley
2026-05-06 9:57 ` Conor Dooley [this message]
2026-05-06 9:57 ` [RFC v1 4/4] pinctrl: spacemit: move over to generic pinmux dt_node_to_map implementation Conor Dooley
2026-05-11 20:23 ` [RFC v1 0/4] " Linus Walleij
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=20260506-backtalk-pregnant-ff4cbd27b4d0@spud \
--to=conor@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=dlan@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.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