Symbol: max7360_rotary
drivers/input/misc/max7360-rotary.c
101
struct max7360_rotary *max7360_rotary;
drivers/input/misc/max7360-rotary.c
116
max7360_rotary = devm_kzalloc(dev, sizeof(*max7360_rotary), GFP_KERNEL);
drivers/input/misc/max7360-rotary.c
117
if (!max7360_rotary)
drivers/input/misc/max7360-rotary.c
120
max7360_rotary->regmap = regmap;
drivers/input/misc/max7360-rotary.c
122
device_property_read_u32(dev->parent, "linux,axis", &max7360_rotary->axis);
drivers/input/misc/max7360-rotary.c
123
max7360_rotary->rollover = device_property_read_bool(dev->parent,
drivers/input/misc/max7360-rotary.c
125
max7360_rotary->relative_axis =
drivers/input/misc/max7360-rotary.c
129
&max7360_rotary->steps);
drivers/input/misc/max7360-rotary.c
131
max7360_rotary->steps = MAX7360_ROTARY_DEFAULT_STEPS;
drivers/input/misc/max7360-rotary.c
134
&max7360_rotary->debounce_ms);
drivers/input/misc/max7360-rotary.c
135
if (max7360_rotary->debounce_ms > MAX7360_ROT_DEBOUNCE_MAX)
drivers/input/misc/max7360-rotary.c
137
max7360_rotary->debounce_ms);
drivers/input/misc/max7360-rotary.c
143
max7360_rotary->input = input;
drivers/input/misc/max7360-rotary.c
148
if (max7360_rotary->relative_axis)
drivers/input/misc/max7360-rotary.c
149
input_set_capability(input, EV_REL, max7360_rotary->axis);
drivers/input/misc/max7360-rotary.c
151
input_set_abs_params(input, max7360_rotary->axis, 0, max7360_rotary->steps, 0, 1);
drivers/input/misc/max7360-rotary.c
155
"max7360-rotary", max7360_rotary);
drivers/input/misc/max7360-rotary.c
163
error = max7360_rotary_hw_init(max7360_rotary);
drivers/input/misc/max7360-rotary.c
36
static void max7360_rotary_report_event(struct max7360_rotary *max7360_rotary, int steps)
drivers/input/misc/max7360-rotary.c
38
if (max7360_rotary->relative_axis) {
drivers/input/misc/max7360-rotary.c
39
input_report_rel(max7360_rotary->input, max7360_rotary->axis, steps);
drivers/input/misc/max7360-rotary.c
41
int pos = max7360_rotary->pos;
drivers/input/misc/max7360-rotary.c
42
int maxval = max7360_rotary->steps;
drivers/input/misc/max7360-rotary.c
51
if (max7360_rotary->rollover)
drivers/input/misc/max7360-rotary.c
56
max7360_rotary->pos = pos;
drivers/input/misc/max7360-rotary.c
57
input_report_abs(max7360_rotary->input, max7360_rotary->axis, max7360_rotary->pos);
drivers/input/misc/max7360-rotary.c
60
input_sync(max7360_rotary->input);
drivers/input/misc/max7360-rotary.c
65
struct max7360_rotary *max7360_rotary = data;
drivers/input/misc/max7360-rotary.c
66
struct device *dev = max7360_rotary->input->dev.parent;
drivers/input/misc/max7360-rotary.c
70
error = regmap_read(max7360_rotary->regmap, MAX7360_REG_RTR_CNT, &val);
drivers/input/misc/max7360-rotary.c
79
max7360_rotary_report_event(max7360_rotary, sign_extend32(val, 7));
drivers/input/misc/max7360-rotary.c
84
static int max7360_rotary_hw_init(struct max7360_rotary *max7360_rotary)
drivers/input/misc/max7360-rotary.c
86
struct device *dev = max7360_rotary->input->dev.parent;
drivers/input/misc/max7360-rotary.c
90
val = FIELD_PREP(MAX7360_ROT_DEBOUNCE, max7360_rotary->debounce_ms) |
drivers/input/misc/max7360-rotary.c
92
error = regmap_write(max7360_rotary->regmap, MAX7360_REG_RTRCFG, val);