#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/counter.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/i8254.h>
#include <linux/limits.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <asm/unaligned.h>
#define I8254_COUNTER_REG(_counter) …
#define I8254_CONTROL_REG …
#define I8254_SC …
#define I8254_RW …
#define I8254_M …
#define I8254_CONTROL(_sc, _rw, _m) …
#define I8254_RW_TWO_BYTE …
#define I8254_MODE_INTERRUPT_ON_TERMINAL_COUNT …
#define I8254_MODE_HARDWARE_RETRIGGERABLE_ONESHOT …
#define I8254_MODE_RATE_GENERATOR …
#define I8254_MODE_SQUARE_WAVE_MODE …
#define I8254_MODE_SOFTWARE_TRIGGERED_STROBE …
#define I8254_MODE_HARDWARE_TRIGGERED_STROBE …
#define I8254_COUNTER_LATCH(_counter) …
#define I8254_PROGRAM_COUNTER(_counter, _mode) …
#define I8254_NUM_COUNTERS …
struct i8254 { … };
static int i8254_count_read(struct counter_device *const counter, struct counter_count *const count,
u64 *const val)
{ … }
static int i8254_function_read(struct counter_device *const counter,
struct counter_count *const count,
enum counter_function *const function)
{ … }
#define I8254_SYNAPSES_PER_COUNT …
#define I8254_SIGNAL_ID_CLK …
#define I8254_SIGNAL_ID_GATE …
static int i8254_action_read(struct counter_device *const counter,
struct counter_count *const count,
struct counter_synapse *const synapse,
enum counter_synapse_action *const action)
{ … }
static int i8254_count_ceiling_read(struct counter_device *const counter,
struct counter_count *const count, u64 *const ceiling)
{ … }
static int i8254_count_mode_read(struct counter_device *const counter,
struct counter_count *const count,
enum counter_count_mode *const count_mode)
{ … }
static int i8254_count_mode_write(struct counter_device *const counter,
struct counter_count *const count,
const enum counter_count_mode count_mode)
{ … }
static int i8254_count_floor_read(struct counter_device *const counter,
struct counter_count *const count, u64 *const floor)
{ … }
static int i8254_count_preset_read(struct counter_device *const counter,
struct counter_count *const count, u64 *const preset)
{ … }
static int i8254_count_preset_write(struct counter_device *const counter,
struct counter_count *const count, const u64 preset)
{ … }
static int i8254_init_hw(struct regmap *const map)
{ … }
static const struct counter_ops i8254_ops = …;
#define I8254_SIGNAL(_id, _name) …
static struct counter_signal i8254_signals[] = …;
static const enum counter_synapse_action i8254_clk_actions[] = …;
static const enum counter_synapse_action i8254_gate_actions[] = …;
#define I8254_SYNAPSES_BASE(_id) …
#define I8254_SYNAPSE_CLK(_id) …
#define I8254_SYNAPSE_GATE(_id) …
static struct counter_synapse i8254_synapses[] = …;
static const enum counter_function i8254_functions_list[] = …;
static const enum counter_count_mode i8254_count_modes[] = …;
static DEFINE_COUNTER_AVAILABLE(i8254_count_modes_available, i8254_count_modes);
static struct counter_comp i8254_count_ext[] = …;
#define I8254_COUNT(_id, _name) …
static struct counter_count i8254_counts[I8254_NUM_COUNTERS] = …;
int devm_i8254_regmap_register(struct device *const dev,
const struct i8254_regmap_config *const config)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);