From nobody Sun Jan 28 11:09:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN7wm3Ynyz58Mb2; Sun, 28 Jan 2024 11:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TN7wm33znz4g7y; Sun, 28 Jan 2024 11:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1Q3wpYNtkjolkMsEtJDHIu89KT8ISAXxNFVbqApd8w=; b=dZeArt+f4AG0xDkL+aGFMSbnW02s1XwgxoF3K62pY1mMk3LkV4MQX1ptrSTp4wEy1GIXSg i8ZxGEAth8Q0atBf0//p83/3PE+o7ue8Jd+XZO1L1d4L2wFm7jjj3kdp+bztT4F0njTfpo eOWotR0p/s1uctz6gpjcdErXlx4MtaSjVDSPiY+pn78w3PsQl5zRbYifDWAxiokMceW8ui fOul1IP2WV/5AaM2VE1zn+g5L9GhrMW/YZNuhvtetbP/Sc/LnDJiun8STBeGZUqYqJny+p euu8mf5bQi+HY4dQgRAiKRD5jYoTEr8Tb/zRCCW4qTLUp6s7CmoWHJEIf9ux9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1Q3wpYNtkjolkMsEtJDHIu89KT8ISAXxNFVbqApd8w=; b=beZGodRcj53ulC+MsLJxckusXAv26UXR9B1nit6WivAgFtXefA6CsnzM0vR2er51MTD3MP kc2p6b+J/JsTiKOVDAq7gRca6rUEQfJhgAEWs3IS5dUKVXvMmRdxCAJj8G/ybE9gAmV0G2 qYKCFvrL1XnKFDn42ZXlRqZeILhhcucu/HavToRbgF0h9YVMZSh1eixzEV6jEnvSsIaCTI Zk2I655KSnDhLXzMp+uOdPSte7GO9EAEJA+u0YAqwW1aDCtCOSnaCYMrxkEOwiGdNfobtr nEy1zCb7aq7sXM2PWNjfxkwzl674VXrlt12FEpDy02mjoVYRTPd+HppHbi4Uwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706440152; a=rsa-sha256; cv=none; b=RiA1RxvMnGt2/bPdfWkYyUYhkZIb1wljCmY3Ekz524h+8eZrZWTQXfHknqOLSv0pn8cXCF cAS0a++wJUlxIEv249NAsHzxL4OJR0C0bxHRflaYLEhKSMZYbTgtokV5jcQzWUcVsd6jlT 8XUiWxOrOatkQaaK9BgKW4fgIn3mAnbfOQHp1FAlxaKkKWKwKpRSZzKUZ3MF1jeXZkgCwU ulifZFV3tZYcys8wFEApKBEIhFUHOdxhOp1JAjZZSNb7ZKe1k98Mq04Kk92OtyAlpdeJe8 KWuNGZ7TCPRjmD+eTrs9T/yfCMw5tXvIV37kxqaxwhE1ddDwwX4PQn9HtSfxdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN7wm27Zrz15C1; Sun, 28 Jan 2024 11:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40SB9CiN020605; Sun, 28 Jan 2024 11:09:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SB9CYp020602; Sun, 28 Jan 2024 11:09:12 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:09:12 GMT Message-Id: <202401281109.40SB9CYp020602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 34694f3da7f9 - main - ds1307: restore hints-based configuration on FDT systems List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34694f3da7f9537c34b1878206c65a8cda16c6c0 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=34694f3da7f9537c34b1878206c65a8cda16c6c0 commit 34694f3da7f9537c34b1878206c65a8cda16c6c0 Author: Andriy Gapon AuthorDate: 2023-05-02 20:46:39 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 10:45:57 +0000 ds1307: restore hints-based configuration on FDT systems Fall-through to non-FDT probe code if no matching device node is found. While here, fix indentation of the switch statement. Also, make the device description for the hints-based attachment the same as for FDT attachment. Fixes: 2486b446db ds1307: add support for the EPSON RX-8035SA I2C RTC --- sys/dev/iicbus/rtc/ds1307.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/iicbus/rtc/ds1307.c b/sys/dev/iicbus/rtc/ds1307.c index e8d24880571c..cc232bae0e94 100644 --- a/sys/dev/iicbus/rtc/ds1307.c +++ b/sys/dev/iicbus/rtc/ds1307.c @@ -225,10 +225,8 @@ ds1307_probe(device_t dev) return (ENXIO); compat = ofw_bus_search_compatible(dev, ds1307_compat_data); - if (compat->ocd_str == NULL) - return (ENXIO); - - switch(compat->ocd_data) { + if (compat->ocd_str != NULL) { + switch(compat->ocd_data) { case TYPE_DS1307: device_set_desc(dev, "Dallas DS1307"); break; @@ -244,11 +242,12 @@ ds1307_probe(device_t dev) default: device_set_desc(dev, "Unknown DS1307-like device"); break; + } + return (BUS_PROBE_DEFAULT); } - return (BUS_PROBE_DEFAULT); #endif - device_set_desc(dev, "Maxim DS1307 RTC"); + device_set_desc(dev, "Maxim DS1307"); return (BUS_PROBE_NOWILDCARD); }