Received: by 10.223.176.46 with SMTP id f43csp4258352wra; Tue, 23 Jan 2018 06:48:35 -0800 (PST) X-Google-Smtp-Source: AH8x225buNYiL/XKRMDhaITgF92Tr/R+cD4zob/tIM2qP5Wq0Kpp1NxNklFKK/Mp8ul3oeOM42Kq X-Received: by 2002:a17:902:51a9:: with SMTP id y38-v6mr5933947plh.223.1516718915663; Tue, 23 Jan 2018 06:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516718915; cv=none; d=google.com; s=arc-20160816; b=E28jdqbS1/urp8HogHoiAMcxdnoSJ8u7ilHbdOlQaa9Chrh30PyQ2Op2hwO/ziPt1x 8WOoHhXHzsH2DQkspJPDu+ObX7d2ybh0c2PhK2tFI/+5jIlacN2xG5LCFJIfWUzvXrnV 6pvH/MIQo0bDKA/kTWd8K8LJ5Rl5Q02kZnM1M10sFr2izapbhtjFzTIDZ2LyMEeKDugo ZyVp0M9AQlJ9HtCH/mbsHg+ogjOxla4gYO2vj7LEvDAsrV+gS4Q8EzFyDSOw3CoWCQyD lR9PUFM6jHOnem0eUZ4838m0soo1GYMZKbPweqKcYDeunhMoyZHsKyqahsOopHUlhoGr 6A6A== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:arc-authentication-results; bh=nzXZ+vkNuPNn4Jg1g5TSOTBLePOk8LYBCd5KY7kOneI=; b=f7ma/syLCLNIcWYbxiMkl1zw8CtdBG9HebDe/YBVyb2tvUPoFjF0NakskthMharzCt 3E/Lchtk5o0c1CwM0pR8K/OnVrHHhbffyyIyFMMvl/FepTmHc28WLRFps9ESqDJ/o5/0 B7gN90cpKZPgiFUnFjtYhQgqB4h7m++XFKdBQcOOCx9kLNZ3aHZg7dTOczzV8oJMsvLk ScyZ+gaOtDYLgEtO5E63P+QUNRqROS68YwuzyXVp1+BWp1iq2HYdGcRsPcf4Vwn36nwV XpbgLnvcVSLJvMND0z3mBzSh2LvVWQHz097r0Qg4ebyT7iqs2bSbkGw1UbYt3Y2ixZHU 50BA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si15038457pgf.240.2018.01.23.06.48.20; Tue, 23 Jan 2018 06:48:35 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbeAWOrw (ORCPT + 99 others); Tue, 23 Jan 2018 09:47:52 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:57426 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751814AbeAWOrv (ORCPT ); Tue, 23 Jan 2018 09:47:51 -0500 Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:62902 helo=[192.168.10.157]) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1edzra-0002Hg-6b; Tue, 23 Jan 2018 15:47:50 +0100 Subject: Re: [PATCH v18 01/10] video: backlight: Add helpers to enable and disable backlight To: Daniel Thompson , Meghana Madhyastha Cc: Lee Jones , Jingoo Han , Thierry Reding , Tomi Valkeinen , Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <39b5bf0a02008a8072d910bdf8231c431e9ef504.1516632387.git.meghana.madhyastha@gmail.com> <20180123100029.fr42yezfw2rp6sss@oak.lan> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: Date: Tue, 23 Jan 2018 15:47:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180123100029.fr42yezfw2rp6sss@oak.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 23.01.2018 11.00, skrev Daniel Thompson: > On Mon, Jan 22, 2018 at 02:49:28PM +0000, Meghana Madhyastha wrote: >> Add helper functions backlight_enable and backlight_disable to >> enable/disable a backlight device. These helper functions can >> then be used by different drm and tinydrm drivers to avoid >> repetition of code and also to enforce a uniform and consistent >> way to enable/disable a backlight device. >> >> Signed-off-by: Meghana Madhyastha >> --- >> Acked-by: Daniel Thompson >> Reviewed-by: Noralf Trønnes >> Reviewed-by: Sean Paul > Just in case there's another spin... the additional tags are normally > presented above the --- (otherwise they are unlikely to be copied into > the git history when they are applied). Indeed, they should be part of the commit message. Noralf. > > Daniel. > > >> include/linux/backlight.h | 32 ++++++++++++++++++++++++++++++++ >> 1 file changed, 32 insertions(+) >> >> diff --git a/include/linux/backlight.h b/include/linux/backlight.h >> index af7003548..ace825e2c 100644 >> --- a/include/linux/backlight.h >> +++ b/include/linux/backlight.h >> @@ -130,6 +130,38 @@ static inline int backlight_update_status(struct backlight_device *bd) >> return ret; >> } >> >> +/** >> + * backlight_enable - Enable backlight >> + * @bd: the backlight device to enable >> + */ >> +static inline int backlight_enable(struct backlight_device *bd) >> +{ >> + if (!bd) >> + return 0; >> + >> + bd->props.power = FB_BLANK_UNBLANK; >> + bd->props.fb_blank = FB_BLANK_UNBLANK; >> + bd->props.state &= ~BL_CORE_FBBLANK; >> + >> + return backlight_update_status(bd); >> +} >> + >> +/** >> + * backlight_disable - Disable backlight >> + * @bd: the backlight device to disable >> + */ >> +static inline int backlight_disable(struct backlight_device *bd) >> +{ >> + if (!bd) >> + return 0; >> + >> + bd->props.power = FB_BLANK_POWERDOWN; >> + bd->props.fb_blank = FB_BLANK_POWERDOWN; >> + bd->props.state |= BL_CORE_FBBLANK; >> + >> + return backlight_update_status(bd); >> +} >> + >> extern struct backlight_device *backlight_device_register(const char *name, >> struct device *dev, void *devdata, const struct backlight_ops *ops, >> const struct backlight_properties *props); >> -- >> 2.11.0 >>