[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdmB1YqY4YyntbvHUaK_9yjY8wFeX6i9hmMDaScajKNOw@mail.gmail.com>
Date: Thu, 23 Feb 2017 18:43:53 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Eva Rachel Retuya <eraretuya@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Michael Hennerich <michael.hennerich@...log.com>,
Daniel Baluta <daniel.baluta@...il.com>,
Alison Schofield <amsfield22@...il.com>,
Florian Vaussard <florian.vaussard@...g-vd.ch>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
devicetree <devicetree@...r.kernel.org>
Subject: Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support
On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya <eraretuya@...il.com> 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.
> --- a/drivers/iio/accel/Kconfig
> +++ b/drivers/iio/accel/Kconfig
> @@ -8,20 +8,26 @@ menu "Accelerometers"
> config ADXL345
> tristate "Analog Devices ADXL345 3-Axis Digital Accelerometer Driver"
> depends on !(INPUT_ADXL34X=y || INPUT_ADXL34X=m)
> + depends on (I2C || SPI)
> select REGMAP
> select ADXL345_I2C if I2C
> + select ADXL345_SPI if SPI
> help
> Say Y here if you want to build support for the Analog Devices
> ADXL345 3-axis digital accelerometer.
>
> To compile this driver as a module, choose M here: the core
> module will be called adxl345_core and you will also get
> - adxl345_i2c for I2C.
> + adxl345_i2c for I2C and/or adxl345_spi for SPI.
>
> 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?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists