From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 D2B70C2D0C3 for ; Sat, 21 Dec 2019 17:59:24 +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 A48742070B for ; Sat, 21 Dec 2019 17:59:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dxEPbL90"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=upb.ro header.i=@upb.ro header.b="dZumlSXG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A48742070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=upb.ro Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SSb7El8niEUcAOK1ANnI6fZwwDhQ3XvHPWFqjfbaTOI=; b=dxEPbL900gG6ci XUGnUhtl//Exy87FtQZ5eP4PRSrfbSQEKiNvT74TA/5vze8H+5X4diwgyafV0+YiaR5Xqp5Wxoosj 1+SMojLaD2QrlneOX2ap0hZzI4YNMU/S0vLnE1sAyiDXiali3MnR+s4sOOglm4vsye0J8YtRGrsZS JXv7DrI7N2oVuAAZpbTCCDN0Kvreu1upVYBHTn3xQhsoCJDzwxB73cRx2crX8mlnnYp+1Rmcusd+5 EncbY0304J684SrtE/CHgKOeq6F+JuO+4kbaMhN1W6+r9tK4Pv+GfqhYi7oFPvwQzVmwyWxy1wdnP 5SdxN7/NS5OkD4VYH6NA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iij21-0001xP-JG; Sat, 21 Dec 2019 17:59:13 +0000 Received: from mail-sender210.upb.ro ([141.85.13.210] helo=mx.upb.ro) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iij1y-0001vU-Aw for linux-arm-kernel@lists.infradead.org; Sat, 21 Dec 2019 17:59:12 +0000 Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 4D484B56279B; Sat, 21 Dec 2019 19:58:55 +0200 (EET) Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id rS-wCd-Av3WE; Sat, 21 Dec 2019 19:58:53 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 89D7EB56279C; Sat, 21 Dec 2019 19:58:53 +0200 (EET) DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 89D7EB56279C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro; s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1576951133; bh=X+42fjabk+WLOB1bPd12eCpPGYMZu89kQtWGOPGu13I=; h=Message-ID:From:To:Date:MIME-Version; b=dZumlSXGZqk7S3vz0l3XH/E8QmWrWWByIdVC01rPRR7aoeOkRxc3uj07nRP6x9y7A PmxsYJL7TXSM3eOnSIIgub/Fue2hFRpmw8e+EJ6S77WDFyNbt/WlDuMA//J0hlldMu quytGl4caIT7zp5A4K1MSOTs2ONSdh17zC7RjTG0= X-Virus-Scanned: amavisd-new at upb.ro Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5FG3taiS2m5M; Sat, 21 Dec 2019 19:58:53 +0200 (EET) Received: from sabertoorh (unknown [86.120.75.237]) by mx.upb.ro (Postfix) with ESMTPSA id ECE47B56279B; Sat, 21 Dec 2019 19:58:52 +0200 (EET) Message-ID: <0a09d9ed5fc5ae6c651491dead5f81bfecdbca4b.camel@upb.ro> Subject: Re: [PATCH] i2c: cadence: Added slave support From: Radu Nicolae Pirea To: Shubhrajyoti Datta Date: Sat, 21 Dec 2019 19:58:50 +0200 In-Reply-To: References: <20191219124120.53754-1-radu_nicolae.pirea@upb.ro> <20191219130501.GA958@kunai> <6504123809effc310ade02dbb8a63f10db6b6c92.camel@upb.ro> User-Agent: Evolution 3.34.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191221_095910_717262_358FD75B X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel , Michal Simek , linux-i2c , linux-arm-kernel , Wolfram Sang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2019-12-20 at 14:55 +0530, Shubhrajyoti Datta wrote: > Hi , > > On Thu, Dec 19, 2019 at 7:00 PM Radu Pirea > wrote: > > On Thu, 2019-12-19 at 14:05 +0100, Wolfram Sang wrote: > > > > +/** > > > > + * enum cdns_i2c_mode - I2C Controller current operating mode > > > > + * > > > > + * @CDNS_I2C_MODE_SLAVE: I2C controller operating in > > > > slave > > > > mode > > > > + * @CDNS_I2C_MODE_MASTER: I2C Controller operating in > > > > master > > > > mode > > > > + */ > > > > > > Can't the hardware operate as master and slave at the same time? > > > > > > > Of course, it can. If the driver has a slave registered wait and > > listens and if the subsystem needs to use the controller as master, > > the > > driver changes the state of the controller to master, sends and > > reads > > data from the bus and after this change the state of the controller > > to > > slave. > > However that should be done only if no master is talking to the slave > right? Yes. The state of the slave must be IDLE, otherwise cdns_i2c_master_xfer will return -EAGAIN. > > > In cdns_i2c_master_xfer is done all the magic. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel