From patchwork Fri Jun 5 04:32:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 6550831 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 603D2C0020 for ; Fri, 5 Jun 2015 04:32:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8586A206F3 for ; Fri, 5 Jun 2015 04:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC46820707 for ; Fri, 5 Jun 2015 04:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751025AbbFEEcf (ORCPT ); Fri, 5 Jun 2015 00:32:35 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:34933 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbbFEEce (ORCPT ); Fri, 5 Jun 2015 00:32:34 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NPG034EJFA8NGA0@mailout2.samsung.com>; Fri, 05 Jun 2015 13:32:32 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.113]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 7F.F7.17770.06621755; Fri, 5 Jun 2015 13:32:32 +0900 (KST) X-AuditID: cbfee691-f79ca6d00000456a-55-55712660c001 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D4.6B.25346.06621755; Fri, 5 Jun 2015 13:32:32 +0900 (KST) Received: from localhost.localdomain ([10.252.83.201]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NPG009MGFA5QM30@mmp2.samsung.com>; Fri, 05 Jun 2015 13:32:32 +0900 (KST) From: Jaewon Kim To: Chanwoo Choi Cc: MyungJoo Ham , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Jaewon Kim Subject: [PATCH] extcon: max77843: Clear IRQ bits state before request IRQ Date: Fri, 05 Jun 2015 13:32:27 +0900 Message-id: <1433478747-12254-1-git-send-email-jaewon02.kim@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFLMWRmVeSWpSXmKPExsWyRsSkUDdBrTDUoLdXzOL6l+esFjsajrBa XN41h81ixvl9TBa3G1ewObB69G1ZxejxeZNcAFMUl01Kak5mWWqRvl0CV8bEzlUsBV85Ki4f O8bYwLiDvYuRg0NCwETiwGuvLkZOIFNM4sK99WxdjFwcQgJLGSXerbzPBpEwkTh/+zpUYjqj xO3ty1kgnB+MEr+mtDGBVLEJaEt8X7+YFcQWEdCQmPn3CiNIEbPAVEaJh637mEESwgJeEg+P PWcEsVkEVCUOt74Es3kFPCQunPrGDHGSgsScSTYgvRIC99kkHm45xg5RLyDxbfIhFogaWYlN B5ghrpOUOLjiBssERsEFjAyrGEVTC5ILipPSi0z1ihNzi0vz0vWS83M3MQKD8PS/ZxN3MN4/ YH2IUYCDUYmH98Hh/FAh1sSy4srcQ4ymQBsmMkuJJucDQz2vJN7Q2MzIwtTE1NjI3NJMSZxX R/pnsJBAemJJanZqakFqUXxRaU5q8SFGJg5OqQbGCy+jvtbMLCyZP/WDpMrNU19vn/h0THb+ SQEOD8O8wrlO5TukD89cv4IlLT62ucRvBtucpLWN61xbbyXbVK5pW3LtQ4zZi8uas3rVdgbV Xqo1/+Z8+W73Pok7FQHhk0tvut54LL1hq8DfZRGnTcRjjofMyPkz3XvVi57JFlEHOp/cSOyZ 1rgqWomlOCPRUIu5qDgRAIg8Ass9AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsVy+t9jQd0EtcJQgzPzBC2uf3nOarGj4Qir xeVdc9gsZpzfx2Rxu3EFmwOrR9+WVYwenzfJBTBFNTDaZKQmpqQWKaTmJeenZOal2yp5B8c7 x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gCtU1IoS8wpBQoFJBYXK+nbYZoQGuKmawHTGKHr GxIE12NkgAYS1jBmTOxcxVLwlaPi8rFjjA2MO9i7GDk5JARMJM7fvs4GYYtJXLi3Hsjm4hAS mM4ocXv7chYI5wejxK8pbUwgVWwC2hLf1y9mBbFFBDQkZv69wghSxCwwlVHiYes+ZpCEsICX xMNjzxlBbBYBVYnDrS/BbF4BD4kLp74B1XAArVOQmDPJZgIj9wJGhlWMoqkFyQXFSem5hnrF ibnFpXnpesn5uZsYwUH+TGoH48oGi0OMAhyMSjy8FsfyQ4VYE8uKK3MPMUpwMCuJ8GrxFIYK 8aYkVlalFuXHF5XmpBYfYjQFWj6RWUo0OR8YgXkl8YbGJmZGlkbmhhZGxuZK4rwn831ChQTS E0tSs1NTC1KLYPqYODilGhh1w7QmH3iZ/7vti5nt1JdRp14wMeybe5Jnu0D7nyTrCYcY7vHP 4OXeJ3wqibvmfozFxC9bG17u3H/DetruBe94zixsnZi6t25dzoR7plUf1ZbOvMhT6bczfKKR pEe6weYTAUXhfbX2DUeq8jZfPMDbmStn+URm3kTlkEa/HZ0FfadmLp+3XeSMEktxRqKhFnNR cSIAzJz3v4gCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP IRQ signal before driver probe is needless because driver sends current state after platform booting done. So, this patch clears MUIC IRQ bits before request IRQ. Signed-off-by: Jaewon Kim --- drivers/extcon/extcon-max77843.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c index d78a64d..11e09d1 100644 --- a/drivers/extcon/extcon-max77843.c +++ b/drivers/extcon/extcon-max77843.c @@ -781,6 +781,15 @@ static int max77843_muic_probe(struct platform_device *pdev) /* Support virtual irq domain for max77843 MUIC device */ INIT_WORK(&info->irq_work, max77843_muic_irq_work); + /* Clear IRQ bits before request IRQs */ + ret = regmap_bulk_read(max77843->regmap_muic, + MAX77843_MUIC_REG_INT1, info->status, + MAX77843_MUIC_IRQ_NUM); + if (ret) { + dev_err(&pdev->dev, "Failed to Clear IRQ bits\n"); + goto err_muic_irq; + } + for (i = 0; i < ARRAY_SIZE(max77843_muic_irqs); i++) { struct max77843_muic_irq *muic_irq = &max77843_muic_irqs[i]; unsigned int virq = 0;