fix(sensors): Avoid duplicate Kconfig/DTS name.
* Upstream added an equivalent fuel gauge driver, so namespace our Kconfig symbol and DTS compatible for the MAX17048 driver.
This commit is contained in:
parent
0b5afbf9c0
commit
bd9c71ab0a
5 changed files with 9 additions and 11 deletions
|
@ -3,4 +3,4 @@
|
|||
|
||||
add_subdirectory_ifdef(CONFIG_ZMK_BATTERY battery)
|
||||
add_subdirectory_ifdef(CONFIG_EC11 ec11)
|
||||
add_subdirectory_ifdef(CONFIG_MAX17048 max17048)
|
||||
add_subdirectory_ifdef(CONFIG_ZMK_MAX17048 max17048)
|
||||
|
|
|
@ -5,5 +5,5 @@ zephyr_include_directories(.)
|
|||
|
||||
zephyr_library()
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_MAX17048 max17048.c)
|
||||
zephyr_library_sources_ifndef(CONFIG_MAX17048 ${ZEPHYR_BASE}/misc/empty_file.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ZMK_MAX17048 max17048.c)
|
||||
zephyr_library_sources_ifndef(CONFIG_ZMK_MAX17048 ${ZEPHYR_BASE}/misc/empty_file.c)
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
DT_COMPAT_MAXIM_MAX17048 := maxim,max17048
|
||||
|
||||
menuconfig MAX17048
|
||||
menuconfig ZMK_MAX17048
|
||||
bool "MAX17048/9 I2C-based Fuel Gauge"
|
||||
default $(dt_compat_enabled,$(DT_COMPAT_MAXIM_MAX17048))
|
||||
depends on I2C
|
||||
default y
|
||||
depends on DT_HAS_ZMK_MAXIM_MAX17048_ENABLED && I2C
|
||||
select ZMK_BATTERY
|
||||
help
|
||||
Enable driver for MAX17048/9 I2C-based Fuel Gauge. Supports measuring
|
||||
battery voltage and state-of-charge.
|
||||
|
||||
if MAX17048
|
||||
if ZMK_MAX17048
|
||||
|
||||
config SENSOR_MAX17048_INIT_PRIORITY
|
||||
int "Init priority"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#define DT_DRV_COMPAT maxim_max17048
|
||||
#define DT_DRV_COMPAT zmk_maxim_max17048
|
||||
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/kernel.h>
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
description: >
|
||||
This is a representation of the Maxim max17048 I2C Fuel Gauge.
|
||||
|
||||
compatible: "maxim,max17048"
|
||||
compatible: "zmk,maxim-max17048"
|
||||
|
||||
include: [i2c-device.yaml]
|
Loading…
Add table
Reference in a new issue