From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440AbdBXJrL (ORCPT ); Fri, 24 Feb 2017 04:47:11 -0500 Received: from www381.your-server.de ([78.46.137.84]:41310 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbdBXJq5 (ORCPT ); Fri, 24 Feb 2017 04:46:57 -0500 Subject: Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support To: Andy Shevchenko , Jonathan Cameron , linux-iio@vger.kernel.org, Hartmut Knaack , Peter Meerwald , Dmitry Torokhov , Michael Hennerich , Daniel Baluta , Alison Schofield , Florian Vaussard , "linux-kernel@vger.kernel.org" , Rob Herring , Mark Rutland , devicetree References: <515297e48abd139993cab56dbf980711400d6534.1487757223.git.eraretuya@gmail.com> <20170224091231.GC5012@Socrates-UM> From: Lars-Peter Clausen Message-ID: <13912e47-1e3e-e68e-1e91-4a174f33fda5@metafoo.de> Date: Fri, 24 Feb 2017 10:22:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170224091231.GC5012@Socrates-UM> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/24/2017 10:12 AM, Eva Rachel Retuya wrote: > On Thu, Feb 23, 2017 at 06:58:12PM +0200, Andy Shevchenko wrote: >> On Thu, Feb 23, 2017 at 6:47 PM, Lars-Peter Clausen wrote: >>> On 02/23/2017 05:43 PM, Andy Shevchenko wrote: >>>> On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya wrote: >>>>> Add SPI driver that initializes SPI regmap for the adxl345 core driver. >>>>> The driver supports the same functionality as I2C namely the x, y, z and >>>>> scale readings. >> >>>>> config ADXL345_I2C >>>>> tristate >>>>> select REGMAP_I2C >>>>> >>>>> +config ADXL345_SPI >>>>> + tristate >>>>> + select REGMAP_SPI >>>> >>>> Hmm... >>>> I saw another pattern >>>> >>>> Library / core part is non-visible to user, while >>>> SPI and I2C parts are selectable by user. >>>> >>>> Why do you use inverted pattern? What did I miss? >>> >>> The first version of the patch used the other pattern SPI/I2C visible. >>> Jonathan suggested this other pattern. I prefer the explicit SPI/I2C visible >>> pattern, but in the end it doesn't really matter as long as both work. >> >> Yes, but this pattern makes extra footprint of the kernel and >> basically dead code when I would like, for example, to have SPI bus >> enabled, I2C module available, but SPI module not compiled. >> >> Other one is when I want to have one compiled in, one as a module by >> whatever reason. >> >> At the end I have no strong opinion, though rationale for the opposite is above. >> > > Hello Lars and Andy, > > I'll revert to the explicit SPI/I2C pattern in order to give more > freedom in configuring as per the scenarios previously stated. Please check with Jonathan before you do, in the end he'll have to apply the patch.