From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932866AbcLGS7O (ORCPT ); Wed, 7 Dec 2016 13:59:14 -0500 Received: from mga05.intel.com ([192.55.52.43]:44812 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932839AbcLGS7M (ORCPT ); Wed, 7 Dec 2016 13:59:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,315,1477983600"; d="scan'208";a="909798089" Message-ID: <1481137136.30772.8.camel@linux.intel.com> Subject: Re: [PATCH v4 1/5] i2c: designware: Refactoring of the i2c-designware From: Andy Shevchenko To: Luis Oliveira , wsa@the-dreams.de, robh+dt@kernel.org, mark.rutland@arm.com, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ramiro.Oliveira@synopsys.com, Joao.Pinto@synopsys.com, CARLOS.PALMINHA@synopsys.com Date: Wed, 07 Dec 2016 20:58:56 +0200 In-Reply-To: <486c43e4c57116fa955ab99cea7f484ee8a2bdf3.1481131072.git.lolivei@synopsys.com> References: <486c43e4c57116fa955ab99cea7f484ee8a2bdf3.1481131072.git.lolivei@synopsys.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-12-07 at 17:55 +0000, Luis Oliveira wrote: > - Factor out all _master() part of code from i2c-designware-core >   and i2c-designware-platdrv to separate functions. > - Standardize all code related with MASTER modes. > Couple of comments, after addressing them Acked-by: Andy Shevchenko > + if ((dev->master_cfg & DW_IC_CON_MASTER) && > +  (dev->master_cfg & DW_IC_CON_SLAVE_DISABLE)) > + i2c_dw_configure_fifo_master(dev); So, logically it's a part of slave patch. For now it would be just  i2c_dw_configure_fifo_master(dev); > +static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id) > +{ > + struct dw_i2c_dev *dev = dev_id; > + u32 stat, enabled, mode; mode is unused here, this is a part of slave patch either. > +static void i2c_dw_configure_master(struct platform_device *pdev) > +{ > + struct dw_i2c_dev *dev = platform_get_drvdata(pdev); > + dev_info(&pdev->dev, "I am registed as a I2C Master!\n"); I don't want bikeshedding here, but the question just comes: "Do we need to have this available via sysfs as a part of ABI?" So. user space can check for / set a mode. In any case this one is a separate story and another patch, here just to make the message less annoying, it looks like dev_dbg() to me. -- Andy Shevchenko Intel Finland Oy