From nobody Thu Apr 11 18:42:41 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 4VFpTs1z82z5HtCd; Thu, 11 Apr 2024 18:42:41 +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 4VFpTs1Tr4z4hqN; Thu, 11 Apr 2024 18:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712860961; 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=QkJHqj/RX59a51XbBec/tV2sYaAJMmc5vXmAQz6u57c=; b=bvqlTAtOKVxrs7b9LKAGhYaT6L3alxyJCwtRZiFqPv8thdNZTrDkFUmzeusM6114Av4qtV 5tco7T7WnqZMoLmTkvsKeBr3SR4p6/wgkQZ/P8tetjfI4tMudfWqNEEGeIOkFdN2I6Ae4f Y2CwZLfGSmwcYvP2og9snqVuKWKixVnG+0WHlGn6V5Q3NLKTdKR/xFXE5gXZB+WlmArolT tf4C9o/oeeEIaIPPZ4RTGa9Z4t1JRnUqyD5NCObJIz7pf7L8UekcCARn3UNAFxz6Vbt5A7 W+25WNNlsJLmBFyKmQEEdB1+MBSedsKEN49coemMlVGVPQl9u+2zSykz+zrUow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712860961; a=rsa-sha256; cv=none; b=d31sWoGTL8UDQ5eW54v0tUp5TTRsIKIx6YWTFIzODy9aioLwda9VbFv2rECSRJuPmlqEJP pIyx02hPtX8zs9tzbYm0KtajuUw5kxxoLePupAH9cEz8mKipdg6dKTVOR+YCMYGNeWIRnu XnTzsZxnkhLUDyA+hGYSvAZoBWcsM2Rv9IqLgf4oMcx058wuPU9zCcrSDuo9ELKyU+BiHb 7jwO+9JcKr7iMFpJsqDjZwdBJOdkWpyOQ4/mUe8m/Aix26vl4RtRhoxuRdxS7fsT365XpP 8g2GFFbbnJjoM1J384icZmGPtAG6CDd7rBt/+6BTHPMdDPt3qIfy5PhCuEiNIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712860961; 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=QkJHqj/RX59a51XbBec/tV2sYaAJMmc5vXmAQz6u57c=; b=n0n6W61gS2MW7zY/y9A/Ws8SyQXaqsGPgaef/JssnySueiGJ92fCSgJCL1Hz2a3BTYPMBc 2nVWfEOiX/4CgIILx1kRbgGgjl6V3jW76S25OjR5zQwtMZTWxcTlVQG2gwDItGv+sT5wQw J6hoWQqqh50hJO7kEzAz+PzpQ9SyL+Vemht+Q4toGlSnc84lBrKIk+sfbTE420Y4LLQMO2 +jinx5BXLTY5wBT3i9Z31feSAHEdsjiBMREAx7H1iw08lTDLF1vq72/6GGtrcOGyBCvZtu VzMPpXdFHTICj7Y6WV6SLAAtdgYlPXDkqQlxZHKOF28ZaL15w3ZMhcJdqyMqVQ== 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 4VFpTs0n9nzHRd; Thu, 11 Apr 2024 18:42:41 +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 43BIgfvp089312; Thu, 11 Apr 2024 18:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43BIgfin089309; Thu, 11 Apr 2024 18:42:41 GMT (envelope-from git) Date: Thu, 11 Apr 2024 18:42:41 GMT Message-Id: <202404111842.43BIgfin089309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: b724c8292df5 - main - ds1307: use the correct Microchip part number in enum and device description 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: dev-commits-src-all+owner@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: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b724c8292df5d12aa02a98da3466cde6eb5a6008 Auto-Submitted: auto-generated The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=b724c8292df5d12aa02a98da3466cde6eb5a6008 commit b724c8292df5d12aa02a98da3466cde6eb5a6008 Author: Josef 'Jeff' Sipek AuthorDate: 2024-04-11 17:41:18 +0000 Commit: Toomas Soome CommitDate: 2024-03-21 02:53:58 +0000 ds1307: use the correct Microchip part number in enum and device description During a minor refactoring two years ago (part of 2486b446), the newly created enum used the wrong part number - MCP7491x instead of MCP7941x. The device description string got the same transposition of digits. This change swaps the digits back to what they should be. Reviewed by: emaste, tsoome, imp Differential Revision: https://reviews.freebsd.org/D44436 --- sys/dev/iicbus/rtc/ds1307.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/iicbus/rtc/ds1307.c b/sys/dev/iicbus/rtc/ds1307.c index cc232bae0e94..bf247b618c2c 100644 --- a/sys/dev/iicbus/rtc/ds1307.c +++ b/sys/dev/iicbus/rtc/ds1307.c @@ -56,7 +56,7 @@ enum { TYPE_DS1307, TYPE_MAXIM1307, - TYPE_MICROCHIP_MCP7491X, + TYPE_MICROCHIP_MCP7941X, TYPE_EPSON_RX8035, TYPE_COUNT }; @@ -75,7 +75,7 @@ static void ds1307_start(void *); static const struct ofw_compat_data ds1307_compat_data[] = { {"dallas,ds1307", TYPE_DS1307}, {"maxim,ds1307", TYPE_MAXIM1307}, - {"microchip,mcp7941x", TYPE_MICROCHIP_MCP7491X}, + {"microchip,mcp7941x", TYPE_MICROCHIP_MCP7941X}, {"epson,rx8035", TYPE_EPSON_RX8035}, { NULL, 0 } }; @@ -136,7 +136,7 @@ ds1307_sqwe_sysctl(SYSCTL_HANDLER_ARGS) error = ds1307_ctrl_read(sc); if (error != 0) return (error); - if (sc->chiptype == TYPE_MICROCHIP_MCP7491X) + if (sc->chiptype == TYPE_MICROCHIP_MCP7941X) sqwe_bit = MCP7941X_CTRL_SQWE; else sqwe_bit = DS1307_CTRL_SQWE; @@ -233,8 +233,8 @@ ds1307_probe(device_t dev) case TYPE_MAXIM1307: device_set_desc(dev, "Maxim DS1307"); break; - case TYPE_MICROCHIP_MCP7491X: - device_set_desc(dev, "Microchip MCP7491X"); + case TYPE_MICROCHIP_MCP7941X: + device_set_desc(dev, "Microchip MCP7941X"); break; case TYPE_EPSON_RX8035: device_set_desc(dev, "Epson RX-8035"); @@ -382,7 +382,7 @@ static bool is_dev_time_valid(struct ds1307_softc *sc) } switch (sc->chiptype) { - case TYPE_MICROCHIP_MCP7491X: + case TYPE_MICROCHIP_MCP7941X: osc_en = 0x80; break; default: @@ -538,7 +538,7 @@ ds1307_settime(device_t dev, struct timespec *ts) data[DS1307_WEEKDAY] = bct.dow; data[DS1307_MONTH] = bct.mon; data[DS1307_YEAR] = bct.year & 0xff; - if (sc->chiptype == TYPE_MICROCHIP_MCP7491X) { + if (sc->chiptype == TYPE_MICROCHIP_MCP7941X) { data[DS1307_SECS] |= MCP7941X_SECS_ST; data[DS1307_WEEKDAY] |= MCP7941X_WEEKDAY_VBATEN; year = bcd2bin(bct.year >> 8) * 100 + bcd2bin(bct.year & 0xff);