Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2013 Samsung Electronics Co., Ltd.
0004  */
0005 #ifndef __CLOCKSOURCE_SAMSUNG_PWM_H
0006 #define __CLOCKSOURCE_SAMSUNG_PWM_H
0007 
0008 #include <linux/spinlock.h>
0009 
0010 #define SAMSUNG_PWM_NUM     5
0011 
0012 /*
0013  * Following declaration must be in an ifdef due to this symbol being static
0014  * in pwm-samsung driver if the clocksource driver is not compiled in and the
0015  * spinlock is not shared between both drivers.
0016  */
0017 #ifdef CONFIG_CLKSRC_SAMSUNG_PWM
0018 extern spinlock_t samsung_pwm_lock;
0019 #endif
0020 
0021 struct samsung_pwm_variant {
0022     u8 bits;
0023     u8 div_base;
0024     u8 tclk_mask;
0025     u8 output_mask;
0026     bool has_tint_cstat;
0027 };
0028 
0029 void samsung_pwm_clocksource_init(void __iomem *base,
0030                   unsigned int *irqs,
0031                   const struct samsung_pwm_variant *variant);
0032 
0033 #endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */