From a639195ed164f2dcbc3fedd4b1196eba987b76e2 Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 24 Apr 2023 14:34:13 +0000 Subject: [PATCH] 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. --- sys/dev/fdt/qcpon.c | 13 ++++--------- 1 file 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 * @@ -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; -- 2.20.1