From nobody Sat Feb 17 19:22:29 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 4Tcdwk01khz53xmY; Sat, 17 Feb 2024 19:22:30 +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 4Tcdwj4Xzxz4Fdt; Sat, 17 Feb 2024 19:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708197749; 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=+X8nugIZmZyAHMYHDAeSxPftwnUqziRE12FM3aCDd2w=; b=Iaqfo7y++3e8VpZZlZazJMtrXNXeoyL3AtmWTUOJu+zsTB4yFxeyZcqemQfNZQCngbdGfL H6XvYunwjzbDyIaajzjeAlCq/Sy1evomtO7JAfHlR2jYLrQUV6pLsaRm+gNPzBzpBt5ZpX zRYidd+hKe6gOjolj0PbVKNS7XMl0duY8CdbwcuA1sLPc2QQ+WDemAl+fnpdX+cK2gJxwr 5PZ3yjeC6CxYYZ6QZ9mlW/w/+E5JADoMP1eXsOPQnW3VMpH5rclJMZu03LEinq2NrpCAvT jN4V/PHfLpDUtSQssjkgbKRRrD08m61Wa+42h+RAFTpnJ0de3P1r6uRsgVHafQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708197749; 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=+X8nugIZmZyAHMYHDAeSxPftwnUqziRE12FM3aCDd2w=; b=OOKSITSm6oX/eiMgJ7XPu8sVeQ6PdJgsmMc4wpCTKvfOiyHXAeYjiu4vRILDhNFjXiKMpp zQszDmy+0/UVEo1W7cWf9uOtML5wCbjZ8efmj/FnyllchpUf5z0REmv5ltITS18KTYsh/k ILMH/B21q2xgWoju6shCQCkypCS3w5gr/pn7mPhJTZJBZh90wNMO7s34O/ztRLPJrI+vWx JOnHGAlziHAnAK6m51HarEFgpbrPlWWqBPx6w+nET8/h9FV1QOmQGRWjCzBx0t5zeiip6j HHwWySS+mGG1PxMkemc5haGv6oQJ+MvNcFG+/qF8c6kx9sCrPZ/LH0oWu/NNTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708197749; a=rsa-sha256; cv=none; b=dV2pkkrIp2c+kCk+aWtQKdwjKsgeY+8nbLg8O/wfF5iNcncGosT9gKHug54mNppU6BMs3W lDwwGb7DVWgrX1FN3P/bMwL7AtXcqpKhLFEIV4n7f9cJVXINz2rjaeBiYBtQr0hOLUF0QC wI/5otuWYwFq+FA8hNO3sqOWl5LulASucU25/uELlKKTQFDRvYX/5/EcK+jS6hTtwHBOjr CKX5oTAz/XTxKlEXcS8og4M304FbVRiQTvA9cJrKkHvQTzvIs7e4nBR2Vy5Khx/YSZDENq QGd0xFrgBkLZoIZliT94GBmqs94WmptrOv3LXOE2pOg999BzXScDP8GwDx78wA== 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 4Tcdwj3dQJzKvT; Sat, 17 Feb 2024 19:22:29 +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 41HJMTES000252; Sat, 17 Feb 2024 19:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HJMTxk000249; Sat, 17 Feb 2024 19:22:29 GMT (envelope-from git) Date: Sat, 17 Feb 2024 19:22:29 GMT Message-Id: <202402171922.41HJMTxk000249@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: ac918f4354e0 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: ac918f4354e0dd6cfcf895d395f4c03918a72eed Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ac918f4354e0dd6cfcf895d395f4c03918a72eed commit ac918f4354e0dd6cfcf895d395f4c03918a72eed Author: Andriy Gapon AuthorDate: 2023-05-02 20:46:39 +0000 Commit: Andriy Gapon CommitDate: 2024-02-17 19:22:07 +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/ds1307.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/iicbus/ds1307.c b/sys/dev/iicbus/ds1307.c index f7a01e652390..8fe425f40a4a 100644 --- a/sys/dev/iicbus/ds1307.c +++ b/sys/dev/iicbus/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); }