From nobody Wed Dec 15 11:16:39 2021 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 49D7E18E99A5; Wed, 15 Dec 2021 11:16:40 +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 4JDXkb5sFQz4qt3; Wed, 15 Dec 2021 11:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A955C1AEC0; Wed, 15 Dec 2021 11:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BFBGdB2081575; Wed, 15 Dec 2021 11:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BFBGdsc081574; Wed, 15 Dec 2021 11:16:39 GMT (envelope-from git) Date: Wed, 15 Dec 2021 11:16:39 GMT Message-Id: <202112151116.1BFBGdsc081574@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: 552503aca975 - main - rk_i2c_transfer: use iicbus error codes instead of generic ones 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/main X-Git-Reftype: branch X-Git-Commit: 552503aca975ccab1b1f67f95f627e279db5826f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639566999; 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=KRmTTlcLtRnTZHL33xctEQTmklxTF2aK9Fn6ML9+LPY=; b=jQfu+WnA390H4QufvxxYytaNPXYQmQ451DN46tfoeskpcI1WB+/jW9k2yqXtCh/0u//jMM iMAxyKP5SiRKTQ+qjY8ST2w7ZlJG/tamFVaIfi/sF5g0sZjPI9sCCunB5zrBQHidfh1TED vYiDPdSp9Udams2jLypghcpjEESQhV4s3fcpXnn/niY9lWwphKuFHX4u3PXDGA27fpZBXS JvMy7RNVFzlBxly16Q37lHEboWBTD0P7zfMN0gTXoIGKdaKmp4+q8MHryHlioMig3DSPvS w4oqqX+bIBJvwRKnXQNS0pzH2K0kVQKnzOnK24lyzhvqJRBnTcWrgNM8WYpEPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639566999; a=rsa-sha256; cv=none; b=Eu9uqfpqrCBXwiNVC1sqAHAST5nWnmVXbhTcIJqUwrDmi68UUCaiFls8lW8Et+FYZju1dw gvzrmYY0UowYc7B9jMrtuaQOBjSrRglXlLVl5/fJJ8lkvnGcvWwEUD+LwPKCgSzLIDNbtR Kd5xQKZO85mmTuzZQHkQoYGHTcnQ8pT1MS95gUXklETJpBd83xvK0F/weUlei7dUOrVQ1v 6+N/gZiC5UtK2749ruxd1A1ilhg69MDAJfR9XLwGXduOeGQxspJlkdgWLMq75aCRDg3ghZ EkuSZk5aFXUCJxCcQmG3kcwXCIMVtDp1P2vtcxL453oTEk13CrdZ2V491jw4EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=552503aca975ccab1b1f67f95f627e279db5826f commit 552503aca975ccab1b1f67f95f627e279db5826f Author: Andriy Gapon AuthorDate: 2021-12-15 08:38:24 +0000 Commit: Andriy Gapon CommitDate: 2021-12-15 11:14:56 +0000 rk_i2c_transfer: use iicbus error codes instead of generic ones MFC after: 1 week --- sys/arm64/rockchip/rk_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/arm64/rockchip/rk_i2c.c index 11aaf51f7e62..35257a2fe161 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -480,7 +480,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) /* Validate parameters. */ if (msgs == NULL || msgs[i].buf == NULL || msgs[i].len == 0) { - err = EINVAL; + err = IIC_ENOTSUPP; break; } /* @@ -492,7 +492,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) ((msgs[i].flags & IIC_M_RD) != (msgs[i + 1].flags & IIC_M_RD) || (msgs[i].slave != msgs[i + 1].slave))) { - err = EINVAL; + err = IIC_ENOTSUPP; break; } } @@ -551,7 +551,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) DELAY(1000); } if (timeout <= 0) - err = ETIMEDOUT; + err = IIC_ETIMEOUT; } else { while (err == 0 && sc->transfer_done != 1) { err = msleep(sc, &sc->mtx, PZERO, "rk_i2c",