linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	gregkh@linuxfoundation.org, thomas.petazzoni@free-electrons.com
Cc: DRI Development <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 4/6] staging/fbtft: Stop using BL_CORE_DRIVER1
Date: Mon, 30 Apr 2018 10:54:15 +0100	[thread overview]
Message-ID: <20180430095415.GB5147@dell> (raw)
In-Reply-To: <20180425174253.4616-4-daniel.vetter@ffwll.ch>

Greg, Thomas,

On Wed, 25 Apr 2018, Daniel Vetter wrote:
> Leaking driver internal tracking into the already massively confusing
> backlight power tracking is really confusing.
> 
> Luckily we have already a drvdata structure, so fixing this is really
> easy.
> 
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Daniel Thompson <daniel.thompson@linaro.org>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/staging/fbtft/fbtft-core.c | 4 ++--
>  drivers/staging/fbtft/fbtft.h      | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)

Do you want a pull-request for this patch or can I just take it?

> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index 0e36b66ae5f7..731e47149af8 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -246,7 +246,7 @@ static int fbtft_request_gpios_dt(struct fbtft_par *par)
>  static int fbtft_backlight_update_status(struct backlight_device *bd)
>  {
>  	struct fbtft_par *par = bl_get_data(bd);
> -	bool polarity = !!(bd->props.state & BL_CORE_DRIVER1);
> +	bool polarity = par->polarity;
>  
>  	fbtft_par_dbg(DEBUG_BACKLIGHT, par,
>  		"%s: polarity=%d, power=%d, fb_blank=%d\n",
> @@ -296,7 +296,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
>  	/* Assume backlight is off, get polarity from current state of pin */
>  	bl_props.power = FB_BLANK_POWERDOWN;
>  	if (!gpio_get_value(par->gpio.led[0]))
> -		bl_props.state |= BL_CORE_DRIVER1;
> +		par->polarity = true;
>  
>  	bd = backlight_device_register(dev_driver_string(par->info->device),
>  				       par->info->device, par,
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index e19e64e0d094..c7cb4a7896f4 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -229,6 +229,7 @@ struct fbtft_par {
>  	ktime_t update_time;
>  	bool bgr;
>  	void *extra;
> +	bool polarity;
>  };
>  
>  #define NUMARGS(...)  (sizeof((int[]){__VA_ARGS__})/sizeof(int))

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2018-04-30  9:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 17:42 [PATCH 1/6] backlight: Nuke unused backlight.props.state states Daniel Vetter
2018-04-25 17:42 ` [PATCH 2/6] backlight/generic-bl: remove DRIVER1 state Daniel Vetter
2018-04-30 10:21   ` Jani Nikula
2018-04-25 17:42 ` [PATCH 3/6] backlight/pandora: Stop using BL_CORE_DRIVER1 Daniel Vetter
2018-04-30 10:22   ` Jani Nikula
2018-04-25 17:42 ` [PATCH 4/6] staging/fbtft: " Daniel Vetter
2018-04-30  9:54   ` Lee Jones [this message]
2018-04-30 10:59     ` Greg KH
2018-04-30 10:22   ` Jani Nikula
2018-04-25 17:42 ` [PATCH 5/6] backlight: Also nuke BL_CORE_DRIVER1 Daniel Vetter
2018-04-30 10:24   ` Jani Nikula
2018-04-30 12:14     ` Lee Jones
2018-04-25 17:42 ` [PATCH 6/6] MAINTAINERS: add dri-devel for backlight subsystem patches Daniel Vetter
2018-04-25 19:43   ` Jingoo Han
2018-04-25 19:42 ` [PATCH 1/6] backlight: Nuke unused backlight.props.state states Jingoo Han
2018-04-30 10:21 ` Jani Nikula
2018-04-30 12:27 ` Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2018-01-17 14:01 Daniel Vetter
2018-01-17 14:01 ` [PATCH 4/6] staging/fbtft: Stop using BL_CORE_DRIVER1 Daniel Vetter
2018-01-17 16:50   ` Daniel Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180430095415.GB5147@dell \
    --to=lee.jones@linaro.org \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jingoohan1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).