fixing LM3648 flash driver (v4l2) after testing LM3648EVM
authorDaniel Jeong <gshark.jeong@gmail.com>
Mon, 15 Dec 2014 09:36:12 +0000 (18:36 +0900)
committerDaniel Jeong <gshark.jeong@gmail.com>
Mon, 15 Dec 2014 09:36:12 +0000 (18:36 +0900)
Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
drivers/media/i2c/lm3648.c
include/uapi/linux/v4l2-controls.h

index 773e14e0aedd5ee5cc48554e0d85d44596da388e..00630a333d16b56e2f0128f676ceac1a552e95e1 100644 (file)
@@ -76,7 +76,6 @@ struct lm3648_flash {
 
        struct v4l2_ctrl_handler ctrls_led;
        struct v4l2_subdev subdev_led;
-struct v4l2_device v4l2_dev;
 
        u8 mode_reg;
 };
@@ -288,7 +287,6 @@ static int lm3648_subdev_init(struct lm3648_flash *flash)
        struct i2c_client *client = to_i2c_client(flash->dev);
        int rval;
 
-rval = v4l2_device_register(&client->dev, &flash->v4l2_dev);
        v4l2_i2c_subdev_init(&flash->subdev_led, client, &lm3648_ops);
        flash->subdev_led.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
        strcpy(flash->subdev_led.name, LM3648_NAME);
@@ -299,8 +297,6 @@ rval = v4l2_device_register(&client->dev, &flash->v4l2_dev);
        if (rval < 0)
                goto err_out;
        flash->subdev_led.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH;
-rval = v4l2_device_register_subdev(&flash->v4l2_dev, &flash->subdev_led);
-rval = v4l2_device_register_subdev_nodes(&flash->v4l2_dev);
        return rval;
 
 err_out:
index b18d8942e4b547d822e4ed87bd924da2d187fa57..31d93df207cc141868bf12649a3c5bb6c55d3ad9 100644 (file)
@@ -804,6 +804,9 @@ enum v4l2_flash_strobe_source {
 #define V4L2_FLASH_FAULT_SHORT_CIRCUIT         (1 << 3)
 #define V4L2_FLASH_FAULT_OVER_CURRENT          (1 << 4)
 #define V4L2_FLASH_FAULT_INDICATOR             (1 << 5)
+#define V4L2_FLASH_FAULT_UNDER_VOLTAGE         (1 << 6)
+#define V4L2_FLASH_FAULT_INPUT_VOLTAGE         (1 << 7)
+#define V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE  (1 << 8)
 
 #define V4L2_CID_FLASH_CHARGE                  (V4L2_CID_FLASH_CLASS_BASE + 11)
 #define V4L2_CID_FLASH_READY                   (V4L2_CID_FLASH_CLASS_BASE + 12)