Lines Matching +full:prop +full:- +full:3

4  * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/dt-bindings/input/keymap.h>
35 const struct keymap_config *cfg = dev->config; in keymap_cb()
36 struct keymap_data *data = dev->data; in keymap_cb()
37 const uint16_t *codes = cfg->codes; in keymap_cb()
40 switch (evt->code) { in keymap_cb()
42 data->col = evt->value; in keymap_cb()
45 data->row = evt->value; in keymap_cb()
48 data->pressed = evt->value; in keymap_cb()
52 if (!evt->sync) { in keymap_cb()
56 if (data->row >= cfg->row_size || in keymap_cb()
57 data->col >= cfg->col_size) { in keymap_cb()
58 LOG_WRN("keymap event out of range: row=%u col=%u", data->row, data->col); in keymap_cb()
62 offset = (data->row * cfg->col_size) + data->col; in keymap_cb()
64 if (offset >= cfg->num_codes || codes[offset] == 0) { in keymap_cb()
65 LOG_DBG("keymap event undefined: row=%u col=%u", data->row, data->col); in keymap_cb()
69 LOG_DBG("input event: %3u %3u %d", data->row, data->col, data->pressed); in keymap_cb()
71 input_report_key(dev, codes[offset], data->pressed, true, K_FOREVER); in keymap_cb()
76 const struct keymap_config *cfg = dev->config; in keymap_init()
78 if (!device_is_ready(cfg->input_dev)) { in keymap_init()
80 return -ENODEV; in keymap_init()
91 #define KEYMAP_ENTRY_VALIDATE(node_id, prop, idx) \ argument
92 BUILD_ASSERT(MATRIX_ROW(DT_PROP_BY_IDX(node_id, prop, idx)) < \
94 BUILD_ASSERT(MATRIX_COL(DT_PROP_BY_IDX(node_id, prop, idx)) < \
97 #define CODES_INIT(node_id, prop, idx) \ argument
98 [KEYMAP_ENTRY_OFFSET(DT_PROP_BY_IDX(node_id, prop, idx), DT_PROP(node_id, col_size))] = \
99 KEYMAP_ENTRY_CODE(DT_PROP_BY_IDX(node_id, prop, idx)),