Lines Matching +full:model +full:- +full:dependent
1 // SPDX-License-Identifier: GPL-2.0
15 #define MODULE_NAME "cx231xx-input"
23 dev_dbg(&ir->rc->dev, "%s\n", __func__); in get_key_isdbt()
26 rc = i2c_master_recv(ir->c, &cmd, 1); in get_key_isdbt()
30 return -EIO; in get_key_isdbt()
41 dev_dbg(&ir->rc->dev, "cmd %02x, scan = %02x\n", cmd, scancode); in get_key_isdbt()
54 dev_dbg(dev->dev, "%s\n", __func__); in cx231xx_ir_init()
57 if (!cx231xx_boards[dev->model].rc_map_name) in cx231xx_ir_init()
58 return -ENODEV; in cx231xx_ir_init()
60 request_module("ir-kbd-i2c"); in cx231xx_ir_init()
63 memset(&dev->init_data, 0, sizeof(dev->init_data)); in cx231xx_ir_init()
64 dev->init_data.rc_dev = rc_allocate_device(RC_DRIVER_SCANCODE); in cx231xx_ir_init()
65 if (!dev->init_data.rc_dev) in cx231xx_ir_init()
66 return -ENOMEM; in cx231xx_ir_init()
68 dev->init_data.name = cx231xx_boards[dev->model].name; in cx231xx_ir_init()
71 info.platform_data = &dev->init_data; in cx231xx_ir_init()
74 * Board-dependent values in cx231xx_ir_init()
79 dev->init_data.get_key = get_key_isdbt; in cx231xx_ir_init()
80 dev->init_data.ir_codes = cx231xx_boards[dev->model].rc_map_name; in cx231xx_ir_init()
81 /* The i2c micro-controller only outputs the cmd part of NEC protocol */ in cx231xx_ir_init()
82 dev->init_data.rc_dev->scancode_mask = 0xff; in cx231xx_ir_init()
83 dev->init_data.rc_dev->driver_name = "cx231xx"; in cx231xx_ir_init()
84 dev->init_data.type = RC_PROTO_BIT_NEC; in cx231xx_ir_init()
87 /* Load and bind ir-kbd-i2c */ in cx231xx_ir_init()
88 ir_i2c_bus = cx231xx_boards[dev->model].ir_i2c_master; in cx231xx_ir_init()
89 dev_dbg(dev->dev, "Trying to bind ir at bus %d, addr 0x%02x\n", in cx231xx_ir_init()
91 dev->ir_i2c_client = i2c_new_client_device( in cx231xx_ir_init()
99 i2c_unregister_device(dev->ir_i2c_client); in cx231xx_ir_exit()
100 dev->ir_i2c_client = NULL; in cx231xx_ir_exit()