Commit 0d64e942 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

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: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 88a4711e
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -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;
+11 −0
Original line number Diff line number Diff line
@@ -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)
+11 −0
Original line number Diff line number Diff line
@@ -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)
+11 −0
Original line number Diff line number Diff line
@@ -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);
+11 −0
Original line number Diff line number Diff line
@@ -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)
Loading