From patchwork Mon May 31 13:19:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raviteja Narayanam X-Patchwork-Id: 12289387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8744C47080 for ; Mon, 31 May 2021 13:25:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F20D61443 for ; Mon, 31 May 2021 13:25:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F20D61443 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xCknq5YR6AdQppuzJlBh+JzGjKWq2nVvnM0xtZr0Afg=; b=0RjScfIT7LWZ32 5gD+jwUu9jnHZ0FUbnQFAyWJgaadauZXr3SmHsV6Gb/c1Jv6lc/QIWbAukMPe05Pg/jg4eeSmAjqF G/Ic4A4jeQYhcsK8Mbd0BNSzoLB5eI1ASM+pyfjkkcBkxOFr10qhuXzYHYPwIDo8aT/RQXNVGFZNC WFjjFsDIYdmfFoG1a4hiKWPwDCMpyeD/kqrmSzmdcQMUXzUA1X/tFFrbBZsZPXhiG5+N1TSta6AgS aXIUkMy6UO92/bDcX1DEjBoD54dQne8mbRjZPMFHvJ4xSwBBoAW1M3UZiEhrjijBVVFCPAWHE5khv 1Sl/n3vlNatQBB54pUqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnhsp-00CIi4-Aq; Mon, 31 May 2021 13:23:08 +0000 Received: from mail-co1nam11on2051.outbound.protection.outlook.com ([40.107.220.51] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnhr8-00CICK-3g for linux-arm-kernel@lists.infradead.org; Mon, 31 May 2021 13:21:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KuyNRAIbmVAFdwl8d4e5upihZK78q2GDvJL9mb96BVZZ2dcrKrWXr8ryuXXuJmK9RaIbV61CD82OrHWZJmHlCjE5XD0Y5b0mA0ZKQ5Q5MDfw6UyvJxXRulj5lEemEIlRgE2lAZq0PR7ug5uutEPaRb2kdzywnrUG6JTd45M3/zTod9AHfZGoVdFWPwPmVNvizlFGgEhRwAkk0fL7/NVto5jNCCkoeKDQ9qV+PEZ7M6GIefjm/82RSlTnEJ5Di6zljpRX9tmriB3e26mqstBuefPdJ94f2ec4QncAZeBQFphxZ9bOpLKPY5wMy3BGkLWYB1VPo7jFqVYZkDJDGzYpQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ClKogobnQcNSwgLE99C4BZTqFyy1HYLlq1HIx6KRyvA=; b=LW8asUwBcP1ij5TvXz7D0MMMNTSkFoS6s60y+/emTWSNxauEyXSzCjYi/gLvKa/ougxiK9vYumCsOUoDYsCInBE7psyrLnIpNXrer3JI5EnkFq4yNfiNV84MnuKANqHNjc45mSCEyR7mdmbtccICIrmaKcVmpfSeEJyVQwDQCKjbHpbawd3uQMtLQQPV0WDBc6IvtA2Loh4xqgFSJKvpxa+QONGD9NCmn55L4GxHmvHOD75A4m7mklFL8Jqem9GIGxRP2JKV0/iBjlJOfM+KBYurRnxw9xd6qQ+H+NpVRHnVvaFfIDqro5WJJNKk0QE3FoiZCDZt6cYJJ0RuXWphMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ClKogobnQcNSwgLE99C4BZTqFyy1HYLlq1HIx6KRyvA=; b=gQ5CxCMg558eZZQK4SUeWoWID/LxRkEcc1EI0xxpRlpE+ozSGdfrkn8aUFmQ5o8aHBYjD//b4amSmdY9VxHttF81LZw60wh7Zp+JjFm1FtiWwSnWqzE/BsWYSsM8qN7r7OEcq+YDY05FpeO+hjmljFGDyhyhukCyShI5McixNyU= Received: from SN6PR04CA0089.namprd04.prod.outlook.com (2603:10b6:805:f2::30) by MN2PR02MB6766.namprd02.prod.outlook.com (2603:10b6:208:1dc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Mon, 31 May 2021 13:21:19 +0000 Received: from SN1NAM02FT0018.eop-nam02.prod.protection.outlook.com (2603:10b6:805:f2:cafe::db) by SN6PR04CA0089.outlook.office365.com (2603:10b6:805:f2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Mon, 31 May 2021 13:21:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0018.mail.protection.outlook.com (10.97.5.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4150.30 via Frontend Transport; Mon, 31 May 2021 13:21:19 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 31 May 2021 06:20:47 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Mon, 31 May 2021 06:20:47 -0700 Received: from [10.140.6.25] (port=53014 helo=xhdnagasure40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lnhqX-0004GE-Ne; Mon, 31 May 2021 06:20:46 -0700 From: Raviteja Narayanam To: , CC: , , , , Shubhrajyoti Datta , Raviteja Narayanam Subject: [PATCH 05/10] i2c: xiic: Return value of xiic_reinit Date: Mon, 31 May 2021 07:19:43 -0600 Message-ID: <20210531131948.19477-6-raviteja.narayanam@xilinx.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210531131948.19477-1-raviteja.narayanam@xilinx.com> References: <20210531131948.19477-1-raviteja.narayanam@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b2e8fb6-728f-4cdc-140b-08d92436fa0d X-MS-TrafficTypeDiagnostic: MN2PR02MB6766: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E3vUVEp3RjPrwZu/Xw84nU1ahOl8HfqiJD8zYnr4UiO3EPiCJxqHJaEjNjpUaDlpBOAuO+n9PEfX79/0STL9GYAb/9mRIYFr6mZ9oL1g9D6r3oIQHoqvuMt0iNKyHNgrMaL5oYKeyP91K5ArZQd3cOEDzNFa3He4noICxBDHhA+G1A0/MSu7fBF/3HcvkwdYXLSB6Mm+pnzdjJK69S8M7vBH7OhmnyNhdOjo25mjd1E59A5pqP3oQAT8WA+O63kdZe4k/fWQVipEKdgKjiBXlNfJvozb7PEx9mA5VvghwIEh28HsBYH/wh0e1AWVnxRr7vmmIeA2YkSCr7UptEslNSMl+euFtrDot+Y4P+z0pr2U107ik7wqt4jev8ybkR7LRREaTb0NGxPjnPivGiepZx9VTlEHWMz5C5B/Z32uTN3GeG3XQ1MhY8fbvFsHQXWURF7IRvLDSe0WAa59bXDJTJRWWyCa+RxntbhxYXiF4WkHLft5HJdzzVMGXXo9dmYiszGx538pywYj4BgSocs2k6j4snviKeRKXhTigNm4EOeEorBN0hULunQJ+EK6sSqrnMJg9ihcoKWxoJF0RVadqcnSd5b6BQSFdbZ/6oEcEtvwJQi9UZuGEPaUL2qNeY1SHeEWxnw/cQDyfGQLpr1oFaU1znSzU4FZnELZUjkFmi8sX3YbobNqJdYfE3Fwr3vX X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(136003)(346002)(396003)(39860400002)(376002)(36840700001)(46966006)(7696005)(2616005)(44832011)(5660300002)(26005)(36756003)(336012)(478600001)(426003)(9786002)(6636002)(70206006)(110136005)(47076005)(54906003)(8676002)(4326008)(2906002)(82310400003)(83380400001)(82740400003)(1076003)(8936002)(186003)(36906005)(70586007)(316002)(107886003)(36860700001)(7636003)(6666004)(356005)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2021 13:21:19.0831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b2e8fb6-728f-4cdc-140b-08d92436fa0d X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0018.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6766 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210531_062122_200149_02A2A336 X-CRM114-Status: GOOD ( 13.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Shubhrajyoti Datta Check the return value of xiic_reinit. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Raviteja Narayanam --- drivers/i2c/busses/i2c-xiic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 51b5fd5768db..b2ac76d94212 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -556,6 +556,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id) struct xiic_i2c *i2c = dev_id; u32 pend, isr, ier; u32 clr = 0; + int ret; /* Get the interrupt Status from the IPIF. There is no clearing of * interrupts in the IPIF. Interrupts must be cleared at the source. @@ -592,7 +593,9 @@ static irqreturn_t xiic_process(int irq, void *dev_id) * fifos and the next message is a TX with len 0 (only addr) * reset the IP instead of just flush fifos */ - xiic_reinit(i2c); + ret = xiic_reinit(i2c); + if (!ret) + dev_dbg(i2c->adap.dev.parent, "reinit failed\n"); if (i2c->rx_msg) xiic_wakeup(i2c, STATE_ERROR);