Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1587013

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

From Andy Shevchenko <andy.shevchenko@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support
Date 2017-02-23 17:50 +0100
Message-ID <te4KC-3SM-37@gated-at.bofh.it> (permalink)
References <tdClj-aH-7@gated-at.bofh.it> <tdClj-aH-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya <eraretuya@gmail.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 4/4] iio: accel: adxl345: Add SPI support Eva Rachel Retuya <eraretuya@gmail.com> - 2017-02-22 11:30 +0100
  Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-23 17:50 +0100
    Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-23 18:00 +0100
      Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Eva Rachel Retuya <eraretuya@gmail.com> - 2017-02-24 10:20 +0100
        Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Lars-Peter Clausen <lars@metafoo.de> - 2017-02-24 10:50 +0100
          Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-24 12:50 +0100
            Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Eva Rachel Retuya <eraretuya@gmail.com> - 2017-02-24 15:40 +0100
              Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Jonathan Cameron <jic23@jic23.retrosnub.co.uk> - 2017-02-24 20:50 +0100
                Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Jonathan Cameron <jic23@kernel.org> - 2017-02-25 16:20 +0100
    Re: [PATCH v3 4/4] iio: accel: adxl345: Add SPI support Lars-Peter Clausen <lars@metafoo.de> - 2017-02-23 18:10 +0100

csiph-web