Skip to content

Commit 93353e8

Browse files
austinmartonenomsg
authored andcommitted
max17042_battery: Fix build errors caused by missing REGMAP_I2C config
max17042 now uses regmap interface but does not enable config option. This patch fixes the following build errors: drivers/power/max17042_battery.c:661:15: error: variable ‘max17042_regmap_config’ has initializer but incomplete type drivers/power/max17042_battery.c:662:2: error: unknown field ‘reg_bits’ specified in initializer drivers/power/max17042_battery.c:662:2: warning: excess elements in struct initializer drivers/power/max17042_battery.c:662:2: warning: (near initialization for ‘max17042_regmap_config’) drivers/power/max17042_battery.c:663:2: error: unknown field ‘val_bits’ specified in initializer drivers/power/max17042_battery.c:663:2: warning: excess elements in struct initializer drivers/power/max17042_battery.c:663:2: warning: (near initialization for ‘max17042_regmap_config’) drivers/power/max17042_battery.c:664:2: error: unknown field ‘val_format_endian’ specified in initializer drivers/power/max17042_battery.c:664:23: error: ‘REGMAP_ENDIAN_NATIVE’ undeclared here (not in a function) drivers/power/max17042_battery.c:664:2: warning: excess elements in struct initializer drivers/power/max17042_battery.c:664:2: warning: (near initialization for ‘max17042_regmap_config’) drivers/power/max17042_battery.c: In function ‘max17042_probe’: drivers/power/max17042_battery.c:684:2: error: implicit declaration of function ‘devm_regmap_init_i2c’ Signed-off-by: Austin Boyle <boyle.austin@gmail.com> Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
1 parent 80c6463 commit 93353e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/power/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ config BATTERY_MAX17040
196196
config BATTERY_MAX17042
197197
tristate "Maxim MAX17042/17047/17050/8997/8966 Fuel Gauge"
198198
depends on I2C
199+
select REGMAP_I2C
199200
help
200201
MAX17042 is fuel-gauge systems for lithium-ion (Li+) batteries
201202
in handheld and portable equipment. The MAX17042 is configured

0 commit comments

Comments
 (0)