[PATCH 4/6] spi: bcm2835: warn about native-chip-selects being used
Stephen Warren
swarren at wwwdotorg.org
Mon Mar 30 20:23:01 PDT 2015
On 03/29/2015 08:03 AM, Martin Sperl wrote:
> Signed-off-by: Martin Sperl <kernel at martin.sperl.org>
> Tested-by: Martin Sperl <kernel at martin.sperl.org>
It would be useful to have a commit description saying why such a
warning was useful.
> diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
> @@ -82,6 +82,7 @@ struct bcm2835_spi {
> u8 *rx_buf;
> int tx_len;
> int rx_len;
> + bool native_cs_use_warning_done;
> };
...
> @@ -294,6 +298,14 @@ static int bcm2835_spi_setup(struct spi_device *spi)
...
> + /* we are in the native chipselect case now,
> + * so warn about the fact that some things may not work as well
What things and why? (I'm asking mainly because that should be in the
commit description and perhaps this comment).
> + */
> + if (!bs->native_cs_use_warning_done) {
> + dev_warn(&spi->dev,
> + "setup: native chipselect is used - some driver functions/optimizations are not applied\n");
> + bs->native_cs_use_warning_done = 1;
> + }
Isn't there a warn_once() that would remove the need to check/set
native_cs_use_warning_done?
More information about the linux-rpi-kernel
mailing list