Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ea64844 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ad7879 - fix deficient device disable
  Input: gpio_keys - fix two typos in devicetree documentation
  Input: mma8450 - add device tree probe support
  Input: gpio_keys - return proper error code if memory allocation fails
  Input: lm8323 - add missing device_remove_file for dev_attr_time
  Input: tegra-kbc - fix computation of polling time
  Input: kxtj9 - explicitly include module.h
  Input: psmouse - hgpk.c needs module.h
parents 35e51fe8 4fecc208
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ Optional properties:
Each button (key) is represented as a sub-node of "gpio-keys":
Subnode properties:

	- gpios: OF devcie-tree gpio specificatin.
	- gpios: OF device-tree gpio specification.
	- label: Descriptive name of the key.
	- linux,code: Keycode to emit.

+11 −0
Original line number Diff line number Diff line
* Freescale MMA8450 3-Axis Accelerometer

Required properties:
- compatible : "fsl,mma8450".

Example:

accelerometer: mma8450@1c {
	compatible = "fsl,mma8450";
	reg = <0x1c>;
};
+1 −1
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ static int gpio_keys_get_devtree_pdata(struct device *dev,

	buttons = kzalloc(pdata->nbuttons * (sizeof *buttons), GFP_KERNEL);
	if (!buttons)
		return -ENODEV;
		return -ENOMEM;

	pp = NULL;
	i = 0;
+7 −2
Original line number Diff line number Diff line
@@ -754,8 +754,11 @@ fail3:
	device_remove_file(&client->dev, &dev_attr_disable_kp);
fail2:
	while (--pwm >= 0)
		if (lm->pwm[pwm].enabled)
		if (lm->pwm[pwm].enabled) {
			device_remove_file(lm->pwm[pwm].cdev.dev,
					   &dev_attr_time);
			led_classdev_unregister(&lm->pwm[pwm].cdev);
		}
fail1:
	input_free_device(idev);
	kfree(lm);
@@ -775,8 +778,10 @@ static int __devexit lm8323_remove(struct i2c_client *client)
	device_remove_file(&lm->client->dev, &dev_attr_disable_kp);

	for (i = 0; i < 3; i++)
		if (lm->pwm[i].enabled)
		if (lm->pwm[i].enabled) {
			device_remove_file(lm->pwm[i].cdev.dev, &dev_attr_time);
			led_classdev_unregister(&lm->pwm[i].cdev);
		}

	kfree(lm);

+3 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/platform_device.h>
@@ -37,7 +38,7 @@
#define KBC_ROW_SCAN_DLY	5

/* KBC uses a 32KHz clock so a cycle = 1/32Khz */
#define KBC_CYCLE_USEC	32
#define KBC_CYCLE_MS	32

/* KBC Registers */

@@ -647,7 +648,7 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev)
	debounce_cnt = min(pdata->debounce_cnt, KBC_MAX_DEBOUNCE_CNT);
	scan_time_rows = (KBC_ROW_SCAN_TIME + debounce_cnt) * num_rows;
	kbc->repoll_dly = KBC_ROW_SCAN_DLY + scan_time_rows + pdata->repeat_cnt;
	kbc->repoll_dly = ((kbc->repoll_dly * KBC_CYCLE_USEC) + 999) / 1000;
	kbc->repoll_dly = DIV_ROUND_UP(kbc->repoll_dly, KBC_CYCLE_MS);

	input_dev->name = pdev->name;
	input_dev->id.bustype = BUS_HOST;
Loading