mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
bb08e96575
The 'struct samsung_pwm_variant' argument passed to initialization functions is not modified, so it can be made const for safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210506202729.157260-2-krzysztof.kozlowski@canonical.com
33 lines
803 B
C
33 lines
803 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2013 Samsung Electronics Co., Ltd.
|
|
*/
|
|
#ifndef __CLOCKSOURCE_SAMSUNG_PWM_H
|
|
#define __CLOCKSOURCE_SAMSUNG_PWM_H
|
|
|
|
#include <linux/spinlock.h>
|
|
|
|
#define SAMSUNG_PWM_NUM 5
|
|
|
|
/*
|
|
* Following declaration must be in an ifdef due to this symbol being static
|
|
* in pwm-samsung driver if the clocksource driver is not compiled in and the
|
|
* spinlock is not shared between both drivers.
|
|
*/
|
|
#ifdef CONFIG_CLKSRC_SAMSUNG_PWM
|
|
extern spinlock_t samsung_pwm_lock;
|
|
#endif
|
|
|
|
struct samsung_pwm_variant {
|
|
u8 bits;
|
|
u8 div_base;
|
|
u8 tclk_mask;
|
|
u8 output_mask;
|
|
bool has_tint_cstat;
|
|
};
|
|
|
|
void samsung_pwm_clocksource_init(void __iomem *base,
|
|
unsigned int *irqs,
|
|
const struct samsung_pwm_variant *variant);
|
|
|
|
#endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */
|