subsys/mgmt/ec_host_cmd: update directory structure
The Host Commands can be used with different transport layers e.g. SHI or eSPI. The code that provides the peripheral API and allows sending and receiving Host Commands via different transport layers is not actually drivers of a peripheral, so move it to the subsys/mgmt/ec_host_cmd folder. Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
This commit is contained in:
parent
72fbc8c56d
commit
e734adfb78
18 changed files with 25 additions and 25 deletions
|
@ -262,7 +262,6 @@
|
||||||
/drivers/dma/*iproc_pax* @raveenp
|
/drivers/dma/*iproc_pax* @raveenp
|
||||||
/drivers/dma/*intel_adsp* @teburd @abonislawski
|
/drivers/dma/*intel_adsp* @teburd @abonislawski
|
||||||
/drivers/dma/*xmc4xxx* @talih0
|
/drivers/dma/*xmc4xxx* @talih0
|
||||||
/drivers/ec_host_cmd_periph/ @jettr
|
|
||||||
/drivers/edac/ @finikorg
|
/drivers/edac/ @finikorg
|
||||||
/drivers/eeprom/ @henrikbrixandersen
|
/drivers/eeprom/ @henrikbrixandersen
|
||||||
/drivers/eeprom/eeprom_stm32.c @KwonTae-young
|
/drivers/eeprom/eeprom_stm32.c @KwonTae-young
|
||||||
|
|
|
@ -25,7 +25,6 @@ add_subdirectory_ifdef(CONFIG_DAC dac)
|
||||||
add_subdirectory_ifdef(CONFIG_DAI dai)
|
add_subdirectory_ifdef(CONFIG_DAI dai)
|
||||||
add_subdirectory_ifdef(CONFIG_DISPLAY display)
|
add_subdirectory_ifdef(CONFIG_DISPLAY display)
|
||||||
add_subdirectory_ifdef(CONFIG_DMA dma)
|
add_subdirectory_ifdef(CONFIG_DMA dma)
|
||||||
add_subdirectory_ifdef(CONFIG_EC_HOST_CMD_PERIPH ec_host_cmd_periph)
|
|
||||||
add_subdirectory_ifdef(CONFIG_EDAC edac)
|
add_subdirectory_ifdef(CONFIG_EDAC edac)
|
||||||
add_subdirectory_ifdef(CONFIG_EEPROM eeprom)
|
add_subdirectory_ifdef(CONFIG_EEPROM eeprom)
|
||||||
add_subdirectory_ifdef(CONFIG_ENTROPY_HAS_DRIVER entropy)
|
add_subdirectory_ifdef(CONFIG_ENTROPY_HAS_DRIVER entropy)
|
||||||
|
|
|
@ -22,7 +22,6 @@ source "drivers/debug/Kconfig"
|
||||||
source "drivers/disk/Kconfig"
|
source "drivers/disk/Kconfig"
|
||||||
source "drivers/display/Kconfig"
|
source "drivers/display/Kconfig"
|
||||||
source "drivers/dma/Kconfig"
|
source "drivers/dma/Kconfig"
|
||||||
source "drivers/ec_host_cmd_periph/Kconfig"
|
|
||||||
source "drivers/edac/Kconfig"
|
source "drivers/edac/Kconfig"
|
||||||
source "drivers/eeprom/Kconfig"
|
source "drivers/eeprom/Kconfig"
|
||||||
source "drivers/entropy/Kconfig"
|
source "drivers/entropy/Kconfig"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_H_
|
#ifndef ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_H_
|
||||||
#define ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_H_
|
#define ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_H_
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief EC Host Command Interface
|
* @brief EC Host Command Interface
|
||||||
|
@ -216,4 +216,4 @@ enum ec_host_cmd_status {
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif /* ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_H_ */
|
#endif /* ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_H_ */
|
|
@ -9,8 +9,8 @@
|
||||||
* @brief Public APIs for Host Command Peripherals that respond to host commands
|
* @brief Public APIs for Host Command Peripherals that respond to host commands
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_HOST_CMD_PERIPH_H_
|
#ifndef ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_PERIPH_H_
|
||||||
#define ZEPHYR_INCLUDE_DRIVERS_HOST_CMD_PERIPH_H_
|
#define ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_PERIPH_H_
|
||||||
|
|
||||||
#include <zephyr/sys/__assert.h>
|
#include <zephyr/sys/__assert.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
|
@ -122,4 +122,4 @@ static inline int ec_host_cmd_periph_send(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* ZEPHYR_INCLUDE_DRIVERS_HOST_CMD_PERIPH_H_ */
|
#endif /* ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_PERIPH_H_ */
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_EC_HOST_CMD_SIMULATOR_H_
|
#ifndef ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_SIMULATOR_H_
|
||||||
#define ZEPHYR_INCLUDE_DRIVERS_EC_HOST_CMD_SIMULATOR_H_
|
#define ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_SIMULATOR_H_
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* For ec_host_cmd_periph_api_send function pointer type */
|
/* For ec_host_cmd_periph_api_send function pointer type */
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_periph.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Install callback for when this device would sends data to host
|
* @brief Install callback for when this device would sends data to host
|
||||||
|
@ -42,4 +42,4 @@ void ec_host_cmd_periph_sim_install_send_cb(ec_host_cmd_periph_api_send cb);
|
||||||
*/
|
*/
|
||||||
int ec_host_cmd_periph_sim_data_received(const uint8_t *buffer, size_t len);
|
int ec_host_cmd_periph_sim_data_received(const uint8_t *buffer, size_t len);
|
||||||
|
|
||||||
#endif /* ZEPHYR_INCLUDE_DRIVERS_EC_HOST_CMD_SIMULATOR_H_ */
|
#endif /* ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_EC_HOST_CMD_SIMULATOR_H_ */
|
|
@ -2,3 +2,5 @@
|
||||||
|
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
zephyr_library_sources(ec_host_cmd_handler.c)
|
zephyr_library_sources(ec_host_cmd_handler.c)
|
||||||
|
|
||||||
|
add_subdirectory_ifdef(CONFIG_EC_HOST_CMD_PERIPH ec_host_cmd_periph)
|
||||||
|
|
|
@ -33,6 +33,8 @@ config EC_HOST_CMD_HANDLER_PRIO
|
||||||
process the command on time and the AP will abort the waiting for response and be unable
|
process the command on time and the AP will abort the waiting for response and be unable
|
||||||
to boot the system properly.
|
to boot the system properly.
|
||||||
|
|
||||||
|
source "subsys/mgmt/ec_host_cmd/ec_host_cmd_periph/Kconfig"
|
||||||
|
|
||||||
endif # EC_HOST_CMD
|
endif # EC_HOST_CMD
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_periph.h>
|
||||||
#include <zephyr/mgmt/ec_host_cmd.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd.h>
|
||||||
#include <zephyr/devicetree.h>
|
#include <zephyr/devicetree.h>
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_periph.h>
|
||||||
#include <zephyr/drivers/espi.h>
|
#include <zephyr/drivers/espi.h>
|
||||||
#include <zephyr/mgmt/ec_host_cmd.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd.h>
|
||||||
|
|
||||||
BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1, "Invalid number of eSPI peripherals");
|
BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1, "Invalid number of eSPI peripherals");
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
|
|
||||||
#include "ec_host_cmd_periph_shi.h"
|
#include "ec_host_cmd_periph_shi.h"
|
||||||
|
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_periph.h>
|
||||||
#include <zephyr/drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <zephyr/drivers/pinctrl.h>
|
#include <zephyr/drivers/pinctrl.h>
|
||||||
#include <zephyr/dt-bindings/gpio/ite-it8xxx2-gpio.h>
|
#include <zephyr/dt-bindings/gpio/ite-it8xxx2-gpio.h>
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/mgmt/ec_host_cmd.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd.h>
|
||||||
#include <zephyr/pm/device.h>
|
#include <zephyr/pm/device.h>
|
||||||
#include <zephyr/pm/device_runtime.h>
|
#include <zephyr/pm/device_runtime.h>
|
||||||
#include <zephyr/pm/policy.h>
|
#include <zephyr/pm/policy.h>
|
|
@ -9,10 +9,10 @@
|
||||||
#include "ec_host_cmd_periph_shi.h"
|
#include "ec_host_cmd_periph_shi.h"
|
||||||
|
|
||||||
#include <zephyr/drivers/clock_control.h>
|
#include <zephyr/drivers/clock_control.h>
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_periph.h>
|
||||||
#include <zephyr/drivers/pinctrl.h>
|
#include <zephyr/drivers/pinctrl.h>
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/mgmt/ec_host_cmd.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd.h>
|
||||||
#include <zephyr/pm/device.h>
|
#include <zephyr/pm/device.h>
|
||||||
#include <zephyr/pm/device_runtime.h>
|
#include <zephyr/pm/device_runtime.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_periph.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_POSIX
|
#ifndef CONFIG_ARCH_POSIX
|
|
@ -34,7 +34,6 @@
|
||||||
#include <zephyr/drivers/disk.h>
|
#include <zephyr/drivers/disk.h>
|
||||||
#include <zephyr/drivers/display.h>
|
#include <zephyr/drivers/display.h>
|
||||||
#include <zephyr/drivers/dma.h>
|
#include <zephyr/drivers/dma.h>
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_periph.h>
|
|
||||||
#include <zephyr/drivers/edac.h>
|
#include <zephyr/drivers/edac.h>
|
||||||
#include <zephyr/drivers/eeprom.h>
|
#include <zephyr/drivers/eeprom.h>
|
||||||
#include <zephyr/drivers/emul.h>
|
#include <zephyr/drivers/emul.h>
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zephyr/drivers/ec_host_cmd_periph/ec_host_cmd_simulator.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd_simulator.h>
|
||||||
#include <zephyr/mgmt/ec_host_cmd.h>
|
#include <zephyr/mgmt/ec_host_cmd/ec_host_cmd.h>
|
||||||
#include <zephyr/ztest.h>
|
#include <zephyr/ztest.h>
|
||||||
|
|
||||||
/* Variables used to record what is "sent" to host for verification. */
|
/* Variables used to record what is "sent" to host for verification. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue