/linux-4.1.27/drivers/input/misc/ |
H A D | bfin_rotary.c | 55 static void report_rotary_event(struct bfin_rot *rotary, int delta) report_rotary_event() argument 57 struct input_dev *input = rotary->input; report_rotary_event() 59 if (rotary->up_key) { report_rotary_event() 61 delta > 0 ? rotary->up_key : rotary->down_key); report_rotary_event() 63 input_report_rel(input, rotary->rel_code, delta); report_rotary_event() 70 struct bfin_rot *rotary = dev_id; bfin_rotary_isr() local 73 switch (readw(rotary->base + CNT_STATUS_OFF)) { bfin_rotary_isr() 80 delta = readl(rotary->base + CNT_COUNTER_OFF); bfin_rotary_isr() 82 report_rotary_event(rotary, delta); bfin_rotary_isr() 86 report_key_event(rotary->input, rotary->button_key); bfin_rotary_isr() 93 writew(W1LCNT_ZERO, rotary->base + CNT_COMMAND_OFF); /* Clear COUNTER */ bfin_rotary_isr() 94 writew(-1, rotary->base + CNT_STATUS_OFF); /* Clear STATUS */ bfin_rotary_isr() 101 struct bfin_rot *rotary = input_get_drvdata(input); bfin_rotary_open() local 104 if (rotary->mode & ROT_DEBE) bfin_rotary_open() 105 writew(rotary->debounce & DPRESCALE, bfin_rotary_open() 106 rotary->base + CNT_DEBOUNCE_OFF); bfin_rotary_open() 108 writew(rotary->mode & ~CNTE, rotary->base + CNT_CONFIG_OFF); bfin_rotary_open() 111 if (rotary->button_key) bfin_rotary_open() 113 writew(val, rotary->base + CNT_IMASK_OFF); bfin_rotary_open() 115 writew(rotary->mode | CNTE, rotary->base + CNT_CONFIG_OFF); bfin_rotary_open() 122 struct bfin_rot *rotary = input_get_drvdata(input); bfin_rotary_close() local 124 writew(0, rotary->base + CNT_CONFIG_OFF); bfin_rotary_close() 125 writew(0, rotary->base + CNT_IMASK_OFF); bfin_rotary_close() 137 struct bfin_rot *rotary; bfin_rotary_probe() local 167 rotary = devm_kzalloc(dev, sizeof(struct bfin_rot), GFP_KERNEL); bfin_rotary_probe() 168 if (!rotary) bfin_rotary_probe() 172 rotary->base = devm_ioremap_resource(dev, res); bfin_rotary_probe() 173 if (IS_ERR(rotary->base)) bfin_rotary_probe() 174 return PTR_ERR(rotary->base); bfin_rotary_probe() 180 rotary->input = input; bfin_rotary_probe() 182 rotary->up_key = pdata->rotary_up_key; bfin_rotary_probe() 183 rotary->down_key = pdata->rotary_down_key; bfin_rotary_probe() 184 rotary->button_key = pdata->rotary_button_key; bfin_rotary_probe() 185 rotary->rel_code = pdata->rotary_rel_code; bfin_rotary_probe() 187 rotary->mode = pdata->mode; bfin_rotary_probe() 188 rotary->debounce = pdata->debounce; bfin_rotary_probe() 191 input->phys = "bfin-rotary/input0"; bfin_rotary_probe() 194 input_set_drvdata(input, rotary); bfin_rotary_probe() 204 if (rotary->up_key) { bfin_rotary_probe() 206 __set_bit(rotary->up_key, input->keybit); bfin_rotary_probe() 207 __set_bit(rotary->down_key, input->keybit); bfin_rotary_probe() 210 __set_bit(rotary->rel_code, input->relbit); bfin_rotary_probe() 213 if (rotary->button_key) { bfin_rotary_probe() 215 __set_bit(rotary->button_key, input->keybit); bfin_rotary_probe() 221 rotary->irq = platform_get_irq(pdev, 0); bfin_rotary_probe() 222 if (rotary->irq < 0) { bfin_rotary_probe() 223 dev_err(dev, "No rotary IRQ specified\n"); bfin_rotary_probe() 227 error = devm_request_irq(dev, rotary->irq, bfin_rotary_isr, bfin_rotary_probe() 228 0, dev_name(dev), rotary); bfin_rotary_probe() 231 rotary->irq, error); bfin_rotary_probe() 241 platform_set_drvdata(pdev, rotary); bfin_rotary_probe() 250 struct bfin_rot *rotary = platform_get_drvdata(pdev); bfin_rotary_suspend() local 252 rotary->cnt_config = readw(rotary->base + CNT_CONFIG_OFF); bfin_rotary_suspend() 253 rotary->cnt_imask = readw(rotary->base + CNT_IMASK_OFF); bfin_rotary_suspend() 254 rotary->cnt_debounce = readw(rotary->base + CNT_DEBOUNCE_OFF); bfin_rotary_suspend() 257 enable_irq_wake(rotary->irq); bfin_rotary_suspend() 265 struct bfin_rot *rotary = platform_get_drvdata(pdev); bfin_rotary_resume() local 267 writew(rotary->cnt_debounce, rotary->base + CNT_DEBOUNCE_OFF); bfin_rotary_resume() 268 writew(rotary->cnt_imask, rotary->base + CNT_IMASK_OFF); bfin_rotary_resume() 269 writew(rotary->cnt_config & ~CNTE, rotary->base + CNT_CONFIG_OFF); bfin_rotary_resume() 272 disable_irq_wake(rotary->irq); bfin_rotary_resume() 274 if (rotary->cnt_config & CNTE) bfin_rotary_resume() 275 writew(rotary->cnt_config, rotary->base + CNT_CONFIG_OFF); bfin_rotary_resume() 286 .name = "bfin-rotary", 295 MODULE_ALIAS("platform:bfin-rotary");
|
H A D | rotary_encoder.c | 9 * A generic driver for rotary encoders connected to GPIO lines. 10 * See file:Documentation/input/rotary-encoder.txt for more information 30 #define DRV_NAME "rotary-encoder" 147 { .compatible = "rotary-encoder", }, 168 of_property_read_u32(np, "rotary-encoder,steps", &pdata->steps); rotary_encoder_parse_dt() 178 "rotary-encoder,relative-axis", NULL); rotary_encoder_parse_dt() 180 "rotary-encoder,rollover", NULL); rotary_encoder_parse_dt() 182 "rotary-encoder,half-period", NULL); rotary_encoder_parse_dt() 334 MODULE_DESCRIPTION("GPIO rotary encoder driver");
|
/linux-4.1.27/include/linux/platform_data/ |
H A D | keypad-pxa27x.h | 16 * _plus_ the number of rotary-encoder sensor inputs, this can be 17 * left as 0 if only rotary encoders are enabled, the driver will 20 * 2. direct_key_map is the key code map for the direct keys, if rotary 23 * 3. rotary can be either interpreted as a relative input event (e.g. 51 /* rotary encoders 0 */ 57 /* rotary encoders 1 */
|
H A D | bfin_rotary.h | 3 * and place the bfin-rotary onto platform_bus named "bfin-rotary". 16 #define ROT_UD_CNT CNTMODE_UDCNT /* rotary counter mode */ 26 /* set rotary UP KEY_### or BTN_### in case you prefer 27 * bfin-rotary to send EV_KEY otherwise set 0 30 /* set rotary DOWN KEY_### or BTN_### in case you prefer 31 * bfin-rotary to send EV_KEY otherwise set 0 34 /* set rotary BUTTON KEY_### or BTN_### */ 36 /* set rotary Relative Axis REL_### in case you prefer 37 * bfin-rotary to send EV_REL otherwise set 0
|
H A D | keyboard-pxa930_rotary.h | 6 * rotary can be either interpreted as a ralative input event (e.g.
|
/linux-4.1.27/drivers/input/keyboard/ |
H A D | pxa930_rotary.c | 2 * Driver for the enhanced rotary controller on pxa930 and pxa935 96 dev_err(&pdev->dev, "no irq for rotary controller\n"); pxa930_rotary_probe() 152 "enhanced rotary", r); pxa930_rotary_probe() 191 .name = "pxa930-rotary",
|
H A D | pxa27x_keypad.c | 219 const char relkeyname[] = {"marvell,rotary-rel-key"}; pxa27x_keypad_rotary_parse_dt() 225 /* if can read correct rotary key-code, we do not need this. */ pxa27x_keypad_rotary_parse_dt() 312 dev_err(dev, "failed to parse rotary key\n"); pxa27x_keypad_build_keycode_from_dt() 325 * key or rotary key. pxa27x_keypad_build_keycode_from_dt() 361 * or rotary keys. pxa27x_keypad_build_keycode() 610 /* enable rotary key, debounce interval same as direct keys */ pxa27x_keypad_config()
|
/linux-4.1.27/sound/usb/caiaq/ |
H A D | input.c | 327 /* rotary encoders */ snd_caiaq_input_read_io() 363 /* rotary encoders */ snd_usb_caiaq_tks4_dispatch() 705 /* rotary encoders */ snd_usb_caiaq_input_init() 746 /* 9 rotary encoders */ snd_usb_caiaq_input_init()
|
/linux-4.1.27/arch/blackfin/mach-bf548/boards/ |
H A D | ezkit.c | 188 .name = "bfin-rotary", 2123 PIN_MAP_MUX_GROUP_DEFAULT("bfin-rotary", "pinctrl-adi2.0", NULL, "rotary"),
|
/linux-4.1.27/arch/blackfin/mach-bf609/boards/ |
H A D | ezkit.c | 103 .name = "bfin-rotary", 2136 PIN_MAP_MUX_GROUP_DEFAULT("bfin-rotary", "pinctrl-adi2.0", NULL, "rotary"),
|
/linux-4.1.27/drivers/pinctrl/ |
H A D | pinctrl-adi2-bf54x.c | 559 ADI_PMX_FUNCTION("rotary", rotarygrp),
|
H A D | pinctrl-adi2-bf60x.c | 490 ADI_PMX_FUNCTION("rotary", rotarygrp),
|
/linux-4.1.27/arch/blackfin/mach-bf527/boards/ |
H A D | ad7160eval.c | 703 .name = "bfin-rotary",
|
H A D | ezkit.c | 1129 .name = "bfin-rotary",
|
/linux-4.1.27/arch/arm/mach-pxa/ |
H A D | raumfeld.c | 380 .name = "rotary-encoder",
|