From nobody Wed Dec 22 06:51:25 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 F00A418F77B5; Wed, 22 Dec 2021 06:51:25 +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 4JJkWK3SqFz3LRP; Wed, 22 Dec 2021 06:51:25 +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 4B73518844; Wed, 22 Dec 2021 06:51:25 +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 1BM6pPEZ035192; Wed, 22 Dec 2021 06:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BM6pP69035191; Wed, 22 Dec 2021 06:51:25 GMT (envelope-from git) Date: Wed, 22 Dec 2021 06:51:25 GMT Message-Id: <202112220651.1BM6pP69035191@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: c2c3617082ed - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c2c3617082edc7b92c08437774a49668d73bc8e1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640155885; 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=aj2UfdOWnlgdGpOE3Qg3JU6dzjizlZyaaIfnIX9Ewwg=; b=Ji1SfX0m8F35hvnQpU4SNpgifuZMiFH0PXX/fZ3VXwL4cAYB8wAThNTpSuYOEfzcP2tE6Y XI2b84EqGBzGEipNnnkVsBWZVMPkd2y4fwi6457C7J/r/hU9Ugy+q0XrY+N9VFTowRJNba ZLYRWuIBxWNjFFjfIbUvlmB9ZNMX3Ys86LMJi9VmTXoldCo4nraN7uJL1MliJNYzE4VLst 874NypfFGlrM7l68Uc/eTzr/c2Fa381mGxYStq0GteJPBjnvw/9qnhlShCNI9OjSDvyP5I ZAmF364RMwG7p84JIxbGNx9MBXlg8xUZXOgVP/hwX1fkU1ClWPPtEtFFRlGVBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640155885; a=rsa-sha256; cv=none; b=UrNnQibAxPRcF/bMLY5hEPeyMcNOKpDSMAYksGUGNMP8JRAKjNUGKhJKWe6p8f37Qpc+rY PPZawofucvYO65HgaD1rsAQQgkyQo4Ms9xnCalqwE8MV4S7k4JNGI7ViGDKGj9ZfwKFqXO f+5FiO2itkfybslDI2C6HcuauXhDoMkgT6d17utBfvdnqBCKHj9p/Ra99bSx9SRP4kyv4z 1gBlRnCVABcCN7A6xOFwIzeJI25jWXKjtiIQJIHHScOiwrSTv+G/X2m9us0H8yggy0oQWt wHuba5uqqfnUGNPEopWegq2rpLmo/WspffQvEXaBinSHqE0KKtB0SEwJSNt3Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=c2c3617082edc7b92c08437774a49668d73bc8e1 commit c2c3617082edc7b92c08437774a49668d73bc8e1 Author: Andriy Gapon AuthorDate: 2021-12-15 08:38:24 +0000 Commit: Andriy Gapon CommitDate: 2021-12-22 06:49:15 +0000 rk_i2c_transfer: use iicbus error codes instead of generic ones (cherry picked from commit 552503aca975ccab1b1f67f95f627e279db5826f) --- 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 8d2a3e0ead01..7b3ebb090fae 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -457,7 +457,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; } /* @@ -469,7 +469,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; } } @@ -528,7 +528,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",