summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/toshiba_haps.c
Commit message (Collapse)AuthorAgeFilesLines
* platform/x86: toshiba_haps: constify haps_attr_groupArvind Yadav2017-06-281-1/+1
| | | | | | | | | | | | | File size before: text data bss dec hex filename 1471 528 8 2007 7d7 drivers/platform/x86/toshiba_haps.o File size After adding 'const': text data bss dec hex filename 1519 464 8 1991 7c7 drivers/platform/x86/toshiba_haps.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* platform/x86: toshiba_haps: Change logging level from info to debugAzael Avalos2016-09-231-2/+2
| | | | | | | | | | | | Two of the internal functions are printing an info message, one whenever the HDD protection level changes, and another when the driver receives an ACPI event. This patch changes those two prints to debug, as that information is more pertaining to debuging purposes. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* platform/x86: toshiba_haps: Split ACPI and HDD protection error handlingAzael Avalos2016-09-231-3/+7
| | | | | | | | | | | | Currently the code checking for the ACPI status is mixed along with the actual HDD protection status check. This patch splits those two checks as they are not related, printing an error string in case the ACPI call failed, and then check for actual HDD protection status. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macrosAzael Avalos2015-05-111-4/+2
| | | | | | | | 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>
* toshiba_haps: Replace sscanf with kstrtointAzael Avalos2015-05-111-8/+18
| | | | | | | | 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>
* platform/x86: Toshiba HDD Active Protection SensorAzael Avalos2014-08-161-0/+265
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>
OpenPOWER on IntegriCloud