summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2023-04-24 14:34:14 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2023-04-24 14:34:14 +0000
commit79a94226423c8dcea50d21cf26e0c040469cb2ff (patch)
tree9deb3936b9101d0a8538976a677e9128fca7cc8d /sys/dev/fdt
parent25b81585e8c02693d69d30a0ed0c47ebc0dad954 (diff)
Update qcpon(4) compatibles to match on qcom,pmk8350-pon, which is the updated
binding in Linux 6.3 device trees. While there, remove retrieving the register address, as the new binding has an additional register with doesn't work with a single OF_getpropint(), and since we're not using it we don't need to keep it around.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/qcpon.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/fdt/qcpon.c b/sys/dev/fdt/qcpon.c
index 293b4542595..8268d705b66 100644
--- a/sys/dev/fdt/qcpon.c
+++ b/sys/dev/fdt/qcpon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qcpon.c,v 1.3 2022/12/21 23:26:54 patrick Exp $ */
+/* $OpenBSD: qcpon.c,v 1.4 2023/04/24 14:34:13 patrick Exp $ */
/*
* Copyright (c) 2022 Patrick Wildt <patrick@blueri.se>
*
@@ -63,7 +63,8 @@ qcpon_match(struct device *parent, void *match, void *aux)
{
struct spmi_attach_args *saa = aux;
- return OF_is_compatible(saa->sa_node, "qcom,pm8998-pon");
+ return (OF_is_compatible(saa->sa_node, "qcom,pm8998-pon") ||
+ OF_is_compatible(saa->sa_node, "qcom,pmk8350-pon"));
}
void
@@ -71,13 +72,7 @@ qcpon_attach(struct device *parent, struct device *self, void *aux)
{
struct spmi_attach_args *saa = aux;
struct qcpon_softc *sc = (struct qcpon_softc *)self;
- int node, reg;
-
- reg = OF_getpropint(saa->sa_node, "reg", -1);
- if (reg < 0) {
- printf(": can't find registers\n");
- return;
- }
+ int node;
sc->sc_node = saa->sa_node;
sc->sc_tag = saa->sa_tag;