Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1935366ybl; Thu, 19 Dec 2019 05:30:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxbdkGCTVWSPUc1SRLR7qUJ71W+GHUTCA3TZ3S0vxNd7AWol7ZjxPEnRkwJ999nOufPtNpE X-Received: by 2002:a9d:754a:: with SMTP id b10mr8891485otl.273.1576762238878; Thu, 19 Dec 2019 05:30:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576762238; cv=none; d=google.com; s=arc-20160816; b=wtrZ49+uhb/M7+bVsMyEgrNmm++QSjEZtTmOYDZU0DcyI669OLcoV11gN3gFbaB446 C1d84w9XX5w35CcDGC4D0c+E5Tn7sYNY4hsrYkWU77qLk20fOr29bJf/RJ10y7+lsOe8 Lp36/NtjhMamDQ31oscDnmG9LahW0RcFiiCmCyK83k5L6QgOwG+KWLh++nYWjMuDly6Z /ZQHKt/GjgqbAT6cfMs8da3RPhG2XxZcxyjRR/TWmKGCAR4SDUYk4vlp8+Pqdfw82mXM t5Xh4Lh3tGS7SSND0+E3rZma0D2ppg9Z4m3t9oHCTsi3lFN9jZs8TptjcXhWqBwPSyRT EQcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-filter; bh=5E2ub4lgVn1Y+WESvtSyxuhO9OUVpYxCqfwsPhkG4No=; b=VUwSZD1LXEjXSfKV49M0SiNr+7at0RvRZZUy2l98qbuVCUvnOLzgiFNSxTxPASe+IB QeTHosckIotc3oc84WO4BZDSZwNfp8b0jfsxmBeR9/otV9qbOPGnFnA8AA3493DiCmFh bPtKm4lo+3IjJrTzMpdp1q3LHv7vmUUCCUPr5YW3ZXFcDM3Xf85MDmTOa6MIptx3DLw2 rDGVajqLj8K7umLqdvGW2HMmKMdaNOAqzZwffRgEd4NaX64G1HW0hCtgJMZV71dcXKfE jqZXysDD4UxuH0b7AdulcR/tCDgfe/iWHn7Fba2AlQI+F+BCggHmu4RN9deS/M8Dnttp D+vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@upb.ro header.s=96342B8A-77E4-11E5-BA93-D93D0963A2DF header.b=SEa33hgL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si115325oiv.197.2019.12.19.05.30.24; Thu, 19 Dec 2019 05:30:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@upb.ro header.s=96342B8A-77E4-11E5-BA93-D93D0963A2DF header.b=SEa33hgL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbfLSN3j (ORCPT + 99 others); Thu, 19 Dec 2019 08:29:39 -0500 Received: from mail-sender250.upb.ro ([141.85.13.250]:49320 "EHLO mx.upb.ro" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726695AbfLSN3j (ORCPT ); Thu, 19 Dec 2019 08:29:39 -0500 Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 11E21B561CCE; Thu, 19 Dec 2019 15:29:36 +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 t9TArq6fxlRF; Thu, 19 Dec 2019 15:29:34 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 53944B561E4B; Thu, 19 Dec 2019 15:29:34 +0200 (EET) DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 53944B561E4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro; s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1576762174; bh=5E2ub4lgVn1Y+WESvtSyxuhO9OUVpYxCqfwsPhkG4No=; h=Message-ID:From:To:Date:MIME-Version; b=SEa33hgLNAh3ZQ4qwSWozHnUBlNwAEA1fgNx9BXHD6UFNDX3juD9VZYUUG4L3PEV/ W8K0oOa3HP+ohpyOS+kWPiGW/08PHnUxCp7Y1kYYUIObydWs9WznDO7qoAptV6ntXG Mk9ctB3U5LeJBfGabafvtnL8nkFnedFIYT9rnAlw= 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 0VemASvl5qg3; Thu, 19 Dec 2019 15:29:34 +0200 (EET) Received: from nemo (unknown [90.69.82.201]) by mx.upb.ro (Postfix) with ESMTPSA id A2CD3B561CCE; Thu, 19 Dec 2019 15:29:33 +0200 (EET) Message-ID: <6504123809effc310ade02dbb8a63f10db6b6c92.camel@upb.ro> Subject: Re: [PATCH] i2c: cadence: Added slave support From: Radu Pirea To: Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Chirag Parekh , Michal Simek Date: Thu, 19 Dec 2019 15:29:30 +0200 In-Reply-To: <20191219130501.GA958@kunai> References: <20191219124120.53754-1-radu_nicolae.pirea@upb.ro> <20191219130501.GA958@kunai> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. In cdns_i2c_master_xfer is done all the magic.