drivers: can: mcan: move header file to public includes

Move the Bosch M_CAN header file to include/zephyr/drivers/can/can_mcan.h
for use in out-of-tree drivers.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2023-06-01 15:30:53 +02:00 committed by Anas Nashif
commit c9f97cf386
7 changed files with 9 additions and 15 deletions

View file

@ -6,14 +6,13 @@
*/
#include <zephyr/drivers/can.h>
#include <zephyr/drivers/can/can_mcan.h>
#include <zephyr/drivers/can/transceiver.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/sys_io.h>
#include <zephyr/sys/util.h>
#include "can_mcan.h"
LOG_MODULE_REGISTER(can_mcan, CONFIG_CAN_LOG_LEVEL);
#define CAN_INIT_TIMEOUT_MS 100

View file

@ -6,13 +6,12 @@
#include <zephyr/device.h>
#include <zephyr/drivers/can.h>
#include <zephyr/drivers/can/can_mcan.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
#include "can_mcan.h"
LOG_MODULE_REGISTER(can_mcux_mcan, CONFIG_CAN_LOG_LEVEL);
#define DT_DRV_COMPAT nxp_lpc_mcan

View file

@ -6,6 +6,7 @@
*/
#include <zephyr/drivers/can.h>
#include <zephyr/drivers/can/can_mcan.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/clock_control/atmel_sam_pmc.h>
#include <soc.h>
@ -13,8 +14,6 @@
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
#include "can_mcan.h"
LOG_MODULE_REGISTER(can_sam, CONFIG_CAN_LOG_LEVEL);
#define DT_DRV_COMPAT atmel_sam_can

View file

@ -7,14 +7,13 @@
*/
#include <zephyr/drivers/can.h>
#include <zephyr/drivers/can/can_mcan.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <soc.h>
#include "can_mcan.h"
LOG_MODULE_REGISTER(can_sam0, CONFIG_CAN_LOG_LEVEL);
#define DT_DRV_COMPAT atmel_sam0_can

View file

@ -6,6 +6,7 @@
*/
#include <zephyr/drivers/can.h>
#include <zephyr/drivers/can/can_mcan.h>
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
@ -16,8 +17,6 @@
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
#include "can_mcan.h"
LOG_MODULE_REGISTER(can_stm32fd, CONFIG_CAN_LOG_LEVEL);
#define DT_DRV_COMPAT st_stm32_fdcan

View file

@ -6,6 +6,7 @@
*/
#include <zephyr/drivers/can.h>
#include <zephyr/drivers/can/can_mcan.h>
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
@ -14,8 +15,6 @@
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
#include "can_mcan.h"
LOG_MODULE_REGISTER(can_stm32h7, CONFIG_CAN_LOG_LEVEL);
#define DT_DRV_COMPAT st_stm32h7_fdcan

View file

@ -6,8 +6,8 @@
*
*/
#ifndef ZEPHYR_DRIVERS_CAN_MCAN_H_
#define ZEPHYR_DRIVERS_CAN_MCAN_H_
#ifndef ZEPHYR_INCLUDE_DRIVERS_CAN_CAN_MCAN_H_
#define ZEPHYR_INCLUDE_DRIVERS_CAN_CAN_MCAN_H_
#include <zephyr/cache.h>
#include <zephyr/devicetree.h>
@ -1703,4 +1703,4 @@ void can_mcan_set_state_change_callback(const struct device *dev,
*/
int can_mcan_get_max_bitrate(const struct device *dev, uint32_t *max_bitrate);
#endif /* ZEPHYR_DRIVERS_CAN_MCAN_H_ */
#endif /* ZEPHYR_INCLUDE_DRIVERS_CAN_CAN_MCAN_H_ */