Skip to content

Commit 7cbeb2e

Browse files
Sakari Ailusmchehab
authored andcommitted
media: smiapp: Move definitions under driver directory
include/media/i2c/smiapp.h was meant to serve systems where the sensor is enumerated through platform data. That's no longer necessary, hopefully not even in out-of-tree use cases. Move the definitions to the appropriate headers. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
1 parent 354d5ab commit 7cbeb2e

3 files changed

Lines changed: 47 additions & 64 deletions

File tree

‎drivers/media/i2c/smiapp/smiapp-reg.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
#define SMIAPP_FLASH_MODE_CAPABILITY_SINGLE_STROBE BIT(0)
3636
#define SMIAPP_FLASH_MODE_CAPABILITY_MULTIPLE_STROBE BIT(1)
3737

38+
#define SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_CLOCK 0
39+
#define SMIAPP_CSI_SIGNALLING_MODE_CCP2_DATA_STROBE 1
40+
#define SMIAPP_CSI_SIGNALLING_MODE_CSI2 2
41+
3842
#define SMIAPP_DPHY_CTRL_AUTOMATIC 0
3943
/* DPHY control based on REQUESTED_LINK_BIT_RATE_MBPS */
4044
#define SMIAPP_DPHY_CTRL_UI 1

‎drivers/media/i2c/smiapp/smiapp.h‎

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/mutex.h>
1515
#include <media/v4l2-ctrls.h>
1616
#include <media/v4l2-subdev.h>
17-
#include <media/i2c/smiapp.h>
1817

1918
#include "smiapp-pll.h"
2019
#include "smiapp-reg.h"
@@ -42,6 +41,49 @@
4241

4342
#define SMIAPP_COLOUR_COMPONENTS 4
4443

44+
#define SMIAPP_NAME "smiapp"
45+
46+
#define SMIAPP_DFL_I2C_ADDR (0x20 >> 1) /* Default I2C Address */
47+
#define SMIAPP_ALT_I2C_ADDR (0x6e >> 1) /* Alternate I2C Address */
48+
49+
/*
50+
* Sometimes due to board layout considerations the camera module can be
51+
* mounted rotated. The typical rotation used is 180 degrees which can be
52+
* corrected by giving a default H-FLIP and V-FLIP in the sensor readout.
53+
* FIXME: rotation also changes the bayer pattern.
54+
*/
55+
enum smiapp_module_board_orient {
56+
SMIAPP_MODULE_BOARD_ORIENT_0 = 0,
57+
SMIAPP_MODULE_BOARD_ORIENT_180,
58+
};
59+
60+
struct smiapp_flash_strobe_parms {
61+
u8 mode;
62+
u32 strobe_width_high_us;
63+
u16 strobe_delay;
64+
u16 stobe_start_point;
65+
u8 trigger;
66+
};
67+
68+
struct smiapp_hwconfig {
69+
/*
70+
* Change the cci address if i2c_addr_alt is set.
71+
* Both default and alternate cci addr need to be present
72+
*/
73+
unsigned short i2c_addr_dfl; /* Default i2c addr */
74+
unsigned short i2c_addr_alt; /* Alternate i2c addr */
75+
76+
uint32_t ext_clk; /* sensor external clk */
77+
78+
unsigned int lanes; /* Number of CSI-2 lanes */
79+
uint32_t csi_signalling_mode; /* SMIAPP_CSI_SIGNALLING_MODE_* */
80+
uint64_t *op_sys_clock;
81+
82+
enum smiapp_module_board_orient module_board_orient;
83+
84+
struct smiapp_flash_strobe_parms *strobe_setup;
85+
};
86+
4587
#include "smiapp-limits.h"
4688

4789
struct smiapp_quirk;

‎include/media/i2c/smiapp.h‎

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)