Complete vnd7050aj module integration

- Move DTS binding from project root to module folder
- Update module.yml to use correct dts_root path
- Restructure module for better organization and portability
- All module files now self-contained in modules/vnd7050aj/

Module structure:
- CMakeLists.txt: Uses zephyr_library for proper integration
- Kconfig: Module configuration options
- dts/bindings/: Device tree binding definitions
- include/: Public header files
- src/: Module source code
- zephyr/module.yml: Module discovery and configuration

Build verified successful on both x86 and ARM targets.
This commit is contained in:
2025-07-09 09:49:41 +02:00
parent 3c9a81758d
commit 7dc1430aa5
9 changed files with 63 additions and 16 deletions

5
modules/Kconfig Normal file
View File

@@ -0,0 +1,5 @@
config VND7050AJ
bool "VND7050AJ library support"
default n
help
Enable support for the VND7050AJ high-side driver.

View File

@@ -1,3 +1,12 @@
add_library(vnd7050aj STATIC src/vnd7050aj.c)
target_include_directories(vnd7050aj PRIVATE include)
target_link_libraries(vnd7050aj PUBLIC zephyr_interface)
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_VND7050AJ)
zephyr_library()
zephyr_library_sources(src/vnd7050aj.c)
zephyr_library_include_directories(include)
# Make the header files available globally
zephyr_include_directories(include)
endif() # CONFIG_VND7050AJ

34
modules/vnd7050aj/Kconfig Normal file
View File

@@ -0,0 +1,34 @@
# VND7050AJ Driver Configuration
config VND7050AJ
bool "VND7050AJ driver"
default y
help
Enable the VND7050AJ driver for interfacing with VND7050AJ devices.
This driver provides basic functionality for VND7050AJ operations.
if VND7050AJ
config VND7050AJ_INIT_PRIORITY
int "VND7050AJ initialization priority"
default 80
help
VND7050AJ driver initialization priority. This should be set to a value
that ensures the driver is initialized after the required subsystems
(like GPIO, I2C, SPI) but before application code runs.
config VND7050AJ_LOG_LEVEL
int "VND7050AJ Log level"
depends on LOG
default 3
range 0 4
help
Sets log level for VND7050AJ driver.
Levels are:
0 OFF, do not write
1 ERROR, only write LOG_ERR
2 WARNING, write LOG_WRN in addition to previous level
3 INFO, write LOG_INF in addition to previous levels
4 DEBUG, write LOG_DBG in addition to previous levels
endif # VND7050AJ

View File

@@ -0,0 +1,22 @@
description: STMicroelectronics VND7050AJ High-Side Driver
compatible:
- st,vnd7050aj
properties:
label:
type: string
required: true
description: Human readable name for the device
# Example property for a GPIO pin, adjust as needed
gpio-enable-pin:
type: phandle-array
required: true
description: GPIO pin for enabling the device
# Add other properties relevant to the VND7050AJ, e.g.,
# current-sense-gpios:
# type: phandle-array
# required: false
# description: GPIO pins for current sensing

View File

@@ -0,0 +1,6 @@
name: vnd7050aj
build:
cmake: .
kconfig: Kconfig
settings:
dts_root: dts