Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426062 > unrolled thread

[PATCH v2 0/3] toshiba_acpi: Accelerometer updates

Started byAzael Avalos <coproscefalo@gmail.com>
First post2016-06-20 01:30 +0200
Last post2016-06-20 01:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/3] toshiba_acpi: Accelerometer updates Azael Avalos <coproscefalo@gmail.com> - 2016-06-20 01:30 +0200
    [PATCH v2 2/3] toshiba_acpi: Remove the position sysfs entry Azael Avalos <coproscefalo@gmail.com> - 2016-06-20 01:30 +0200

#1426062 — [PATCH v2 0/3] toshiba_acpi: Accelerometer updates

FromAzael Avalos <coproscefalo@gmail.com>
Date2016-06-20 01:30 +0200
Subject[PATCH v2 0/3] toshiba_acpi: Accelerometer updates
Message-ID<rLUk9-tT-3@gated-at.bofh.it>
These series of patches update the accelerometer axis data
reporting to use the IIO subsystem, deprecating the custom
position sysfs entry, and finally bumping the driver version
to 0.24.

Changes since v1:
- Small format and style changes
- Changed the iio code according to feedback from Jonathan Cameron

Azael Avalos (3):
  toshiba_acpi: Add IIO interface for accelerometer axis data
  toshiba_acpi: Remove the position sysfs entry
  toshiba_acpi: Bump driver version and update copyright year

 drivers/platform/x86/toshiba_acpi.c | 136 +++++++++++++++++++++++++++++-------
 1 file changed, 109 insertions(+), 27 deletions(-)

-- 
2.8.4

[toc] | [next] | [standalone]


#1426064 — [PATCH v2 2/3] toshiba_acpi: Remove the position sysfs entry

FromAzael Avalos <coproscefalo@gmail.com>
Date2016-06-20 01:30 +0200
Subject[PATCH v2 2/3] toshiba_acpi: Remove the position sysfs entry
Message-ID<rLUka-tT-9@gated-at.bofh.it>
In reply to#1426062
Now that we have proper support for the acceleromeer under the IIO
subsystem, the _position_ sysfs file is now deprecated.

This patch removes all code related to the position sysfs entry.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
 drivers/platform/x86/toshiba_acpi.c | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 7949929..a9760d2 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -1961,28 +1961,6 @@ static ssize_t touchpad_show(struct device *dev,
 }
 static DEVICE_ATTR_RW(touchpad);
 
-static ssize_t position_show(struct device *dev,
-			     struct device_attribute *attr, char *buf)
-{
-	struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev);
-	u32 xyval, zval, tmp;
-	u16 x, y, z;
-	int ret;
-
-	xyval = zval = 0;
-	ret = toshiba_accelerometer_get(toshiba, &xyval, &zval);
-	if (ret < 0)
-		return ret;
-
-	x = xyval & HCI_ACCEL_MASK;
-	tmp = xyval >> HCI_MISC_SHIFT;
-	y = tmp & HCI_ACCEL_MASK;
-	z = zval & HCI_ACCEL_MASK;
-
-	return sprintf(buf, "%d %d %d\n", x, y, z);
-}
-static DEVICE_ATTR_RO(position);
-
 static ssize_t usb_sleep_charge_show(struct device *dev,
 				     struct device_attribute *attr, char *buf)
 {
@@ -2353,7 +2331,6 @@ static struct attribute *toshiba_attributes[] = {
 	&dev_attr_available_kbd_modes.attr,
 	&dev_attr_kbd_backlight_timeout.attr,
 	&dev_attr_touchpad.attr,
-	&dev_attr_position.attr,
 	&dev_attr_usb_sleep_charge.attr,
 	&dev_attr_sleep_functions_on_battery.attr,
 	&dev_attr_usb_rapid_charge.attr,
@@ -2380,8 +2357,6 @@ static umode_t toshiba_sysfs_is_visible(struct kobject *kobj,
 		exists = (drv->kbd_mode == SCI_KBD_MODE_AUTO) ? true : false;
 	else if (attr == &dev_attr_touchpad.attr)
 		exists = (drv->touchpad_supported) ? true : false;
-	else if (attr == &dev_attr_position.attr)
-		exists = (drv->accelerometer_supported) ? true : false;
 	else if (attr == &dev_attr_usb_sleep_charge.attr)
 		exists = (drv->usb_sleep_charge_supported) ? true : false;
 	else if (attr == &dev_attr_sleep_functions_on_battery.attr)
-- 
2.8.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web