#include <linux/bitfield.h>
#include <linux/counter.h>
#include <linux/mfd/stm32-lptimer.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/types.h>
struct stm32_lptim_cnt { … };
static int stm32_lptim_is_enabled(struct stm32_lptim_cnt *priv)
{ … }
static int stm32_lptim_set_enable_state(struct stm32_lptim_cnt *priv,
int enable)
{ … }
static int stm32_lptim_setup(struct stm32_lptim_cnt *priv, int enable)
{ … }
static const enum counter_function stm32_lptim_cnt_functions[] = …;
static const enum counter_synapse_action stm32_lptim_cnt_synapse_actions[] = …;
static int stm32_lptim_cnt_read(struct counter_device *counter,
struct counter_count *count, u64 *val)
{ … }
static int stm32_lptim_cnt_function_read(struct counter_device *counter,
struct counter_count *count,
enum counter_function *function)
{ … }
static int stm32_lptim_cnt_function_write(struct counter_device *counter,
struct counter_count *count,
enum counter_function function)
{ … }
static int stm32_lptim_cnt_enable_read(struct counter_device *counter,
struct counter_count *count,
u8 *enable)
{ … }
static int stm32_lptim_cnt_enable_write(struct counter_device *counter,
struct counter_count *count,
u8 enable)
{ … }
static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter,
struct counter_count *count,
u64 *ceiling)
{ … }
static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter,
struct counter_count *count,
u64 ceiling)
{ … }
static struct counter_comp stm32_lptim_cnt_ext[] = …;
static int stm32_lptim_cnt_action_read(struct counter_device *counter,
struct counter_count *count,
struct counter_synapse *synapse,
enum counter_synapse_action *action)
{ … }
static int stm32_lptim_cnt_action_write(struct counter_device *counter,
struct counter_count *count,
struct counter_synapse *synapse,
enum counter_synapse_action action)
{ … }
static const struct counter_ops stm32_lptim_cnt_ops = …;
static struct counter_signal stm32_lptim_cnt_signals[] = …;
static struct counter_synapse stm32_lptim_cnt_synapses[] = …;
static struct counter_count stm32_lptim_enc_counts = …;
static struct counter_count stm32_lptim_in1_counts = …;
static int stm32_lptim_cnt_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int stm32_lptim_cnt_suspend(struct device *dev)
{ … }
static int stm32_lptim_cnt_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(stm32_lptim_cnt_pm_ops, stm32_lptim_cnt_suspend,
stm32_lptim_cnt_resume);
static const struct of_device_id stm32_lptim_cnt_of_match[] = …;
MODULE_DEVICE_TABLE(of, stm32_lptim_cnt_of_match);
static struct platform_driver stm32_lptim_cnt_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);