lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171002213215.32201-1-rajatja@google.com>
Date:   Mon,  2 Oct 2017 14:32:15 -0700
From:   Rajat Jain <rajatja@...gle.com>
To:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        David Arcari <darcari@...hat.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        HungNien Chen <hn.chen@...dahitech.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Brian Norris <briannorris@...omium.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>, dtor@...gle.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        rajatxjain@...il.com
Cc:     Rajat Jain <rajatja@...gle.com>
Subject: [PATCH] HID: i2c-hid: Allow ACPI systems to specify "post-power-on-delay-ms"

The property "post-power-on-delay-ms"" allows a platform to specify
the delay needed after power-on, but only via device trees. Thus
allow ACPI systems to also provide the same information.

Signed-off-by: Rajat Jain <rajatja@...gle.com>
---
 drivers/hid/i2c-hid/i2c-hid.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 77396145d2d0..97405156315a 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -865,6 +865,7 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
 	union acpi_object *obj;
 	struct acpi_device *adev;
 	acpi_handle handle;
+	u32 val;
 
 	handle = ACPI_HANDLE(&client->dev);
 	if (!handle || acpi_bus_get_device(handle, &adev))
@@ -880,6 +881,10 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
 	pdata->hid_descriptor_address = obj->integer.value;
 	ACPI_FREE(obj);
 
+	if (!device_property_read_u32(&client->dev, "post-power-on-delay-ms",
+				      &val))
+		pdata->post_power_delay_ms = val;
+
 	return 0;
 }
 
-- 
2.14.2.822.g60be5d43e6-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ