Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp350986imm; Tue, 19 Jun 2018 22:48:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJM/r4QZd1l2Xbg0qomm/s23FOVvo2atvSMddSmmfT0gxEOcXjMGZcvWTUPlpwt4Y3g1Xr X-Received: by 2002:a62:8dd1:: with SMTP id p78-v6mr21284498pfk.141.1529473737341; Tue, 19 Jun 2018 22:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529473737; cv=none; d=google.com; s=arc-20160816; b=P6llpiH3MesnSkDccW9evjIcgGkizBLbAzUDVJUp16jeag8r+wMEsAU2gN7nyZSB2t l76bCvUA1ktsCAbQBVWFpw6W/58M0JuoyztrME89Zo0kne1Z0/26v9uWFW5MnMk+BMk1 b6+ND8qZ3dlYLJV3pjmQ8Fx9kiLv8qqQg7dL+5kR1e8oJM2JRcAwvQr6ZYLIJlE37mZI BNlQ9LBUTIQYg941BBY0HsMGvG0N1wfFcEZnFva1saUtzpmDK47cwDMBmS+m6ufpXG79 u+7o4Prgg9lXBQOJJDl2lCJLkQ63I1OHSYi6WbfrW5OqnmmxkpOztLR0cHQXtte3MSJY IB1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=JgeBm8NNXjrZ/6MkDXV/PHXbGFclmVL/R+fmNcenJsw=; b=Gg+NCx3ncKEK5H8bejiS6ipW9u8GX4dj3jwM3aKBtjYJGk11dBjMlTBVgp234vbjNy 9ukvEmj5L9E2CHYevETPu/a8JdUkwsZO3Gkaiy9eAR1YmeZxOmn1Mmj9c9cjAqepaU4j Y9MOnLWn3AheYydLg+o7JSrjFxxvcrfrvEh2/TdF7XA4JxtsZLJ1MIJAH+83fvspD2ze tv5VsLPFi+tLVX4+bz0S07L1hEhgoOk4a8YCVtUi+abU9vrfTphJYvy6hxQGiBmgTLyE bhohMSmEXMbrEptoe/4tQB9k3+X67ZSuIUGnRPI/9A37zL4uod54J+Dew0asi3zAbCuj 0oSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ft5zBx8W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5-v6si1214760pgn.258.2018.06.19.22.48.43; Tue, 19 Jun 2018 22:48:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ft5zBx8W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752827AbeFTFrd (ORCPT + 99 others); Wed, 20 Jun 2018 01:47:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:46322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751376AbeFTFrb (ORCPT ); Wed, 20 Jun 2018 01:47:31 -0400 Received: from localhost (unknown [106.200.222.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DB2720846; Wed, 20 Jun 2018 05:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529473651; bh=PUZIkMeL92dvteqZy6CxGctVmCBiSJLVplqj/p3i+SE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ft5zBx8WffeUSuI88Jkjvq74r92c8y4EnJSbwte+cDm+A4wRv+HRJbcbuzS0IZUAe SJoptzlvzDqkh/bUWacb0n+wCQnk8eS8wA1V7GCj5aT11apIKaRtk0MirO9IoeWMBD x45R7ECi1pfDBpbzwbsL0t0FfeyCLDdZiI7tBJBk= Date: Wed, 20 Jun 2018 11:17:22 +0530 From: Vinod To: Kiran Gunda Cc: bjorn.andersson@linaro.org, jingoohan1@gmail.com, lee.jones@linaro.org, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, Daniel Thompson , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling Message-ID: <20180620054722.GH13316@vkoul-mobl> References: <1529406822-15379-1-git-send-email-kgunda@codeaurora.org> <1529406822-15379-7-git-send-email-kgunda@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1529406822-15379-7-git-send-email-kgunda@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-06-18, 16:43, Kiran Gunda wrote: > struct wled { > const char *name; > struct device *dev; > struct regmap *regmap; > + struct mutex lock; /* Lock to avoid race from ISR */ the comment is wrong as you avoid race with thread handler and not the main ISR. The ISR runs in atomic context so you cant use a mutex but you may do so with a thread handler > +#define WLED_SHORT_DLY_MS 20 > +#define WLED_SHORT_CNT_MAX 5 > +#define WLED_SHORT_RESET_CNT_DLY_US USEC_PER_SEC an empty line after defines would be better > +static int wled_configure_short_irq(struct wled *wled, > + struct platform_device *pdev) > +{ > + int rc = 0, short_irq; superfluous initialization of rc -- ~Vinod