diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-10 11:29:57 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-20 15:51:28 +0300 |
commit | 0d64e9420583cbc3c4a3f949ebe38fd8f7769281 (patch) | |
tree | 70949533a268f221ba8239d7fcd85f3a4d410240 /drivers/staging/media/atomisp/i2c | |
parent | 88a4711e7973836e3802e75e954e3cd1b07b3fba (diff) | |
download | linux-0d64e9420583cbc3c4a3f949ebe38fd8f7769281.tar.xz |
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>
Diffstat (limited to 'drivers/staging/media/atomisp/i2c')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 12 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 11 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 11 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 11 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 11 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 11 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 11 |
7 files changed, 77 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index 6ca708e8ff6a..b69a5b50e3bc 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c @@ -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; diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index b663b47449a7..e863e19f2669 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -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) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c index 05f9b354a70e..0e9f80239dcb 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c @@ -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) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 9c426c95dc3f..e7af4bbd844b 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -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); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index cb8989e35167..4f1e0d8df8e1 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -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) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index 44edd182fbab..08799054704a 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -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) diff --git a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c index 9e92ee8626e5..6572e927cf9b 100644 --- a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c +++ b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c @@ -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" |