drivers: pwm: sam: move SAM V71 register fixup from SoC to PWM driver
Move the SAM V71 register name fixup from the SoC code into the PWM driver next to the other PWM driver fixup. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
parent
6d6441db3b
commit
fd5b97690d
3 changed files with 8 additions and 20 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Aurelien Jarno
|
||||
* Copyright (c) 2021 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -11,7 +12,6 @@
|
|||
#include <zephyr/drivers/pwm.h>
|
||||
#include <zephyr/drivers/pinctrl.h>
|
||||
#include <zephyr/drivers/clock_control/atmel_sam_pmc.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
|
@ -22,6 +22,13 @@ LOG_MODULE_REGISTER(pwm_sam, CONFIG_PWM_LOG_LEVEL);
|
|||
#define PWMCHNUM_NUMBER PWMCH_NUM_NUMBER
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
||||
struct sam_pwm_config {
|
||||
Pwm *regs;
|
||||
const struct atmel_sam_pmc_config clock_cfg;
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
* 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_ */
|
|
@ -79,6 +79,4 @@
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#include "pwm_fixup.h"
|
||||
|
||||
#endif /* _SOC_ATMEL_SAM_SAMV71_SOC_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue