};
/*
- * imx274 test pattern related structure
+ * imx274 test pattern related enum
*/
enum {
TEST_PATTERN_DISABLED = 0,
/*
* struct imx274_ctrls - imx274 ctrl structure
* @handler: V4L2 ctrl handler structure
- * @exposure: Pointer to expsure ctrl structure
+ * @exposure: Pointer to exposure ctrl structure
* @gain: Pointer to gain ctrl structure
* @vflip: Pointer to vflip ctrl structure
* @test_pattern: Pointer to test pattern ctrl structure
};
/*
- * struct stim274 - imx274 device structure
+ * struct stimx274 - imx274 device structure
* @sd: V4L2 subdevice structure
* @pad: Media pad structure
* @client: Pointer to I2C client
? rounddown((dim), (step)) \
: rounddown((dim) + (step) / 2, (step))))
-/*
- * Function declaration
- */
static int imx274_set_gain(struct stimx274 *priv, struct v4l2_ctrl *ctrl);
static int imx274_set_exposure(struct stimx274 *priv, int val);
static int imx274_set_vflip(struct stimx274 *priv, int val);
for (next = table;; next++) {
if ((next->addr != range_start + range_count) ||
- (next->addr == IMX274_TABLE_END) ||
- (next->addr == IMX274_TABLE_WAIT_MS) ||
- (range_count == max_range_vals)) {
+ next->addr == IMX274_TABLE_END ||
+ next->addr == IMX274_TABLE_WAIT_MS ||
+ range_count == max_range_vals) {
if (range_count == 1)
err = regmap_write(regmap,
range_start, range_vals[0]);
err = regmap_bulk_write(regmap, range_start,
&range_vals[0],
range_count);
- else
- err = 0;
if (err)
return err;
struct device *dev = &client->dev;
int ret;
- /* initialize imx274 */
imx274 = devm_kzalloc(dev, sizeof(*imx274), GFP_KERNEL);
if (!imx274)
return -ENOMEM;
static struct i2c_driver imx274_i2c_driver = {
.driver = {
- .name = DRIVER_NAME,
+ .name = DRIVER_NAME,
.pm = &imx274_pm_ops,
.of_match_table = imx274_of_id_table,
},