Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6359783ybi; Sun, 21 Jul 2019 16:01:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtbeDty01QhlyJ2hC+gFHuPTfJnByQ9BDKVbwuoSTetgdIUiY/KUYF++tHoklo6hVLds6r X-Received: by 2002:a17:902:102c:: with SMTP id b41mr70834802pla.204.1563750091647; Sun, 21 Jul 2019 16:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563750091; cv=none; d=google.com; s=arc-20160816; b=z2rZLRNTE9SdDmaRe2aSG90qhGxk0W/mLQ53YXPDskdtMqVNNHaqjOCX/CMUhE0fbr 9UM9lo8SqgLjzCj9mjNhtiqGaNldUSfFa1WwSOdhXRIcUbHtFwy0czLNGHGIvxYb6ZIX c12sJVdQ5vSlYQE0spOMepiZX+V4IpgxlJzL7zcF1eHONA1oCACQp7MdRIWTcV3YW3Y9 R+0YoI2eNNVhT6BuUAfado/9AhSIvcnd6WaUcZjOvZAJRzp2EoRi90BXNjt01ZP9yGlw 1JzqE8hVVWS6pwn39UfkDPVyvcoJYXazQzCJWhrjFB2FHN1y9dym29CBg2faSMwlD7YH LIyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:to:from:subject :message-id; bh=DU3iKRosNPTuKcMeYhH6GoSUD2gzSoiDpBjJpnJpnok=; b=FKL01TpjdIt+gpbcCkm1OkcZxon4ASnPMe6vV+bipVTeGdzlmLeHbu4s3SVnuYdQw3 NYFn9dP2x4AlIVrGEzxQsMywkK89fysJpF0irdIHIuuSjF1gwEM1poHlW2xta0CYOOr+ hkVPUS/7Fxh5C07KGFpZQEJVZp34HxQvyKrZ3WLuwBSF4qPZknz7L/z6k8AKcAGcmYQv 2GqIMUrvRa4HKWOWsXm2cSU4dcTHhNV6TvdQZzzuM+Gu1xV/BFJZPaFc2sq2207na1vS 6tYI8Lg68J5tiuCtBFx8nb4Tv5nbvOXSHIdwMZVemBc1FYF91Y9r6+TqMmr3Hkju98JQ 99tA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si7217473pgt.150.2019.07.21.16.01.14; Sun, 21 Jul 2019 16:01:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726238AbfGUXA6 (ORCPT + 99 others); Sun, 21 Jul 2019 19:00:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57806 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfGUXA5 (ORCPT ); Sun, 21 Jul 2019 19:00:57 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 7E59628A24F Message-ID: <22d7eca4ad8aa2e73933c4f83c92221ce6e0945a.camel@collabora.com> Subject: Re: [PATCH] Enable backlight when trigger is activated From: Ezequiel Garcia To: Pavel Machek , kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org, jacek.anaszewski@gmail.com, linux-leds@vger.kernel.org, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Date: Sun, 21 Jul 2019 20:00:44 -0300 In-Reply-To: <20190718190849.GA11409@amd> References: <20190718190849.GA11409@amd> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, The commit log is lacking the proper "leds: triggers: ". Also... On Thu, 2019-07-18 at 21:08 +0200, Pavel Machek wrote: > Configuring backlight trigger from dts results in backlight off during > boot. Machine looks dead upon boot, which is not good. > > Fix that by enabling LED on trigger activation. > > Signed-off-by: Pavel Machek > > diff --git a/drivers/leds/trigger/ledtrig-backlight.c b/drivers/leds/trigger/ledtrig-backlight.c > index 487577d..6e6bc78 100644 > --- a/drivers/leds/trigger/ledtrig-backlight.c > +++ b/drivers/leds/trigger/ledtrig-backlight.c > @@ -114,6 +114,8 @@ static int bl_trig_activate(struct led_classdev *led) > n->old_status = UNBLANK; > n->notifier.notifier_call = fb_notifier_callback; > > + led_set_brightness(led, LED_ON); > + This looks fishy. Maybe you should use a default-state = "keep" instead? (and you'll have to support it in the LED driver). That'll give you proper "don't touch the LED if it was turned on" behavior, which is what you seem to want. Regards, Eze