Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 <lars@xxxxxxxxxx> wrote:
>>> On 02/23/2017 05:43 PM, Andy Shevchenko wrote:
>>>> On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya <eraretuya@xxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux