media: smiapp: Differentiate CCS sensors from SMIA in subdev naming
Call CCS compliant sensors as "ccs" instead of "smiapp" in absence of a device specific name. This is done based on the value of the manufacturer ID register that is only present in CCS. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
161cc84737
commit
571b6caff4
@ -2437,8 +2437,6 @@ static int ccs_identify_module(struct ccs_sensor *sensor)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
int rval = 0;
|
int rval = 0;
|
||||||
|
|
||||||
minfo->name = SMIAPP_NAME;
|
|
||||||
|
|
||||||
/* Module info */
|
/* Module info */
|
||||||
rval = ccs_read(sensor, MODULE_MANUFACTURER_ID,
|
rval = ccs_read(sensor, MODULE_MANUFACTURER_ID,
|
||||||
&minfo->mipi_manufacturer_id);
|
&minfo->mipi_manufacturer_id);
|
||||||
@ -2528,15 +2526,18 @@ static int ccs_identify_module(struct ccs_sensor *sensor)
|
|||||||
"sensor revision 0x%2.2x firmware version 0x%2.2x\n",
|
"sensor revision 0x%2.2x firmware version 0x%2.2x\n",
|
||||||
minfo->sensor_revision_number, minfo->sensor_firmware_version);
|
minfo->sensor_revision_number, minfo->sensor_firmware_version);
|
||||||
|
|
||||||
if (minfo->ccs_version)
|
if (minfo->ccs_version) {
|
||||||
dev_dbg(&client->dev, "MIPI CCS version %u.%u",
|
dev_dbg(&client->dev, "MIPI CCS version %u.%u",
|
||||||
(minfo->ccs_version & CCS_MIPI_CCS_VERSION_MAJOR_MASK)
|
(minfo->ccs_version & CCS_MIPI_CCS_VERSION_MAJOR_MASK)
|
||||||
>> CCS_MIPI_CCS_VERSION_MAJOR_SHIFT,
|
>> CCS_MIPI_CCS_VERSION_MAJOR_SHIFT,
|
||||||
(minfo->ccs_version & CCS_MIPI_CCS_VERSION_MINOR_MASK));
|
(minfo->ccs_version & CCS_MIPI_CCS_VERSION_MINOR_MASK));
|
||||||
else
|
minfo->name = CCS_NAME;
|
||||||
|
} else {
|
||||||
dev_dbg(&client->dev,
|
dev_dbg(&client->dev,
|
||||||
"smia version %2.2d smiapp version %2.2d\n",
|
"smia version %2.2d smiapp version %2.2d\n",
|
||||||
minfo->smia_version, minfo->smiapp_version);
|
minfo->smia_version, minfo->smiapp_version);
|
||||||
|
minfo->name = SMIAPP_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some modules have bad data in the lvalues below. Hope the
|
* Some modules have bad data in the lvalues below. Hope the
|
||||||
|
Loading…
Reference in New Issue
Block a user