mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
media: atomisp: Add some ACPI detection info
When someone would report problems with a new device, we need to know the DMI product ID and the ACPI name for the detected sensor. So, print them at dmesg. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
88a4711e79
commit
0d64e94205
8 changed files with 86 additions and 5 deletions
|
@ -1309,8 +1309,18 @@ static int gc0310_probe(struct i2c_client *client)
|
|||
int ret;
|
||||
void *pdata;
|
||||
unsigned int i;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
pr_info("%s S\n", __func__);
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -1051,6 +1051,17 @@ static int gc2235_probe(struct i2c_client *client)
|
|||
void *gcpdev;
|
||||
int ret;
|
||||
unsigned int i;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
|
|
|
@ -850,6 +850,17 @@ static int lm3554_probe(struct i2c_client *client)
|
|||
struct lm3554 *flash;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
flash = kzalloc(sizeof(*flash), GFP_KERNEL);
|
||||
if (!flash)
|
||||
|
|
|
@ -1816,6 +1816,17 @@ static int mt9m114_probe(struct i2c_client *client)
|
|||
int ret = 0;
|
||||
unsigned int i;
|
||||
void *pdata;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
/* Setup sensor configuration structure */
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
|
|
|
@ -1386,6 +1386,17 @@ static int ov2680_probe(struct i2c_client *client)
|
|||
int ret;
|
||||
void *pdata;
|
||||
unsigned int i;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
|
|
|
@ -1214,6 +1214,17 @@ static int ov2722_probe(struct i2c_client *client)
|
|||
struct ov2722_device *dev;
|
||||
void *ovpdev;
|
||||
int ret;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
|
|
|
@ -1901,6 +1901,17 @@ static int ov5693_probe(struct i2c_client *client)
|
|||
int ret = 0;
|
||||
void *pdata;
|
||||
unsigned int i;
|
||||
acpi_handle handle;
|
||||
struct acpi_device *adev;
|
||||
|
||||
handle = ACPI_HANDLE(&client->dev);
|
||||
if (!handle || acpi_bus_get_device(handle, &adev)) {
|
||||
dev_err(&client->dev, "Error could not get ACPI device\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("%s: ACPI detected it on bus ID=%s, HID=%s\n",
|
||||
__func__, acpi_device_bid(adev), acpi_device_hid(adev));
|
||||
|
||||
/*
|
||||
* Firmware workaround: Some modules use a "secondary default"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/pm_qos.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <asm/iosf_mbi.h>
|
||||
|
@ -1460,6 +1461,9 @@ static bool is_valid_device(struct pci_dev *dev,
|
|||
{
|
||||
unsigned int a0_max_id = 0;
|
||||
const char *name;
|
||||
const char *product;
|
||||
|
||||
product = dmi_get_system_info(DMI_PRODUCT_NAME);
|
||||
|
||||
switch (id->device & ATOMISP_PCI_DEVICE_SOC_MASK) {
|
||||
case ATOMISP_PCI_DEVICE_SOC_MRFLD:
|
||||
|
@ -1481,8 +1485,8 @@ static bool is_valid_device(struct pci_dev *dev,
|
|||
atomisp_hw_is_isp2401 = true;
|
||||
break;
|
||||
default:
|
||||
dev_err(&dev->dev, "Unknown device ID %x04:%x04\n",
|
||||
id->vendor, id->device);
|
||||
dev_err(&dev->dev, "%s: unknown device ID %x04:%x04\n",
|
||||
product, id->vendor, id->device);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1511,9 +1515,10 @@ static bool is_valid_device(struct pci_dev *dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
dev_info(&dev->dev, "Detected %s version %d (ISP240%c)\n",
|
||||
dev_info(&dev->dev, "Detected %s version %d (ISP240%c) on %s\n",
|
||||
name, dev->revision,
|
||||
atomisp_hw_is_isp2401 ? '1' : '0');
|
||||
atomisp_hw_is_isp2401 ? '1' : '0',
|
||||
product);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue