msm: camera: sensor: Add component support for i2c driver
Sometimes, i2c driver will be probed earlier than CRM driver ready, then we can't register the subdev for this i2c driver. This change adds the component support for i2c driver. CRs-Fixed: 3073284 Change-Id: I5ee176497a667729d964758ac0909f6902877094 Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
9d22ec64fc
commit
d8d3eaa882
@@ -7,6 +7,7 @@
|
||||
#define CAMERA_MAIN_H
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
extern struct platform_driver cam_sync_driver;
|
||||
@@ -35,6 +36,11 @@ extern struct platform_driver cam_sensor_platform_driver;
|
||||
extern struct platform_driver cam_eeprom_platform_driver;
|
||||
extern struct platform_driver cam_ois_platform_driver;
|
||||
extern struct platform_driver cam_tpg_driver;
|
||||
extern struct i2c_driver cam_actuator_i2c_driver;
|
||||
extern struct i2c_driver cam_flash_i2c_driver;
|
||||
extern struct i2c_driver cam_ois_i2c_driver;
|
||||
extern struct i2c_driver cam_eeprom_i2c_driver;
|
||||
extern struct i2c_driver cam_sensor_i2c_driver;
|
||||
#if IS_REACHABLE(CONFIG_LEDS_QPNP_FLASH_V2) || \
|
||||
IS_REACHABLE(CONFIG_LEDS_QTI_FLASH)
|
||||
extern struct platform_driver cam_flash_platform_driver;
|
||||
@@ -78,7 +84,7 @@ extern struct platform_driver custom_driver;
|
||||
* Drivers to be bound by component framework in this order with
|
||||
* CRM as master
|
||||
*/
|
||||
static struct platform_driver *const cam_component_drivers[] = {
|
||||
static struct platform_driver *const cam_component_platform_drivers[] = {
|
||||
/* BASE */
|
||||
&cam_sync_driver,
|
||||
&cam_smmu_driver,
|
||||
@@ -146,4 +152,15 @@ static struct platform_driver *const cam_component_drivers[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
static struct i2c_driver *const cam_component_i2c_drivers[] = {
|
||||
#ifdef CONFIG_SPECTRA_SENSOR
|
||||
&cam_actuator_i2c_driver,
|
||||
&cam_flash_i2c_driver,
|
||||
&cam_ois_i2c_driver,
|
||||
&cam_eeprom_i2c_driver,
|
||||
&cam_sensor_i2c_driver,
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* CAMERA_MAIN_H */
|
||||
|
Reference in New Issue
Block a user