drivers: pwm: Fix compile issues with Atmel SAM PWM driver
The was a missing comma in the DEVICE_DT_INST_DEFINE macro and the SAME71 HAL tweaks the name of a struct so we have to work around that. Fixes #36095 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
63dbc1f4e0
commit
7e52ee7fe1
3 changed files with 20 additions and 1 deletions
|
@ -107,7 +107,7 @@ static const struct pwm_driver_api sam_pwm_driver_api = {
|
|||
}; \
|
||||
\
|
||||
DEVICE_DT_INST_DEFINE(inst, \
|
||||
&sam_pwm_init, NULL \
|
||||
&sam_pwm_init, NULL, \
|
||||
NULL, &sam_pwm_config_##inst, \
|
||||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
|
|
17
soc/arm/atmel_sam/common/pwm_fixup.h
Normal file
17
soc/arm/atmel_sam/common/pwm_fixup.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _ATMEL_SAM_PWM_FIXUP_H_
|
||||
#define _ATMEL_SAM_PWM_FIXUP_H_
|
||||
|
||||
/* The SAMV71 HALs change the name of the field, so we need to
|
||||
* define it this way to match how the other SoC variants name it
|
||||
*/
|
||||
#if defined(CONFIG_SOC_SERIES_SAMV71)
|
||||
#define PWM_CH_NUM PwmChNum
|
||||
#endif
|
||||
|
||||
#endif /* _ATMEL_SAM_PWM_FIXUP_H_ */
|
|
@ -78,4 +78,6 @@
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#include "pwm_fixup.h"
|
||||
|
||||
#endif /* _ATMEL_SAMV71_SOC_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue