Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2963803ybl; Fri, 20 Dec 2019 01:26:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwcGFMiYorN7jxzgKv+FXsdRXDglG2UzybANDB3hVPhMdWn5AzrE9F0Oszr75aP/waXTYcK X-Received: by 2002:a9d:da2:: with SMTP id 31mr13303568ots.319.1576833971734; Fri, 20 Dec 2019 01:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576833971; cv=none; d=google.com; s=arc-20160816; b=ZJ9b6yq0QRR/hfYBBCUF7+4UrvxJDIPn3bXwUwn/gYfB+DhemNBly4cK1yThTePnvX oNSHtbkDntES7ni1/80UX9kyrLH8A2MA5wLDU7pT2KTWQEgNr3v2vUezB5jnAvq8HA6a byPyahTnqxfFKDjs7xfnHTi8mi5R57oGjehasWgCOZG6ehsxbKNIBWMUA83i0j+j2mxH 8VuT5UGnLb0I0jkZU3hHrHi3LNnOXOAs8lNiZc9SI4wdqTDwk4uXIlrN6B1N9XYkCakM KW+F9XVc0hCnp9rVz9a9C8weI2cvARYcWNGbxLYYRLBo09SU/SwqCiN/v95ewuJ0VI5r TB0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=iW+E0xO4cl6Le/pRNkxzyx+ZKt3kccSYLfBkkXeukuc=; b=mIwyP/a3djMu8pot9Jf7oDcfoCRYLj5IIS8NGMPtmXry6XmBLqJ3e8GAjnM/Ri23mJ GN7wBmfLD7A9W/YVrT80QuN6B2Cap9yjEuVUMs25lNhe1+AuGT1s2HS6oKVdEbhbhOH2 GlMkdfvuPAiwpLxnYlI3XBtzH87zcOI6EGVVrx1ibUIhzcXbVIHCd2kHVBdZfkGJCHSD gBPTB0WSs0yd/Fw6FIvtRVKQECW2qmVLp0TjcqvHIVq1KDQ65o9G2Sz+/DdbwkZF465T BtKBJHeGIW/qYthXdhqyqmsfbWKx4VRWOB+NPgy8r1U96dG3BWRZc4uRX9iArdUeKXVQ a4pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=t3WLxxKL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w127si4398433oib.188.2019.12.20.01.26.00; Fri, 20 Dec 2019 01:26:11 -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=@gmail.com header.s=20161025 header.b=t3WLxxKL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727283AbfLTJZT (ORCPT + 99 others); Fri, 20 Dec 2019 04:25:19 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38142 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727169AbfLTJZS (ORCPT ); Fri, 20 Dec 2019 04:25:18 -0500 Received: by mail-ed1-f67.google.com with SMTP id i16so7583793edr.5; Fri, 20 Dec 2019 01:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iW+E0xO4cl6Le/pRNkxzyx+ZKt3kccSYLfBkkXeukuc=; b=t3WLxxKLD6EyG4OWlTU0Yqy9yEt2NHUh7m7Tfcpbw7RONe59MDpw+50lv3mxZSKIJL hFXjbe+NYTJdx7GcAuoatJSZY6X5abT1JOdQPSeCEWlcoXlPh1GUie/idKjswhEvESx4 LudnV3hZPi1nHjK0Pygnfvj9sb2j3V+bABKTAdFKhIum99YT5vZFibC8tW9eKaYW3A4h pgvFSXzcg+g2EtDOFqVXlRazJ6JaX4nhwfbzZzO15sroSIjpOonciRFrLQcir6bPE3nI DB3+AKlgjZbWm3Ld/YyVjTquc/MY3eOKrd+Koz6IQCvapMSLU7NlAMNZuxlNS4IyYGpJ +8xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iW+E0xO4cl6Le/pRNkxzyx+ZKt3kccSYLfBkkXeukuc=; b=fts/8h2pDs1uurcVxHu3WOvHVpFwwqV7UV95zjj7rHYOz4aD9XXy/MeZ306LSpvWBg bHrM52kP+XUym8mLNIKa/eeQleZASVv7sj4Qs9fn3dOmUJ3hLQF1rocbFqCvGXJq7Qeq XFTr0RxUz0GJ7wGrBcPzrQSArlXaQYKVMvS6UKEJbuQa8ygdrjfJk5PF5x7ECaq1gTKY s4QeuC6WcFM8GxIkKH9o5e+uzhxPlDQwjG3B/oUbTSYYYceOTIkqeNXy5paqMIQtt34F 56hfTpxhuyRVpRA7rpBQUKKIeg1Z5KitQU0iSLs5bJeGYG+pOj6w/qtwfs7P3OfvBTAU TO9w== X-Gm-Message-State: APjAAAUeVjiw1GPZ0vv+NLmf9nV+Dg1xLV8rIqa6YTUPSv2ShBlfsMsD YkM1TBdKeM2bBJlGdAa3VYuyfgq8Ht6Yr3g/hig= X-Received: by 2002:a05:6402:12d1:: with SMTP id k17mr14587034edx.291.1576833917042; Fri, 20 Dec 2019 01:25:17 -0800 (PST) MIME-Version: 1.0 References: <20191219124120.53754-1-radu_nicolae.pirea@upb.ro> <20191219130501.GA958@kunai> <6504123809effc310ade02dbb8a63f10db6b6c92.camel@upb.ro> In-Reply-To: <6504123809effc310ade02dbb8a63f10db6b6c92.camel@upb.ro> From: Shubhrajyoti Datta Date: Fri, 20 Dec 2019 14:55:05 +0530 Message-ID: Subject: Re: [PATCH] i2c: cadence: Added slave support To: Radu Pirea Cc: Wolfram Sang , linux-arm-kernel , linux-i2c , linux-kernel , Chirag Parekh , Michal Simek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > In cdns_i2c_master_xfer is done all the magic.