Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp622406imm; Wed, 20 Jun 2018 04:04:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCfXH637ZDpI7KWTE7OiZ0b6ggPgvZAkLm4uom6eV+iInpUac92q/9Q6hsaK36ZSmHTxNr X-Received: by 2002:a62:138c:: with SMTP id 12-v6mr22469999pft.34.1529492677632; Wed, 20 Jun 2018 04:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529492677; cv=none; d=google.com; s=arc-20160816; b=LnYe8lt+L/wH9X0vpVedEEs0zX7GomLIr4I4bm00KKnkB8qI8wcE13abad/ldaA9WG 6ivudVQIPpeveGpqg3zspNH9ow90yvwFwX9wDezl3/wXjBXNHsCzIcXmVSdpuGjKwzSW UITuRUp6x76vAlNLGM9y8InJiHsmTsn2bmqjEgqXaJJ+V9stJ6Lq/g2fHjtVwWMNZ60J jCSk/bjonWjNuGPEuiSV1eqxzQY4kORNGwfhXVHktIEBEpPtSfw82Z4Yy8KlkhM3aPZZ GG0/JgNvG9Fm6Ndi+12HYT97Ss0x0uyrkaAJy6HV8dR1/Ly/JGe306raxTDvXGXcnxIb 5Bog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=darSa20EYYL6olGWh7+RANB5Z/irtr3nGKfYXhSmz3M=; b=j2gcOx3APKBVPpYe6kF6h6myGx5SPjT7Uaa4fbbQmq9T93Jo45D8BQ8G2T1iB9hbzn W/mn3fN8i1FVSqsEffXkogGlzyvhprsq58J2bUzxiiUmxCmj62eR/WI+fYu6g7SGczyV LcmbzQ6VifGKJd2bly0YLltDjTybS4u616nLmhRLh6gLA0cTsfW7ls6Fuyc+WCpmavS+ HFlKJaS/5PSyFLfz/PqCSnCVEFnsusUHCvxucpE8SErY6wITHhnWAI3Fu2FL0hNU9HC1 /9RFXUWgxKVGbObPMui5Cnf8+wHJqU7KykdvPAAXhTNlL+PDZSVVnOe08saej5JKPz/p Uj/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fuiNxW92; dkim=pass header.i=@codeaurora.org header.s=default header.b=fuiNxW92; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v61-v6si2097934plb.499.2018.06.20.04.04.22; Wed, 20 Jun 2018 04:04:37 -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=@codeaurora.org header.s=default header.b=fuiNxW92; dkim=pass header.i=@codeaurora.org header.s=default header.b=fuiNxW92; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754264AbeFTLDK (ORCPT + 99 others); Wed, 20 Jun 2018 07:03:10 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49284 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754235AbeFTLDG (ORCPT ); Wed, 20 Jun 2018 07:03:06 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E3F3860B18; Wed, 20 Jun 2018 11:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529492585; bh=0/yEzv6nHNUmDqj5u7jFGVQDYtpFVTb/FF40b8YthPU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fuiNxW92dZfQcetGOdK9NzfhiSkoL/em10I0HPuF5n+N8KdolgzeGjhy7o7pc4uWk EqwpoRAXMM5eX1ivrPRnM2IGwT5uyPIrM/F0J7ZCgWUcdEyD+rlVNZFwwZxOKVG9SZ ojnslvVEetPLdyLddAhszzdJeFEA7T/h9T2M0DyI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 3DE3F604A6; Wed, 20 Jun 2018 11:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529492585; bh=0/yEzv6nHNUmDqj5u7jFGVQDYtpFVTb/FF40b8YthPU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fuiNxW92dZfQcetGOdK9NzfhiSkoL/em10I0HPuF5n+N8KdolgzeGjhy7o7pc4uWk EqwpoRAXMM5eX1ivrPRnM2IGwT5uyPIrM/F0J7ZCgWUcdEyD+rlVNZFwwZxOKVG9SZ ojnslvVEetPLdyLddAhszzdJeFEA7T/h9T2M0DyI= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Jun 2018 16:33:05 +0530 From: kgunda@codeaurora.org To: Vinod 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, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling In-Reply-To: <20180620054722.GH13316@vkoul-mobl> References: <1529406822-15379-1-git-send-email-kgunda@codeaurora.org> <1529406822-15379-7-git-send-email-kgunda@codeaurora.org> <20180620054722.GH13316@vkoul-mobl> Message-ID: <830ec51a6ea0cb9bcf8981cda86975cc@codeaurora.org> X-Sender: kgunda@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-06-20 11:17, Vinod wrote: > 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 > Will fix the comment in the next series. >> +#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 > Will add it in the next series. >> +static int wled_configure_short_irq(struct wled *wled, >> + struct platform_device *pdev) >> +{ >> + int rc = 0, short_irq; > > superfluous initialization of rc Will remove the initialization in next series.