From nobody Sat Feb 17 15:12:14 2024 X-Original-To: dev-commits-src-all@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 4TcXMy6q7Rz5BFYs; Sat, 17 Feb 2024 15:12:14 +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 4TcXMy6Ntxz4XxV; Sat, 17 Feb 2024 15:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708182734; 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=SeIdYOcqfIG6iIHLejXK+ZQZ7pBbYFvZZLtfrRfheXo=; b=AzaE/XBMYpCKxcx+ROjlPJoNOi2jb3WOe43VPu/xpFaa87C5MTwJnQl2LwQSmnJ+OWt+cO EmjH05lK6vOLu64cGTsIzlFIxjFRhiuU7qnODuTwAJvPdyLys6ksstw0+L9KGr61RXtOEr +Vd7mAb38lKdFbIiltBtT/RRSX/vV0Vd7xzoCefUivlNYewDJI1bHtHjrsrV6fjH8Rdaem VL4r9KHSbHhoyaly7DEKtuWIukknKwqOubebOSv7BNQaxT03EokxxRnaZLOJFQuy6vb9bl KoV2BvIHzQIieVpqYP2eNN4y0UuEPmd6OP4awvTcKvH3VlVq+04QMvC4lmLTMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708182734; 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=SeIdYOcqfIG6iIHLejXK+ZQZ7pBbYFvZZLtfrRfheXo=; b=csESPgtycfJOq/IQp8Kr0mgLKCPqGN0r7G/Ic3hMbQ7Ns5Przw5NTccFda2hDsZxSyTes7 UHZFUBVgnWEs24r4Q4pnxL663ZFBWuwErp7EwrTXNeSiyLIWonMRafZq6qi6j9PBnctAIM nYdNvsAhp52ki9826SSd4YYNjkTiXkLDKorg7nXBaZVCTpJYYov99rzNLY4g1dxhoReVWh sGm1X0BBtDf6p3g4Xq3G+NHfKa2FECfEn9/7O2rnrLCVQqQ0+gpSqhuD8q3p63Sr7mJLyR EqQUf+LNQ8HEj4semyVb3NAX0VHxWRGbzp/YAl46gO9Y5PTpusg/Hg+8zm2wow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708182734; a=rsa-sha256; cv=none; b=fg2WHL19vSXOqoqwZxgtA5U/gp8nix4+qkmLN8iSoTHzYVZspibHdWk0pVN0/Ms35Voq5B xAjFx9WMrNRD5vwB6ooYtIxY9Sjkqntm5thUrmXlPRtwXy/Z64Kex06Ccm1AN7cea0pNGk wKolEKUZhg3afomSrxBwSFGgC99t9/V0AJCn8hc5AGp0shCgB5fvX9pHwkXy3W4k2G5y7v IIlMlr37MNRLe+Tcm52iq+vgs+1yjaoeuO4y1UX4cOw2n7JjrtBdlAJrGYSYNlhqlN2nBb NC5DiQ0TWMilcjBC9BWI4I6kxoMi7CWF1IqASQeZeKHIT5gT3wMfEi0PomKefA== 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 4TcXMy5S3Jz1CG0; Sat, 17 Feb 2024 15:12:14 +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 41HFCEl8077038; Sat, 17 Feb 2024 15:12:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HFCEd0077035; Sat, 17 Feb 2024 15:12:14 GMT (envelope-from git) Date: Sat, 17 Feb 2024 15:12:14 GMT Message-Id: <202402171512.41HFCEd0077035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 1efdba436281 - stable/14 - ds1307: restore hints-based configuration on FDT systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1efdba436281337bfd54e941cf60c74492780598 Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=1efdba436281337bfd54e941cf60c74492780598 commit 1efdba436281337bfd54e941cf60c74492780598 Author: Andriy Gapon AuthorDate: 2023-05-02 20:46:39 +0000 Commit: Andriy Gapon CommitDate: 2024-02-17 14:15:10 +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 (cherry picked from commit 34694f3da7f9537c34b1878206c65a8cda16c6c0) --- 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); }