Commit 6a26f141 authored by Jacopo Mondi's avatar Jacopo Mondi Committed by Mauro Carvalho Chehab

media: i2c: mt9t112: Remove soc_camera dependencies

Remove soc_camera framework dependencies from mt9t112 sensor driver.
- Handle clk, gpios and power routines
- Register async subdev
- Remove deprecated g/s_mbus_config operations
- Remove driver flags
- Change driver interface and add kernel doc
- Adjust build system
- Fix code style issues reported by checkpatch in strict mode

This commit does not remove the original soc_camera based driver as long
as other platforms depends on soc_camera framework.

As I don't have access to a working camera module, this change has only
been compile tested.
Signed-off-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 7641b044
...@@ -788,6 +788,17 @@ config VIDEO_MT9T001 ...@@ -788,6 +788,17 @@ config VIDEO_MT9T001
This is a Video4Linux2 sensor-level driver for the Aptina This is a Video4Linux2 sensor-level driver for the Aptina
(Micron) mt0t001 3 Mpixel camera. (Micron) mt0t001 3 Mpixel camera.
config VIDEO_MT9T112
tristate "Aptina MT9T111/MT9T112 support"
depends on I2C && VIDEO_V4L2
depends on MEDIA_CAMERA_SUPPORT
---help---
This is a Video4Linux2 sensor-level driver for the Aptina
(Micron) MT9T111 and MT9T112 3 Mpixel camera.
To compile this driver as a module, choose M here: the
module will be called mt9t112.
config VIDEO_MT9V011 config VIDEO_MT9V011
tristate "Micron mt9v011 sensor support" tristate "Micron mt9v011 sensor support"
depends on I2C && VIDEO_V4L2 depends on I2C && VIDEO_V4L2
......
...@@ -80,6 +80,7 @@ obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o ...@@ -80,6 +80,7 @@ obj-$(CONFIG_VIDEO_MT9M032) += mt9m032.o
obj-$(CONFIG_VIDEO_MT9M111) += mt9m111.o obj-$(CONFIG_VIDEO_MT9M111) += mt9m111.o
obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o
obj-$(CONFIG_VIDEO_MT9T001) += mt9t001.o obj-$(CONFIG_VIDEO_MT9T001) += mt9t001.o
obj-$(CONFIG_VIDEO_MT9T112) += mt9t112.o
obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
......
This diff is collapsed.
...@@ -85,7 +85,7 @@ struct mt9t112_format { ...@@ -85,7 +85,7 @@ struct mt9t112_format {
struct mt9t112_priv { struct mt9t112_priv {
struct v4l2_subdev subdev; struct v4l2_subdev subdev;
struct mt9t112_camera_info *info; struct mt9t112_platform_data *info;
struct i2c_client *client; struct i2c_client *client;
struct v4l2_rect frame; struct v4l2_rect frame;
struct v4l2_clk *clk; struct v4l2_clk *clk;
......
/* SPDX-License-Identifier: GPL-2.0 */
/* mt9t112 Camera /* mt9t112 Camera
* *
* Copyright (C) 2009 Renesas Solutions Corp. * Copyright (C) 2009 Renesas Solutions Corp.
* Kuninori Morimoto <morimoto.kuninori@renesas.com> * Kuninori Morimoto <morimoto.kuninori@renesas.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/ */
#ifndef __MT9T112_H__ #ifndef __MT9T112_H__
#define __MT9T112_H__ #define __MT9T112_H__
#define MT9T112_FLAG_PCLK_RISING_EDGE (1 << 0)
#define MT9T112_FLAG_DATAWIDTH_8 (1 << 1) /* default width is 10 */
struct mt9t112_pll_divider { struct mt9t112_pll_divider {
u8 m, n; u8 m, n;
u8 p1, p2, p3, p4, p5, p6, p7; u8 p1, p2, p3, p4, p5, p6, p7;
}; };
/* /**
* mt9t112 camera info * mt9t112_platform_data - mt9t112 driver interface
* @flags: Sensor media bus configuration.
* @divider: Sensor PLL configuration
*/ */
struct mt9t112_camera_info { struct mt9t112_platform_data {
#define MT9T112_FLAG_PCLK_RISING_EDGE BIT(0)
u32 flags; u32 flags;
struct mt9t112_pll_divider divider; struct mt9t112_pll_divider divider;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment