Skip to content
Permalink
Browse files

drivers/spi_nor: enable logging API

Just register it.  For now it's only used in one place where it was
needed to identify a problem.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
  • Loading branch information...
pabigot authored and galak committed Jul 23, 2019
1 parent 660149b commit 794e0109d6870ff302b3f9192a8877587ba5649b
Showing with 5 additions and 0 deletions.
  1. +5 −0 drivers/flash/spi_nor.c
@@ -11,9 +11,13 @@
#include <drivers/spi.h>
#include <init.h>
#include <string.h>
#include <logging/log.h>

#include "spi_nor.h"
#include "flash_priv.h"

LOG_MODULE_REGISTER(spi_nor, CONFIG_FLASH_LOG_LEVEL);

#define SPI_NOR_MAX_ADDR_WIDTH 4

/**
@@ -277,6 +281,7 @@ static int spi_nor_erase(struct device *dev, off_t addr, size_t size)
} else {
/* minimal erase size is at least a sector size */
SYNC_UNLOCK();
LOG_DBG("unsupported at %x size %u", (u32_t)addr, size);
return -EINVAL;
}

0 comments on commit 794e010

Please sign in to comment.
You can’t perform that action at this time.