* [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device
@ 2015-06-02 21:46 Andrew Duggan
2015-06-02 23:44 ` Benson Leung
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andrew Duggan @ 2015-06-02 21:46 UTC (permalink / raw)
To: linux-input, linux-kernel
Cc: Andrew Duggan, Jiri Kosina, Benjamin Tissoires, Mika Westerberg,
Benson Leung
The HID device does not need to know about the ACPI device associated with
the underlying i2c device. Setting the ACPI companion field in the HID device
also has the side effect of causing HID to be set as wake capable, since
acpi_bind_one uses's the companion ACPI device's wakeup flags to set the
device as wake capable. Which results in power/wakeup files in sysfs for
the HID device which do not do anything.
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
---
drivers/hid/i2c-hid/i2c-hid.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 92d6cdf..0dfb5d1 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1019,7 +1019,6 @@ static int i2c_hid_probe(struct i2c_client *client,
hid->driver_data = client;
hid->ll_driver = &i2c_hid_ll_driver;
hid->dev.parent = &client->dev;
- ACPI_COMPANION_SET(&hid->dev, ACPI_COMPANION(&client->dev));
hid->bus = BUS_I2C;
hid->version = le16_to_cpu(ihid->hdesc.bcdVersion);
hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device
2015-06-02 21:46 [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device Andrew Duggan
@ 2015-06-02 23:44 ` Benson Leung
2015-06-03 6:51 ` Mika Westerberg
2015-06-03 8:46 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Benson Leung @ 2015-06-02 23:44 UTC (permalink / raw)
To: Andrew Duggan
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Kosina, Benjamin Tissoires, Mika Westerberg
On Tue, Jun 2, 2015 at 2:46 PM, Andrew Duggan <aduggan@synaptics.com> wrote:
> The HID device does not need to know about the ACPI device associated with
> the underlying i2c device. Setting the ACPI companion field in the HID device
> also has the side effect of causing HID to be set as wake capable, since
> acpi_bind_one uses's the companion ACPI device's wakeup flags to set the
> device as wake capable. Which results in power/wakeup files in sysfs for
> the HID device which do not do anything.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
> ---
> drivers/hid/i2c-hid/i2c-hid.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 92d6cdf..0dfb5d1 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -1019,7 +1019,6 @@ static int i2c_hid_probe(struct i2c_client *client,
> hid->driver_data = client;
> hid->ll_driver = &i2c_hid_ll_driver;
> hid->dev.parent = &client->dev;
> - ACPI_COMPANION_SET(&hid->dev, ACPI_COMPANION(&client->dev));
> hid->bus = BUS_I2C;
> hid->version = le16_to_cpu(ihid->hdesc.bcdVersion);
> hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID);
> --
> 2.1.4
>
--
Benson Leung
Software Engineer, Chrom* OS
bleung@chromium.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device
2015-06-02 21:46 [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device Andrew Duggan
2015-06-02 23:44 ` Benson Leung
@ 2015-06-03 6:51 ` Mika Westerberg
2015-06-03 8:46 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2015-06-03 6:51 UTC (permalink / raw)
To: Andrew Duggan
Cc: linux-input, linux-kernel, Jiri Kosina, Benjamin Tissoires,
Benson Leung
On Tue, Jun 02, 2015 at 02:46:20PM -0700, Andrew Duggan wrote:
> The HID device does not need to know about the ACPI device associated with
> the underlying i2c device. Setting the ACPI companion field in the HID device
> also has the side effect of causing HID to be set as wake capable, since
> acpi_bind_one uses's the companion ACPI device's wakeup flags to set the
> device as wake capable. Which results in power/wakeup files in sysfs for
> the HID device which do not do anything.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device
2015-06-02 21:46 [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device Andrew Duggan
2015-06-02 23:44 ` Benson Leung
2015-06-03 6:51 ` Mika Westerberg
@ 2015-06-03 8:46 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2015-06-03 8:46 UTC (permalink / raw)
To: Andrew Duggan
Cc: linux-input, linux-kernel, Benjamin Tissoires, Mika Westerberg,
Benson Leung
On Tue, 2 Jun 2015, Andrew Duggan wrote:
> The HID device does not need to know about the ACPI device associated with
> the underlying i2c device. Setting the ACPI companion field in the HID device
> also has the side effect of causing HID to be set as wake capable, since
> acpi_bind_one uses's the companion ACPI device's wakeup flags to set the
> device as wake capable. Which results in power/wakeup files in sysfs for
> the HID device which do not do anything.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Applied to for-4.2/i2c-hid.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-03 8:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 21:46 [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device Andrew Duggan
2015-06-02 23:44 ` Benson Leung
2015-06-03 6:51 ` Mika Westerberg
2015-06-03 8:46 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).