linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Brian Dodge <bdodge09@gmail.com>
Cc: devicetree@vger.kernel.org, jingoohan1@gmail.com,
	dri-devel@lists.freedesktop.org, robh+dt@kernel.org,
	jacek.anaszewski@gmail.com, pavel@ucw.cz, pbacon@psemi.com,
	lee.jones@linaro.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
Date: Wed, 26 Jun 2019 11:53:28 +0100	[thread overview]
Message-ID: <20190626105328.f7mb2n7xo5afhuq2@holly.lan> (raw)
In-Reply-To: <1561435529-7835-3-git-send-email-bdodge09@gmail.com>

On Tue, Jun 25, 2019 at 12:05:29AM -0400, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
> 
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>

Still needs consensus on the DT bindings but for any future resends
please add this (to this patch only):

Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.
> ---
>  drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
>  1 file changed, 25 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
> index 7b1c0a0..14c67f2 100644
> --- a/drivers/video/backlight/arcxcnn_bl.c
> +++ b/drivers/video/backlight/arcxcnn_bl.c
> @@ -1,9 +1,9 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  /*
> - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
> + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
>   *
> - * Copyright 2016 ArcticSand, Inc.
> - * Author : Brian Dodge <bdodge@arcticsand.com>
> + * Copyright 2016-2019  pSemi, Inc.
> + * Author : Brian Dodge <bdodge@psemi.com>
>   */
>  
>  #include <linux/backlight.h>
> @@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
>  	if (ret == 0)
>  		lp->pdata->initial_brightness = prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->led_config_0 = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->led_config_1 = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->dim_freq = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->comp_config = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node,
> +				"arc,filter-config", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->filter_config = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->trim_config = (u8)prog_val;
>  
> @@ -381,6 +394,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
>  }
>  
>  static const struct of_device_id arcxcnn_dt_ids[] = {
> +	{ .compatible = "arctic,arc2c0608" },
> +	/* here to remaim compatible with an older binding, do not use */
>  	{ .compatible = "arc,arc2c0608" },
>  	{ }
>  };
> @@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = {
>  module_i2c_driver(arcxcnn_driver);
>  
>  MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
> +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
>  MODULE_DESCRIPTION("ARCXCNN Backlight driver");
> -- 
> 2.7.4
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-06-26 10:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25  4:05 [PATCH 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
2019-06-25  4:05 ` [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings Brian Dodge
2019-06-25  8:55   ` Daniel Thompson
2019-06-25 11:44     ` Brian Dodge
2019-06-26 10:56       ` Daniel Thompson
2019-06-26 13:22         ` Lee Jones
2019-06-26 14:43         ` Rob Herring
2019-06-26 14:56         ` Pavel Machek
2019-06-26 14:59           ` Brian Dodge
2019-06-26 15:09           ` Dan Murphy
2019-06-26 11:44     ` Dan Murphy
2019-06-25  4:05 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
2019-06-26 10:53   ` Daniel Thompson [this message]
2019-06-26 11:42   ` Dan Murphy
2019-06-26 11:45     ` Dan Murphy
2019-07-01  0:28 [PATCH v2 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
2019-07-01  0:28 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
2019-07-05  9:37   ` Pavel Machek
2019-07-05  9:37     ` Pavel Machek
2019-07-08 18:05   ` Dan Murphy
2019-07-08 18:05     ` Dan Murphy
2019-07-08 19:05     ` Brian Dodge

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=20190626105328.f7mb2n7xo5afhuq2@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=bdodge09@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=pbacon@psemi.com \
    --cc=robh+dt@kernel.org \
    /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).