All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaewon Kim <jaewon02.kim@samsung.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-input@vger.kernel.org,
	Inki Dae <inki.dae@samsung.com>,
	SangBae Lee <sangbae90.lee@samsung.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Lee Jones <lee.jones@linaro.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Sebastian Reichel <sre@kernel.org>,
	Beomho Seo <beomho.seo@samsung.com>
Subject: Re: [PATCH v4 4/5] Input: add haptic drvier on max77843
Date: Tue, 24 Feb 2015 09:59:15 +0900	[thread overview]
Message-ID: <54EBCCE3.8070404@samsung.com> (raw)
In-Reply-To: <20150223172658.GA604@dtor-glaptop>

Hi Dmitry Torokhov,

On 02/24/2015 02:26 AM, Dmitry Torokhov wrote:
> Hi Jaew9on,
>
> On Mon, Feb 23, 2015 at 05:09:50PM +0900, Jaewon Kim wrote:
>> This patch adds support for haptic driver on max77843
>> MFD(Multi Function Device) with PMIC, MUIC, LED, CHARGER.
>>
>> This driver supports external pwm and LRA(Linear Resonant Actuator) motor.
>> And it supports ff-memless interface from inpu framework.
>>
>> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
> ...
>
>> +static void max77843_haptic_play_work(struct work_struct *work)
>> +{
>> +	struct max77843_haptic *haptic =
>> +			container_of(work, struct max77843_haptic, work);
>> +	int error;
>> +
>> +	mutex_lock(&haptic->mutex);
>> +
>> +	if (haptic->suspended)
>> +		mutex_unlock(&haptic->mutex);
> Huh?
This code prevent to play haptic when entering suspend state.
But I forgot return.
I will add return 0 in version 6.

>
>> +
>> +	error = max77843_haptic_set_duty_cycle(haptic);
>> +	if (error) {
>> +		dev_err(haptic->dev, "failed to set duty cycle: %d\n", error);
>> +		return;
> Here you are leaving with the mutex held.
Okay, I will add mutex_unlock().
>
>> +	}
>> +
>> +	if (haptic->magnitude) {
>> +		error = max77843_haptic_enable(haptic);
>> +		if (error)
>> +			dev_err(haptic->dev,
>> +					"cannot enable haptic: %d\n", error);
>> +	} else {
>> +		max77843_haptic_disable(haptic);
>> +		if (error)
>> +			dev_err(haptic->dev,
>> +					"cannot disable haptic: %d\n", error);
>> +	}
>> +
>> +	mutex_unlock(&haptic->mutex);
>> +}
>> +
> The rest seems quite reasonable.
>
> Thanks.
>
Thanks to review my patch.


Thanks,
Jaewon Kim

  reply	other threads:[~2015-02-24  0:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23  8:09 [PATCH v4 0/5] Add new MFD drvier for MAX77843 Jaewon Kim
2015-02-23  8:09 ` [PATCH v4 1/5] mfd: max77843: Add max77843 MFD driver core driver Jaewon Kim
2015-02-23  8:09 ` [PATCH v4 2/5] power: max77843_charger: Add Max77843 charger device driver Jaewon Kim
2015-02-23  8:09 ` [PATCH v4 3/5] power: max77843_battery: Add Max77843 fuel gauge " Jaewon Kim
2015-02-23  8:09 ` [PATCH v4 4/5] Input: add haptic drvier on max77843 Jaewon Kim
     [not found]   ` <1424678991-13978-5-git-send-email-jaewon02.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-02-23 17:26     ` Dmitry Torokhov
2015-02-23 17:26       ` Dmitry Torokhov
2015-02-24  0:59       ` Jaewon Kim [this message]
2015-02-23  8:09 ` [PATCH v4 5/5] Documentation: Add device tree bindings document for max77843 Jaewon Kim
2015-02-23  8:24 ` [PATCH v4 0/5] Add new MFD drvier for MAX77843 Jaewon Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54EBCCE3.8070404@samsung.com \
    --to=jaewon02.kim@samsung.com \
    --cc=beomho.seo@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=inki.dae@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sangbae90.lee@samsung.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.