Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826AbbBXA7V (ORCPT ); Mon, 23 Feb 2015 19:59:21 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:11057 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848AbbBXA7S (ORCPT ); Mon, 23 Feb 2015 19:59:18 -0500 X-AuditID: cbfee68d-f79296d000004278-d9-54ebcce3f5d9 Message-id: <54EBCCE3.8070404@samsung.com> Date: Tue, 24 Feb 2015 09:59:15 +0900 From: Jaewon Kim User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-version: 1.0 To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, Inki Dae , SangBae Lee , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Chanwoo Choi , Sebastian Reichel , Beomho Seo Subject: Re: [PATCH v4 4/5] Input: add haptic drvier on max77843 References: <1424678991-13978-1-git-send-email-jaewon02.kim@samsung.com> <1424678991-13978-5-git-send-email-jaewon02.kim@samsung.com> <20150223172658.GA604@dtor-glaptop> In-reply-to: <20150223172658.GA604@dtor-glaptop> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPIsWRmVeSWpSXmKPExsWyRsSkRPfxmdchBkvOGlmc/rSN3eL6l+es FvOPnGO1OLzoBaNF/5uFrBbnXq1ktJh0fwKLxf2vRxktbn76xmpxedccNovPvUcYLZZev8hk MWH6WhaL1r1H2C2OfzrIYnF6d4mDgMeaeWsYPS739TJ57Jx1l91j5fIvbB6bVnWyedy5tofN o2/LKkaPz5vkAjiiuGxSUnMyy1KL9O0SuDLurPvCXHCAt+LZ9boGxrtcXYycHBICJhL9jx+y QdhiEhfurQezhQSWMkrMe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+LMiU2MIDaLgKrE47WrwWw2AW2J7+sXg9WICkRIzD/2mhmiXlDix+R7LCC2iIC+xPbZ vxhBhjILTGeROHzkKFiDsICDRMvR96wQ29YySqxoXQzWwSlgILHpyQF2EJtZwFZiwft1LBC2 vMTmNW+ZJzAKzEKyZBaSsllIyhYwMq9iFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECE4nz6R3 MK5qsDjEKMDBqMTD25D7KkSINbGsuDL3EKMEB7OSCO/sg69DhHhTEiurUovy44tKc1KLDzGa AsNgIrOUaHI+MNXllcQbGpuYGVkamRtaGBmbK4nzKtm3hQgJpCeWpGanphakFsH0MXFwSjUw OjJMEL+27IEYz8tbuYJlnn9DJ/eHrr33my2dW3qPc7d5/uc7M9yZJmW+m87zMJbpaeOOlfvl Ob2Zv+/t2qQSPM1kir761fXivFPX8l66IrOxb6v9Z4kaXoMXRTcN5BbKXk094eRhbJOzeMO2 BY3i8/llBMpiP8RO3tXMX/eJpTDA7+Wf3JgFSizFGYmGWsxFxYkA6Z0kgD0DAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1907 Lines: 71 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 >> Signed-off-by: Jaewon Kim > ... > >> +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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/