rc: Allow specifying properties for i2c IR's
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 rc: Allow specifying properties for i2c IR's
Several I2C IR's only provide part of the IR protocol message (in general, they provide only the command part). Due to that, some props fields need to be specified.
Signed-off-by Mauro Carvalho Chehab <[email protected]>
drivers/media/video/ir-kbd-i2c.c +3 -1
@@ -270,6 +270,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) {char *ir_codes =NULL ;const char *name =NULL ; +struct ir_dev_props *props =NULL ;u64 ir_type =IR_TYPE_UNKNOWN ;struct IR_i2c *ir;struct input_dev *input_dev;
@@ -337,6 +338,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) name = init_data->name;if (init_data->type) ir_type = init_data->type; + props = init_data->props;if (init_data->polling_interval) ir->polling_interval = init_data->polling_interval;
@@ -388,7 +390,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) input_dev->name = ir->name; input_dev->phys = ir->phys; - err =ir_input_register (ir->input, ir->ir_codes,NULL ,MODULE_NAME ); + err =ir_input_register (ir->input, ir->ir_codes, props,MODULE_NAME );if (err) goto err_out_free;
include/media/ir-kbd-i2c.h +2 -0
@@ -47,5 +47,7 @@ struct IR_i2c_init_data {*/ int (*get_key)(struct IR_i2c *,u32 *,u32 *);enum ir_kbd_get_key_fn internal_get_key_func; + + struct ir_dev_props *props; };#endif
Signature · 1 line
1.7.1
PATCH 2/2 cx231xx: Don't register remote controls twice
In reply to a message not in the archiveThere's a bug at cx231xx-input, where it were registering the remote controls twice, one via ir-kbd-i2c and another directly. Fix it by registering it only once.
While here, also fix Kconfig symbol change for IR core dependencies.
Signed-off-by Mauro Carvalho Chehab <[email protected]>
drivers/media/video/cx231xx/Kconfig +1 -1
@@ -16,7 +16,7 @@ config VIDEO_CX231XX config VIDEO_CX231XX_RC bool "Conexant cx231xx Remote Controller additional support" - depends on VIDEO_IR + depends on IR_CORE depends on VIDEO_CX231XX default y ---help---
drivers/media/video/cx231xx/cx231xx-input.c +12 -35
86 lines not on this page · raw message
drivers/media/video/cx231xx/cx231xx.h +1 -12
@@ -602,17 +602,6 @@ struct cx231xx_tsport {void *port_priv; }; -struct cx231xx_ir_t { -struct input_dev *input_dev; -char name[40 ]; -char phys[32 ]; - -struct ir_dev_props props; - -/* I2C keyboard data */ -struct IR_i2c_init_data init_data; -}; -/* main device struct */ struct cx231xx {/* generic device properties */
@@ -623,7 +612,7 @@ struct cx231xx {struct cx231xx_board board;/* For I2C IR support */ -struct cx231xx_ir_t ir; +struct IR_i2c_init_data init_data; unsigned int stream_on:1; /* Locks streams */ unsigned int vbi_stream_on:1; /* Locks streams for VBI */
Signature · 1 line
1.7.1