Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752762Ab0LAFfF (ORCPT ); Wed, 1 Dec 2010 00:35:05 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:55121 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303Ab0LAFfD (ORCPT ); Wed, 1 Dec 2010 00:35:03 -0500 X-IronPort-AV: E=McAfee;i="5400,1158,6183"; a="64788838" Message-ID: <4CF5DE81.1090803@codeaurora.org> Date: Wed, 01 Dec 2010 11:04:57 +0530 From: Anirudh Ghayal User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Trilok Soni CC: "Datta, Shubhrajyoti" , "linux-kernel@vger.kernel.org" , "linux-input@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , Dmitry Torokhov Subject: Re: [RFC v1 PATCH 5/6] input: pmic8058-othc: Add support for PM8058 based OTHC References: <1289393281-4459-1-git-send-email-tsoni@codeaurora.org> <1289393281-4459-6-git-send-email-tsoni@codeaurora.org> <0680EC522D0CC943BC586913CF3768C003FF9009B6@dbde02.ent.ti.com> <4CE22665.50209@codeaurora.org> In-Reply-To: <4CE22665.50209@codeaurora.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2373 Lines: 74 Hi Dimitry, Please me know your comments this patch. Thank you, Anirudh On 11/16/2010 12:06 PM, Trilok Soni wrote: > > Hi Shubhrajyoti, > > On 11/16/2010 11:06 AM, Datta, Shubhrajyoti wrote: >> Hi Anirudh, >> >>> -----Original Message----- >>> From: linux-input-owner@vger.kernel.org [mailto:linux-input- >>> owner@vger.kernel.org] On Behalf Of Trilok Soni >>> Sent: Wednesday, November 10, 2010 6:18 PM >>> To: linux-kernel@vger.kernel.org >>> Cc: linux-input@vger.kernel.org; rtc-linux@googlegroups.com; linux-arm- >>> msm@vger.kernel.org; Anirudh Ghayal; Dmitry Torokhov >>> Subject: [RFC v1 PATCH 5/6] input: pmic8058-othc: Add support for PM8058 >>> based OTHC >>> >>> From: Anirudh Ghayal >>> >>> One-touch headset controller is a hardware module in Qualcomm's PMIC8058. >>> It supports headset insert/remove and switch press/release detection >>> events >>> over 3 MIC BIAS lines. The MIC BIAS lines can be configured to support >>> headset detection or act as regular BIAS lines. >> Could you help with the datasheet link if it is free. >> > > datasheets are not available for open access. > >>> + >>> +static int >> If this is called only at init it can also be a devinit ? > > Ok. > >>> + if (rc) { >>> + dev_dbg(&pd->dev, "Headset inserted during boot up!\n"); >>> + dd->othc_ir_state = true; >>> + input_report_switch(dd->othc_ipd, SW_HEADPHONE_INSERT, 1); >>> + input_sync(dd->othc_ipd); >>> + } >> Not a comment. However I did not understand why the status at boot is required here. > > We need to report right status when the system boots up with headset inserted. > >>> + >>> +fail_sw_irq: >>> + free_irq(dd->othc_irq_ir, dd); >>> +fail_ir_irq: >>> + input_unregister_device(ipd); >> Unregister and then falling back to free may not be what you intended. >> > > Nope. Please see we are making othc_ipd = NULL, so everything should be fine. > > Thanks for the review comments. > -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- 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/