Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp100869imm; Mon, 14 May 2018 21:51:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo/6fDxgBG5F5CsoC2QbUyQlyx8IvMfiKs/OamGMAoJlSJ17roGKTtfsUWDNxShWNB1Y73D X-Received: by 2002:a65:510a:: with SMTP id f10-v6mr7197129pgq.93.1526359898290; Mon, 14 May 2018 21:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526359898; cv=none; d=google.com; s=arc-20160816; b=IEO0OuvYcfNk10pW0jbetrhJ5Lp/knaD8YIfBlwYstK+SPgZ/zCFnugpM1EKH5A4pN MDeE5ibgR/DPGwipGftHnZB6H/kfPDuAbKQiT0WXnqBVrOiAD/D8Y5QxWBEKqf6G65jR byfMDplharHUF835rHiUE3KixI936sUTjGTe54crcggIhiRmoP4O7fgpxHxLyP7DA4Bp Rx3SWFpy3Kisk4T6zy+eQCBlW3zAjg/RUjurspPkNpL4pCHlt+UC789l/wd6shUKRtI6 8g0QbPaWodxpWZwaTHSplaCLUwuYmnFSnA2ceDu9h0ZsLkRn5llN4SjMbrI6PovnAqHI q09w== 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=FMWqDTaU+Gmu8sCukCfGPF/f4HEs7oxBsl7yii/iYv4=; b=MmlFfj6HMAApDz012B66JXNcNSqa0RldwFfOPHXH6IErpuvPZDW9UppsEp7sqq1OZm l9zedfFHpndTkjJoLIliqWMS5L2IbuAtSxMByowYog23YcCiCKtlvqoez48Jwfa1m8Xl qcA59vc9bT5V1tsa4n3QglffmfemNNbvR26mW9OdJ9ASI1Keph5WlFiYHUHhmVPnAW9h AROaI82v4ozU0ws3wl3oIkRdYdfz0+aVsT12jqlHHUajO6FpkgXKxs5vv+Xd66BI7U3D DGplNDHvktm6ifViNenwo6EdqquTnVNGU4GzBAPL/Xx1r3tPIqbzAd3ipDsaeD5KMny1 Hq0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=czfg45QO; dkim=pass header.i=@codeaurora.org header.s=default header.b=dHSdxwro; 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 y5-v6si10645043pfe.134.2018.05.14.21.51.23; Mon, 14 May 2018 21:51:38 -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=czfg45QO; dkim=pass header.i=@codeaurora.org header.s=default header.b=dHSdxwro; 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 S1752228AbeEOEut (ORCPT + 99 others); Tue, 15 May 2018 00:50:49 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56816 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116AbeEOEuq (ORCPT ); Tue, 15 May 2018 00:50:46 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1D02160AFB; Tue, 15 May 2018 04:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526359846; bh=QDwofDH+ZRXh1Wmq908/NU8Q14KxiX0rEZZsAku3oU0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=czfg45QOn7nH8A1pTFXYERKofMikuLWPGKKhQ1fE0oveOZHRHFeqtydIG14r2/4tF l5jCGWLFdU26KtAwUSaea5G1sEUwumg62HWdph5JjGFR/eUvLeSeBT3+6Grlkuw4qP /AEQTIWUZosN1zp8OxdjgCvG5nF8C+h5kGiA37Rg= 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 7BF6460131; Tue, 15 May 2018 04:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526359845; bh=QDwofDH+ZRXh1Wmq908/NU8Q14KxiX0rEZZsAku3oU0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dHSdxwrov4cHesJleEpaA7mTGYXmHpOIJgnQ0h8jEMINvCOnizGVr52NTwAkICDHS ahJf/wdVT+QaKhEG93wjQ+5FcfqUhb0gHsm1pbm/GDyFe61hWzvhCeS7uMOuz4j6Ni kM6x37zD6IceJdLYh/DlvBBNcFEu5OWoqOCML/Bo= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 15 May 2018 10:20:45 +0530 From: kgunda@codeaurora.org To: Bjorn Andersson 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 In-Reply-To: <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> <20180514170237.GL14924@minitux> Message-ID: <5477037fff5d6f6ef335221220b527b6@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-05-14 22:32, Bjorn Andersson wrote: > 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 > -- Thanks for that ! Sure I will describe it in the commit message. > To unsubscribe from this list: send the line "unsubscribe > linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html