All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Joachim Eastwood <manabian@gmail.com>,
	jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net
Cc: martink@posteo.de, linux-iio@vger.kernel.org
Subject: Re: [PATCH v2] iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver
Date: Tue, 20 Oct 2015 10:05:24 +0200	[thread overview]
Message-ID: <5625F5C4.7020200@metafoo.de> (raw)
In-Reply-To: <1445281210-3936-1-git-send-email-manabian@gmail.com>

On 10/19/2015 09:00 PM, Joachim Eastwood wrote:
[...]
> +config MMA7455
> +	tristate "Freescale MMA7455L/MMA7456L Accelerometer Driver"
> +	depends on I2C || SPI_MASTER
> +	select IIO_BUFFER
> +	select IIO_TRIGGERED_BUFFER
> +	select MMA7455_I2C if I2C
> +	select MMA7455_SPI if SPI

Ah, damm, I shouldn't have said bmg160 is a good example without actually
looking at its Kconfig entry. Only saw the C files and those looked good.

This is still problematic. The depends on clause allows this driver to be
built-in if either I2C is built-in or SPI_MASTER is built-in. And then the
respective I2C and SPI modules will also be selected as built-in even though
the I2C symbol is only selected as a module. So you now have built-in code
that tries to reference code that is only available as a module.

A better solution is to make the Kconfig entries for the I2C and SPI modules
user selectable and then let them select the main module.

> +	help
> +	  Say yes here to build support for the Freescale MMA7455L and
> +	  MMA7456L 3-axis accelerometer.
> +
> +	  To compile this driver as a module, choose M here: the module
> +	  will be called mma7455_i2c or mma7455_spi.
> +
> +config MMA7455_I2C
> +	tristate
> +	select REGMAP_I2C
> +
> +config MMA7455_SPI
> +	tristate
> +	select REGMAP_SPI
> +


  parent reply	other threads:[~2015-10-20  8:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-17 22:25 [PATCH] iio: accel: add Freescale MMA7455L 3-axis accelerometer driver Joachim Eastwood
2015-10-19 10:45 ` Lars-Peter Clausen
2015-10-19 12:19   ` Joachim Eastwood
2015-10-19 12:23     ` Lars-Peter Clausen
2015-10-19 12:38       ` Joachim Eastwood
2015-10-19 11:00 ` Peter Meerwald
2015-10-19 12:26   ` Joachim Eastwood
2015-10-19 12:38     ` Peter Meerwald
2015-10-19 11:10 ` Martin Kepplinger
2015-10-19 12:34   ` Joachim Eastwood
2015-10-19 12:56     ` Martin Kepplinger
2015-10-19 13:43       ` Joachim Eastwood
2015-10-19 14:09         ` Martin Kepplinger
2015-10-19 14:14           ` Lars-Peter Clausen
2015-10-19 19:00 ` [PATCH v2] iio: accel: add Freescale MMA7455L/MMA7456L " Joachim Eastwood
2015-10-19 21:07   ` Joachim Eastwood
2015-10-20  7:48   ` Martin Kepplinger
2015-10-20 11:03     ` Joachim Eastwood
2015-10-25 11:29       ` Jonathan Cameron
2015-10-20  8:05   ` Lars-Peter Clausen [this message]
2015-10-20 11:00     ` Joachim Eastwood
2015-10-20 11:05       ` Lars-Peter Clausen
2015-10-20 11:52         ` Joachim Eastwood
2015-10-20 20:50 ` [PATCH v3] " Joachim Eastwood
2015-10-25 11:45   ` Jonathan Cameron
2015-10-29 17:34     ` Joachim Eastwood
2015-10-30 10:00       ` Jonathan Cameron
2015-10-31 12:49 ` [PATCH v4] " Joachim Eastwood
2015-10-31 21:37   ` Martin Kepplinger
2015-11-01 18:01     ` Jonathan Cameron
2015-11-02 11:07       ` Martin Kepplinger
2015-11-08 15:47         ` Jonathan Cameron
2015-11-01 18:01   ` Jonathan Cameron
2015-11-01 18:02     ` Jonathan Cameron
2015-11-03 22:17       ` Joachim Eastwood
2015-11-08 15:49         ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5625F5C4.7020200@metafoo.de \
    --to=lars@metafoo.de \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=martink@posteo.de \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.