Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4653746imm; Mon, 14 May 2018 10:36:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqJ2Hk9YiOuMKQlWoKFe3DtozaCN9eDicSrldrL49GvEL1gg4wUCIiWkzHuEnXkPsQbC4nw X-Received: by 2002:a62:5281:: with SMTP id g123-v6mr11423262pfb.22.1526319392508; Mon, 14 May 2018 10:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526319392; cv=none; d=google.com; s=arc-20160816; b=bgneidw3luF/IM/jPYEZdDk/yNLFeurfQtPUqzrnnwZqC94AfDGux7oQhiRsNKXQmw gBZXwjw+Ek15pa2iW/y81rMeGL4ZrusaVGpMhP0YI3jKEtQ8QMWkbzh0rYQNsxUp+mCF SaBqPyOvYI/6h2h9n8YsY+uWnsPmKYEei1DA2gBQgB+zrLRzpH4/J17Wzh00mposKoHj Mh1izFqSh6Slx8Wl89fMjp3TIyITE2VDv2Zh3VxcaGhCug1Xxslhnf4EqdR5SlE2PsCx sfd/RIUXAp+ugyoncZv+8aQgrVNp2P74ztmT9VIxkyRvriOHpFiMqhmHOqtw+u1+fpyB OoxQ== 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=utYyU0ORAzpXv0I7Cx0W1PD4j6yRH4PfGmvgWOkkAio=; b=kn6jLwlV+oXWxpvn6/SpVmXM/Vfs4D3V/fbOjKjkYsgUtHgFnyjAHWEgQQlt1N3Qdx jvI0PXybOBKoU1P5bap9evuku4rw//ezEc03lPEJadLim6LFfXJbe+4ji0Sde9W9Q1ll 3h0Ockl4exxF8b/5jM6jgyyS/cy9V8eGn9Y2AkIfn56qTlcEZfiZdIFLpytm1orCn+8y QqGhlmwubQ/jnAh0M4zOdcPqcR7rn/ocuoQaayDh8QYQyfYMjRLM1rAcbGTHhyKU/BZG 4r9cwUPxxJ7MLDrZ2Z2xtyGWLCVNA2l0tWAeCGDViDwXz2NQTf5VX3eOCPzleVsfiYK4 EaBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N5QRHtb4; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si7923864pgr.167.2018.05.14.10.36.18; Mon, 14 May 2018 10:36:32 -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=@linaro.org header.s=google header.b=N5QRHtb4; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932949AbeENRCn (ORCPT + 99 others); Mon, 14 May 2018 13:02:43 -0400 Received: from mail-pl0-f48.google.com ([209.85.160.48]:42910 "EHLO mail-pl0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754121AbeENRCk (ORCPT ); Mon, 14 May 2018 13:02:40 -0400 Received: by mail-pl0-f48.google.com with SMTP id u6-v6so7721716pls.9 for ; Mon, 14 May 2018 10:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=utYyU0ORAzpXv0I7Cx0W1PD4j6yRH4PfGmvgWOkkAio=; b=N5QRHtb4x68oUcjRa6Vwv7z+wSyIBZbgkopJtYbliRwbiG2n/jIlYQiNqA4nOq2u1e mgZ62K5kCkjBgKQ3ADJbFKi0zsgUU2RKRkMtN/DcRRxoTW3jyzrp0ninPd+SO+b5ZyN+ qTevLAcyg9CBaLILJoft+dpf7Bw2/xHK0CxgU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=utYyU0ORAzpXv0I7Cx0W1PD4j6yRH4PfGmvgWOkkAio=; b=Wt1dQO9QiqH/p/sU+WCokslrUhLO5YvgMsxBwDcSwTHiH+8xqJQ3qUBhSyEt4FB2Y8 EtLcY7MmJtz+48sPffK4acIxEJPY1RMgPDLilW6YxZDY5GZwsowIlsKtu9NaUkFTQTaQ faOiWyvBfJD9RRDQHcX/iqK79UmkSNHChxy3xsmQqixl9CU/iateUigLXcqTfJnboCat I8/GiVn02CG8EjjTlEBX/lv9HxG64rYBiyxktLZPTHCMHRtwSpjawjTtmAgoY8CdTy51 o9w4Uq003ZaqHuXn/xS4Fb1kl5hG8g9eIND/eLIpOkXEkdsi3ub9xB9gf2mjD2AjdpJ4 R4Rw== X-Gm-Message-State: ALKqPwdoAUCMpsBYaY5sGlGjSCFr9Vp3XWWO85i0VAxnBzvtrIzkkT5G tNmjT1f4mxvXJikIwJlQu1OMQw== X-Received: by 2002:a17:902:2826:: with SMTP id e35-v6mr10790262plb.348.1526317360216; Mon, 14 May 2018 10:02:40 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id t69-v6sm22916665pfi.177.2018.05.14.10.02.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 10:02:39 -0700 (PDT) Date: Mon, 14 May 2018 10:02:37 -0700 From: Bjorn Andersson To: kgunda@codeaurora.org Cc: Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, 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 V1 5/5] backlight: qcom-wled: Add auto string detection logic Message-ID: <20180514170237.GL14924@minitux> References: <1525341432-15818-1-git-send-email-kgunda@codeaurora.org> <1525341432-15818-6-git-send-email-kgunda@codeaurora.org> <20180507181044.GE2259@tuxbook-pro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed 09 May 00:14 PDT 2018, kgunda@codeaurora.org wrote: > On 2018-05-07 23:40, Bjorn Andersson wrote: > > On Thu 03 May 02:57 PDT 2018, Kiran Gunda wrote: > > > > [..] > > > + > > > +#define WLED_AUTO_DETECT_OVP_COUNT 5 > > > +#define WLED_AUTO_DETECT_CNT_DLY_US HZ /* 1 second */ > > > +static bool wled_auto_detection_required(struct wled *wled) > > > > So cfg.auto_detection_enabled is set, but we didn't have a fault during > > wled_auto_detection_at_init(), which I presume indicates that the boot > > loader configured the strings appropriately (or didn't enable the BL). > > Then first time we try to enable the backlight we will hit the ovp irq, > > which will enter here a few times to figure out that the strings are > > incorrectly configured and then we will do the same thing that would > > have been done if we probed with a fault. > > > > This is convoluted! > > > > If auto-detection is a feature allowing the developer to omit the string > > configuration then just do the auto detection explicitly in probe when > > the developer did so and then never do it again. > > > As explained in the previous patch, the auto-detection is needed later, > because are also cases where one/more of the connected LED string of the > display-backlight is malfunctioning (because of damage) and requires the > damaged string to be turned off to prevent the complete panel and/or board > from being damaged. Okay, that sounds very reasonable. Please ensure that it's clearly described in the commit message, so that we have this documented if someone wonders in the future. Regards, Bjorn