From nobody Wed Dec 22 06:59:15 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 3D10818FA6C9; Wed, 22 Dec 2021 06:59:16 +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 4JJkhM5WyRz3PMd; Wed, 22 Dec 2021 06:59:15 +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 9D9D418DB5; Wed, 22 Dec 2021 06:59:15 +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 1BM6xFD7036808; Wed, 22 Dec 2021 06:59:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BM6xFEQ036807; Wed, 22 Dec 2021 06:59:15 GMT (envelope-from git) Date: Wed, 22 Dec 2021 06:59:15 GMT Message-Id: <202112220659.1BM6xFEQ036807@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: 2dae9e96a70f - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 2dae9e96a70f3a4c0c4fc3f88e9e110a744f7135 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640156355; 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=RK66aFOiq2Bv24TWZwFiI2EX1ZxxofDPNBe3Ejb8IFo=; b=bAL0b3yVZrqgeZrhaYjvPiNjgpfDbsLEGiQVxfRxPMh/sOlU8Ktt39INYGUgIC2NHvQ41D cSSlq0ueeqKoxFazUNgCnfX8jb51eqITS7+4K65tE3SKLUXxl1iHVVSoeCvlFEWgUPYLvp R891K7hmt3qj9PuMa6LBG453UsOwcpMNQvjIGHum1WX0K9A7niwOIv2K1kCsaROUzoiTH/ 4SRMKYhkkP4shHFRieYlezC43JSXZfBubqoiEP1LocoGukdZkne3BbViaAlZYnSzJWisKz yFaFdhZzDx9b+FhCPqLRN8R42T/3pFWm78YDjGej8VZ8T5473u8xMNDwR3vYqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640156355; a=rsa-sha256; cv=none; b=ng4rPEjNg9e+UTkhyhHD0NYGcKrmEdzYtQDNuOe4nTiyeXVh/49Tc/uoVwRdAYZBI6BD8v GlYApZD0JLpp7z1kRJFCMlE/+m2mOvv01xDfdjfWEYImwMe3ATU0+putHp1ov93kR39QPc VxNnsv2ilZ4lsWIcFIA+XJOByT4KNgGAR4CFBP5L3zNLfSte7SgvbbA7Wtv7/Ly+eAI1xF rFgIGF1JsEiwyVfrBo/aQsmtdJCh/1+Ny8Ekc9t/XdlkO32UEw9arsWCZsAwusCTQ31LgT CBW3lrG5KfNB4cMd7jpoyczCSbHXqHfSs3CwqPEa4N4H44kfHMdihFSkctyJkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=2dae9e96a70f3a4c0c4fc3f88e9e110a744f7135 commit 2dae9e96a70f3a4c0c4fc3f88e9e110a744f7135 Author: Andriy Gapon AuthorDate: 2021-12-15 08:38:24 +0000 Commit: Andriy Gapon CommitDate: 2021-12-22 06:57:00 +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 1a70f58ba02f..5bf37b906044 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -459,7 +459,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; } /* @@ -471,7 +471,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; } } @@ -530,7 +530,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",