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: <4F60AF8E.7050900@samsung.com>
Date:	Wed, 14 Mar 2012 23:47:42 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	linux-input@...r.kernel.org, sameo@...ux.intel.com,
	broonie@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org,
	kyungmin.park@...sung.com, myungjoo.ham@...sung.com
Subject: Re: [PATCH v3 2/2] input: add driver support for MAX8997-haptic

Hi Dmitry,

> This is not proper locking between playing effect and suspend. Now that
> you are using workqueue you need to synchronize access with it, not with
> play_effect method.
> 
> Does the following patch work for you?
> 

Your patch is worked on TRATS board based on EXYNOS4210 but, you should
apply following patch because 'chip->enabled' is used on
max8997_haptic_configure() function to enable/disable haptic motor.

diff --git a/drivers/haptic/max8997_haptic.c
b/drivers/haptic/max8997_haptic.c
index 806bcf3..0347404 100644
--- a/drivers/haptic/max8997_haptic.c
+++ b/drivers/haptic/max8997_haptic.c
@@ -182,11 +182,11 @@ static void max8997_haptic_enable(struct
max8997_haptic *chip)
 	}

 	if (!chip->enabled) {
+		chip->enabled = true;
 		regulator_enable(chip->regulator);
 		max8997_haptic_configure(chip);
 		if (chip->mode == MAX8997_EXTERNAL_MODE)
 			pwm_enable(chip->pwm);
-		chip->enabled = true;
 	}

 out:
@@ -198,11 +198,11 @@ static void max8997_haptic_disable(struct
max8997_haptic *chip)
 	mutex_lock(&chip->mutex);

 	if (chip->enabled) {
+		chip->enabled = false;
 		max8997_haptic_configure(chip);
 		if (chip->mode == MAX8997_EXTERNAL_MODE)
 			pwm_disable(chip->pwm);
 		regulator_disable(chip->regulator);
-		chip->enabled = false;
 	}

 	mutex_unlock(&chip->mutex);
-- 
1.7.0.4

Thank you,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ