2012-10-15 08:22:44

by Dong Aisheng

[permalink] [raw]
Subject: [PATCH 1/1] regmap: select REGMAP if REGMAP_MMIO and REGMAP_IRQ enabled

From: Dong Aisheng <[email protected]>

The regmap_mmio and regmap_irq depend on regmap core, if not select,
we may not compile regmap core and meet compiling errors as follows
if REGMAP_MMIO is selected by client drivers:
drivers/mfd/syscon.c:94:15: error: variable 'syscon_regmap_config' has initializer but incomplete type
drivers/mfd/syscon.c:95:2: error: unknown field 'reg_bits' specified in initializer
drivers/mfd/syscon.c:95:2: warning: excess elements in struct initializer [enabled by default]
drivers/mfd/syscon.c:95:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
drivers/mfd/syscon.c:96:2: error: unknown field 'val_bits' specified in initializer
drivers/mfd/syscon.c:96:2: warning: excess elements in struct initializer [enabled by default]
drivers/mfd/syscon.c:96:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
drivers/mfd/syscon.c:97:2: error: unknown field 'reg_stride' specified in initializer
drivers/mfd/syscon.c:97:2: warning: excess elements in struct initializer [enabled by default]
drivers/mfd/syscon.c:97:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
drivers/mfd/syscon.c: In function 'syscon_probe':
drivers/mfd/syscon.c:124:2: error: invalid use of undefined type 'struct regmap_config'
drivers/mfd/syscon.c:125:2: error: implicit declaration of function 'devm_regmap_init_mmio' [-Werror=implicit-function-declaration]
drivers/mfd/syscon.c:125:17: warning: assignment makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors

drivers/mfd/Kconfig:
config MFD_SYSCON
bool "System Controller Register R/W Based on Regmap"
depends on OF
select REGMAP_MMIO
help
Select this option to enable accessing system control registers
via regmap.

Cc: Mark Brown <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Fengguang Wu <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/base/regmap/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index 6be390b..f0d3054 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -3,7 +3,7 @@
# subsystems should select the appropriate symbols.

config REGMAP
- default y if (REGMAP_I2C || REGMAP_SPI)
+ default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_MMIO || REGMAP_IRQ)
select LZO_COMPRESS
select LZO_DECOMPRESS
select IRQ_DOMAIN if REGMAP_IRQ
--
1.7.0.4


2012-10-17 13:10:55

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/1] regmap: select REGMAP if REGMAP_MMIO and REGMAP_IRQ enabled

On Mon, Oct 15, 2012 at 03:50:25PM +0800, Dong Aisheng wrote:
> From: Dong Aisheng <[email protected]>
>
> The regmap_mmio and regmap_irq depend on regmap core, if not select,
> we may not compile regmap core and meet compiling errors as follows
> if REGMAP_MMIO is selected by client drivers:

Applied, thanks.

Please use less random CC lists.