Commit graph

3 commits

Author SHA1 Message Date
Azael Avalos
7dd62c0178 toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macros
This patch makes use of DEVICE_ATTR_{RW, WO} macros, simplifying
device attributes creation.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-05-11 10:38:22 -07:00
Azael Avalos
a882003714 toshiba_haps: Replace sscanf with kstrtoint
This patch simply replaces the use of sscanf with kstrtoint returning
the error code in case that something went bad.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2015-05-11 10:38:22 -07:00
Azael Avalos
23d0ba0c90 platform/x86: Toshiba HDD Active Protection Sensor
This driver adds support for the built-in accelereometer found
on recent Toshiba laptops with HID TOS620A.

This driver receives ACPI notify events 0x80 when the sensor
detects a sudden move or a harsh vibration, as well as an
ACPI notify event 0x81 whenever the movement or vibration has
been stabilized.

Also provides sysfs entries to get/set the desired protection
level and reseting the HDD protection interface.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-08-16 01:23:56 -07:00