linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
@ 2017-03-15 19:45 Olimpiu Dejeu
  2017-03-15 19:45 ` [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand Olimpiu Dejeu
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Olimpiu Dejeu @ 2017-03-15 19:45 UTC (permalink / raw)
  To: robh
  Cc: lee.jones, linux-kernel, linux-fbdev, devicetree, jingoohan1,
	bdodge, joe, medasaro, daniel.thompson, Olimpiu Dejeu

backlight: Add arc to vendor prefixes
Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
---
v8:
- Version to match other patches in set

 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 16d3b5e..6f33a4b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -28,6 +28,7 @@ andestech	Andes Technology Corporation
 apm	Applied Micro Circuits Corporation (APM)
 aptina	Aptina Imaging
 arasan	Arasan Chip Systems
+arc	Arctic Sand
 aries	Aries Embedded GmbH
 arm	ARM Ltd.
 armadeus	ARMadeus Systems SARL
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand
  2017-03-15 19:45 [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Olimpiu Dejeu
@ 2017-03-15 19:45 ` Olimpiu Dejeu
  2017-04-25  8:17   ` Lee Jones
  2017-03-15 19:45 ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices Olimpiu Dejeu
  2017-04-24 15:09 ` [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Rob Herring
  2 siblings, 1 reply; 16+ messages in thread
From: Olimpiu Dejeu @ 2017-03-15 19:45 UTC (permalink / raw)
  To: robh
  Cc: lee.jones, linux-kernel, linux-fbdev, devicetree, jingoohan1,
	bdodge, joe, medasaro, daniel.thompson, Olimpiu Dejeu

backlight: Add devicetree bindings for the Arctic Sand backlight driver
This patch provides devicetree bindings for the Arctic Sand
    driver submitted in the previous patch
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
---
v7 => v8:
- Version updated to match other patch in set. No other changes.
v6 => v7:
- Version updated to match other patch in set. No other changes.
v5 => v6:
- Version updated to match other patch in set. No other changes.
v4 => v5:
- Added spaces for increased readability per Lee Jones
v3 => v4:
- Added spaces for increased readability per Lee Jones
v2 => v3:
- Version updated to match other patch in set. No other changes.
v1 => v2:
- Version updated to match other patch in set. No other changes.

 .../bindings/leds/backlight/arcxcnn_bl.txt         | 33 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
new file mode 100644
index 0000000..ecb7731
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
@@ -0,0 +1,33 @@
+Binding for ArcticSand arc2c0608 LED driver
+
+Required properties:
+- compatible:		should be "arc,arc2c0608"
+- reg:			slave address
+
+Optional properties:
+- default-brightness:	brightness value on boot, value from: 0-4095
+- label:		The name of the backlight device
+			See Documentation/devicetree/bindings/leds/common.txt
+- led-sources:		List of enabled channels from 0 to 5.
+			See Documentation/devicetree/bindings/leds/common.txt
+
+- arc,led-config-0:	setting for register ILED_CONFIG_0
+- arc,led-config-1:	setting for register ILED_CONFIG_1
+- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
+- arc,comp-config:	setting for register CONFIG_COMP
+- arc,filter-config:	setting for register FILTER_CONFIG
+- arc,trim-config:	setting for register IMAXTUNE
+
+Note: Optional properties not specified will default to values in IC EPROM
+
+Example:
+
+arc2c0608@30 {
+	compatible = "arc,arc2c0608";
+	reg = <0x30>;
+	default-brightness = <500>;
+	label = "lcd-backlight";
+	linux,default-trigger = "backlight";
+	led-sources = <0 1 2 5>;
+};
+
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices
  2017-03-15 19:45 [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Olimpiu Dejeu
  2017-03-15 19:45 ` [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand Olimpiu Dejeu
@ 2017-03-15 19:45 ` Olimpiu Dejeu
  2017-03-17 14:48   ` kbuild test robot
  2017-03-17 14:48   ` [PATCH] fix ptr_ret.cocci warnings kbuild test robot
  2017-04-24 15:09 ` [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Rob Herring
  2 siblings, 2 replies; 16+ messages in thread
From: Olimpiu Dejeu @ 2017-03-15 19:45 UTC (permalink / raw)
  To: robh
  Cc: lee.jones, linux-kernel, linux-fbdev, devicetree, jingoohan1,
	bdodge, joe, medasaro, daniel.thompson, Olimpiu Dejeu

backlight: Add support for Arctic Sand LED backlight driver chips
This driver provides support for the Arctic Sand arc2c0608 chip, 
    and provides a framework to support future devices.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
---
v7 => v8:
- Version updated to match other patch in set. No other changes.
v6 => v7:
- Addressing issues brought up by Daniel Thompson
v5 => v6:
- Addressing issues brought up by Daniel Thompson
v4 => v5:
- Code style changes per Joe Perches and Jingoo Han
v3 => v4:
- Code style changes per Joe Perches and Jingoo Han
v2 => v3:
- Renamed variables to comply with conventions on naming
- Corrected device name in arcxcnn.h
v1 => v2:
- Removed "magic numbers" to initialize registers
- Cleaned up device tree bindings
- Fixed code style to address comments and pass "checkpatch"
- Removed unneeded debug and testing code


 drivers/video/backlight/Kconfig      |   7 +
 drivers/video/backlight/Makefile     |   1 +
 drivers/video/backlight/arcxcnn_bl.c | 422 +++++++++++++++++++++++++++++++++++
 3 files changed, 430 insertions(+)
 create mode 100644 drivers/video/backlight/arcxcnn_bl.c

diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 5ffa4b4..4e1d2ad 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -460,6 +460,13 @@ config BACKLIGHT_BD6107
 	help
 	  If you have a Rohm BD6107 say Y to enable the backlight driver.
 
+config BACKLIGHT_ARCXCNN
+	tristate "Backlight driver for the Arctic Sands ARCxCnnnn family"
+	depends on I2C
+	help
+	  If you have an ARCxCnnnn family backlight say Y to enable
+	  the backlight driver.
+
 endif # BACKLIGHT_CLASS_DEVICE
 
 endif # BACKLIGHT_LCD_SUPPORT
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index 16ec534..8905129 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -55,3 +55,4 @@ obj-$(CONFIG_BACKLIGHT_SKY81452)	+= sky81452-backlight.o
 obj-$(CONFIG_BACKLIGHT_TOSA)		+= tosa_bl.o
 obj-$(CONFIG_BACKLIGHT_TPS65217)	+= tps65217_bl.o
 obj-$(CONFIG_BACKLIGHT_WM831X)		+= wm831x_bl.o
+obj-$(CONFIG_BACKLIGHT_ARCXCNN) 	+= arcxcnn_bl.o
diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
new file mode 100644
index 0000000..e01b1b0
--- /dev/null
+++ b/drivers/video/backlight/arcxcnn_bl.c
@@ -0,0 +1,422 @@
+/*
+ * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
+ *
+ * Copyright 2016 ArcticSand, Inc.
+ * Author : Brian Dodge <bdodge@arcticsand.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/backlight.h>
+#include <linux/err.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/slab.h>
+
+enum arcxcnn_chip_id {
+	ARC2C0608
+};
+
+/**
+ * struct arcxcnn_platform_data
+ * @name		: Backlight driver name (NULL will use default)
+ * @initial_brightness	: initial value of backlight brightness
+ * @leden		: initial LED string enables, upper bit is global on/off
+ * @led_config_0	: fading speed (period between intensity steps)
+ * @led_config_1	: misc settings, see datasheet
+ * @dim_freq		: pwm dimming frequency if in pwm mode
+ * @comp_config		: misc config, see datasheet
+ * @filter_config	: RC/PWM filter config, see datasheet
+ * @trim_config		: full scale current trim, see datasheet
+ */
+struct arcxcnn_platform_data {
+	const char *name;
+	u16 initial_brightness;
+	u8	leden;
+	u8	led_config_0;
+	u8	led_config_1;
+	u8	dim_freq;
+	u8	comp_config;
+	u8	filter_config;
+	u8	trim_config;
+};
+
+#define ARCXCNN_CMD		0x00	/* Command Register */
+#define ARCXCNN_CMD_STDBY	0x80	/*   I2C Standby */
+#define ARCXCNN_CMD_RESET	0x40	/*   Reset */
+#define ARCXCNN_CMD_BOOST	0x10	/*   Boost */
+#define ARCXCNN_CMD_OVP_MASK	0x0C	/*   --- Over Voltage Threshold */
+#define ARCXCNN_CMD_OVP_XXV	0x0C	/*   <rsvrd> Over Voltage Threshold */
+#define ARCXCNN_CMD_OVP_20V	0x08	/*   20v Over Voltage Threshold */
+#define ARCXCNN_CMD_OVP_24V	0x04	/*   24v Over Voltage Threshold */
+#define ARCXCNN_CMD_OVP_31V	0x00	/*   31.4v Over Voltage Threshold */
+#define ARCXCNN_CMD_EXT_COMP	0x01	/*   part (0) or full (1) ext. comp */
+
+#define ARCXCNN_CONFIG		0x01	/* Configuration */
+#define ARCXCNN_STATUS1		0x02	/* Status 1 */
+#define ARCXCNN_STATUS2		0x03	/* Status 2 */
+#define ARCXCNN_FADECTRL	0x04	/* Fading Control */
+#define ARCXCNN_ILED_CONFIG	0x05	/* ILED Configuration */
+#define ARCXCNN_ILED_DIM_PWM	0x00	/*   config dim mode pwm */
+#define ARCXCNN_ILED_DIM_INT	0x04	/*   config dim mode internal */
+#define ARCXCNN_LEDEN		0x06	/* LED Enable Register */
+#define ARCXCNN_LEDEN_ISETEXT	0x80	/*   Full-scale current set extern */
+#define ARCXCNN_LEDEN_MASK	0x3F	/*   LED string enables mask */
+#define ARCXCNN_LEDEN_BITS	0x06	/*   Bits of LED string enables */
+#define ARCXCNN_LEDEN_LED1	0x01
+#define ARCXCNN_LEDEN_LED2	0x02
+#define ARCXCNN_LEDEN_LED3	0x04
+#define ARCXCNN_LEDEN_LED4	0x08
+#define ARCXCNN_LEDEN_LED5	0x10
+#define ARCXCNN_LEDEN_LED6	0x20
+
+#define ARCXCNN_WLED_ISET_LSB	0x07	/* LED ISET LSB (in upper nibble) */
+#define ARCXCNN_WLED_ISET_LSB_SHIFT 0x04  /* ISET LSB Left Shift */
+#define ARCXCNN_WLED_ISET_MSB	0x08	/* LED ISET MSB (8 bits) */
+
+#define ARCXCNN_DIMFREQ		0x09
+#define ARCXCNN_COMP_CONFIG	0x0A
+#define ARCXCNN_FILT_CONFIG	0x0B
+#define ARCXCNN_IMAXTUNE	0x0C
+#define ARCXCNN_ID_MSB		0x1E
+#define ARCXCNN_ID_LSB		0x1F
+
+#define MAX_BRIGHTNESS		4095
+#define INIT_BRIGHT		60
+
+struct arcxcnn {
+	struct i2c_client *client;
+	struct backlight_device *bl;
+	struct device *dev;
+	struct arcxcnn_platform_data *pdata;
+};
+
+static int arcxcnn_update_field(struct arcxcnn *lp, u8 reg, u8 mask, u8 data)
+{
+	int ret;
+	u8 tmp;
+
+	ret = i2c_smbus_read_byte_data(lp->client, reg);
+	if (ret < 0) {
+		dev_err(lp->dev, "failed to read 0x%.2x\n", reg);
+		return ret;
+	}
+
+	tmp = (u8)ret;
+	tmp &= ~mask;
+	tmp |= data & mask;
+
+	return i2c_smbus_write_byte_data(lp->client, reg, tmp);
+}
+
+static int arcxcnn_set_brightness(struct arcxcnn *lp, u32 brightness)
+{
+	int ret;
+	u8 val;
+
+	/* lower nibble of brightness goes in upper nibble of LSB register */
+	val = (brightness & 0xF) << ARCXCNN_WLED_ISET_LSB_SHIFT;
+	ret = i2c_smbus_write_byte_data(lp->client,
+		ARCXCNN_WLED_ISET_LSB, val);
+	if (ret < 0)
+		return ret;
+
+	/* remaining 8 bits of brightness go in MSB register */
+	val = (brightness >> 4);
+	return i2c_smbus_write_byte_data(lp->client,
+		ARCXCNN_WLED_ISET_MSB, val);
+}
+
+static int arcxcnn_bl_update_status(struct backlight_device *bl)
+{
+	struct arcxcnn *lp = bl_get_data(bl);
+	u32 brightness = bl->props.brightness;
+	int ret;
+
+	if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
+		brightness = 0;
+
+	ret = arcxcnn_set_brightness(lp, brightness);
+	if (ret)
+		return ret;
+
+	/* set power-on/off/save modes */
+	return arcxcnn_update_field(lp, ARCXCNN_CMD, ARCXCNN_CMD_STDBY,
+		(bl->props.power == 0) ? 0 : ARCXCNN_CMD_STDBY);
+}
+
+static const struct backlight_ops arcxcnn_bl_ops = {
+	.options = BL_CORE_SUSPENDRESUME,
+	.update_status = arcxcnn_bl_update_status,
+};
+
+static int arcxcnn_backlight_register(struct arcxcnn *lp)
+{
+	struct backlight_properties *props;
+	const char *name = lp->pdata->name ? : "arctic_bl";
+
+	props = devm_kzalloc(lp->dev, sizeof(*props), GFP_KERNEL);
+	if (!props)
+		return -ENOMEM;
+
+	props->type = BACKLIGHT_PLATFORM;
+	props->max_brightness = MAX_BRIGHTNESS;
+
+	if (lp->pdata->initial_brightness > props->max_brightness)
+		lp->pdata->initial_brightness = props->max_brightness;
+
+	props->brightness = lp->pdata->initial_brightness;
+
+	lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp,
+				       &arcxcnn_bl_ops, props);
+	if (IS_ERR(lp->bl))
+		return PTR_ERR(lp->bl);
+
+	return 0;
+}
+
+static void arcxcnn_parse_dt(struct arcxcnn *lp)
+{
+	struct device *dev = lp->dev;
+	struct device_node *node = dev->of_node;
+	u32 prog_val, num_entry, entry, sources[ARCXCNN_LEDEN_BITS];
+	int ret;
+
+	/* device tree entry isn't required, defaults are OK */
+	if (!node)
+		return;
+
+	ret = of_property_read_string(node, "label", &lp->pdata->name);
+	if (ret < 0)
+		lp->pdata->name = NULL;
+
+	ret = of_property_read_u32(node, "default-brightness", &prog_val);
+	if (ret == 0)
+		lp->pdata->initial_brightness = prog_val;
+
+	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);
+	if (ret == 0)
+		lp->pdata->led_config_1 = (u8)prog_val;
+
+	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);
+	if (ret == 0)
+		lp->pdata->comp_config = (u8)prog_val;
+
+	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);
+	if (ret == 0)
+		lp->pdata->trim_config = (u8)prog_val;
+
+	ret = of_property_count_u32_elems(node, "led-sources");
+	if (ret < 0) {
+		lp->pdata->leden = ARCXCNN_LEDEN_MASK; /* all on is default */
+	} else {
+		num_entry = ret;
+		if (num_entry > ARCXCNN_LEDEN_BITS)
+			num_entry = ARCXCNN_LEDEN_BITS;
+
+		ret = of_property_read_u32_array(node, "led-sources", sources,
+					num_entry);
+		if (ret < 0) {
+			dev_err(dev, "led-sources node is invalid.\n");
+			return;
+		}
+
+		lp->pdata->leden = 0;
+
+		/* for each enable in source, set bit in led enable */
+		for (entry = 0; entry < num_entry; entry++) {
+			u8 onbit = 1 << sources[entry];
+
+			lp->pdata->leden |= onbit;
+		}
+	}
+}
+
+static int arcxcnn_probe(struct i2c_client *cl, const struct i2c_device_id *id)
+{
+	struct arcxcnn *lp;
+	int ret;
+
+	if (!i2c_check_functionality(cl->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+		return -EIO;
+
+	lp = devm_kzalloc(&cl->dev, sizeof(*lp), GFP_KERNEL);
+	if (!lp)
+		return -ENOMEM;
+
+	lp->client = cl;
+	lp->dev = &cl->dev;
+	lp->pdata = dev_get_platdata(&cl->dev);
+
+	/* reset the device */
+	ret = i2c_smbus_write_byte_data(lp->client,
+		ARCXCNN_CMD, ARCXCNN_CMD_RESET);
+	if (ret)
+		goto probe_err;
+
+	if (!lp->pdata) {
+		lp->pdata = devm_kzalloc(lp->dev,
+				sizeof(*lp->pdata), GFP_KERNEL);
+		if (!lp->pdata)
+			return -ENOMEM;
+
+		/* Setup defaults based on power-on defaults */
+		lp->pdata->name = NULL;
+		lp->pdata->initial_brightness = INIT_BRIGHT;
+		lp->pdata->leden = ARCXCNN_LEDEN_MASK;
+
+		lp->pdata->led_config_0 = i2c_smbus_read_byte_data(
+			lp->client, ARCXCNN_FADECTRL);
+
+		lp->pdata->led_config_1 = i2c_smbus_read_byte_data(
+			lp->client, ARCXCNN_ILED_CONFIG);
+		/* insure dim mode is not default pwm */
+		lp->pdata->led_config_1 |= ARCXCNN_ILED_DIM_INT;
+
+		lp->pdata->dim_freq = i2c_smbus_read_byte_data(
+			lp->client, ARCXCNN_DIMFREQ);
+
+		lp->pdata->comp_config = i2c_smbus_read_byte_data(
+			lp->client, ARCXCNN_COMP_CONFIG);
+
+		lp->pdata->filter_config = i2c_smbus_read_byte_data(
+			lp->client, ARCXCNN_FILT_CONFIG);
+
+		lp->pdata->trim_config = i2c_smbus_read_byte_data(
+			lp->client, ARCXCNN_IMAXTUNE);
+
+		if (IS_ENABLED(CONFIG_OF))
+			arcxcnn_parse_dt(lp);
+	}
+
+	i2c_set_clientdata(cl, lp);
+
+	/* constrain settings to what is possible */
+	if (lp->pdata->initial_brightness > MAX_BRIGHTNESS)
+		lp->pdata->initial_brightness = MAX_BRIGHTNESS;
+
+	/* set initial brightness */
+	ret = arcxcnn_set_brightness(lp, lp->pdata->initial_brightness);
+	if (ret)
+		goto probe_err;
+
+	/* set other register values directly */
+	ret = i2c_smbus_write_byte_data(lp->client, ARCXCNN_FADECTRL,
+		lp->pdata->led_config_0);
+	if (ret)
+		goto probe_err;
+
+	ret = i2c_smbus_write_byte_data(lp->client, ARCXCNN_ILED_CONFIG,
+		lp->pdata->led_config_1);
+	if (ret)
+		goto probe_err;
+
+	ret = i2c_smbus_write_byte_data(lp->client, ARCXCNN_DIMFREQ,
+		lp->pdata->dim_freq);
+	if (ret)
+		goto probe_err;
+
+	ret = i2c_smbus_write_byte_data(lp->client, ARCXCNN_COMP_CONFIG,
+		lp->pdata->comp_config);
+	if (ret)
+		goto probe_err;
+
+	ret = i2c_smbus_write_byte_data(lp->client, ARCXCNN_FILT_CONFIG,
+		lp->pdata->filter_config);
+	if (ret)
+		goto probe_err;
+
+	ret = i2c_smbus_write_byte_data(lp->client, ARCXCNN_IMAXTUNE,
+		lp->pdata->trim_config);
+	if (ret)
+		goto probe_err;
+
+	/* set initial LED Enables */
+	arcxcnn_update_field(lp, ARCXCNN_LEDEN,
+		ARCXCNN_LEDEN_MASK, lp->pdata->leden);
+
+	ret = arcxcnn_backlight_register(lp);
+	if (ret)
+		goto probe_register_err;
+
+	backlight_update_status(lp->bl);
+
+	return 0;
+
+probe_register_err:
+	dev_err(lp->dev,
+		"failed to register backlight.\n");
+
+probe_err:
+	dev_err(lp->dev,
+		"failure ret: %d\n", ret);
+	return ret;
+}
+
+static int arcxcnn_remove(struct i2c_client *cl)
+{
+	struct arcxcnn *lp = i2c_get_clientdata(cl);
+
+	/* disable all strings (ignore errors) */
+	i2c_smbus_write_byte_data(lp->client,
+		ARCXCNN_LEDEN, 0x00);
+	/* reset the device (ignore errors) */
+	i2c_smbus_write_byte_data(lp->client,
+		ARCXCNN_CMD, ARCXCNN_CMD_RESET);
+
+	lp->bl->props.brightness = 0;
+
+	backlight_update_status(lp->bl);
+
+	return 0;
+}
+
+static const struct of_device_id arcxcnn_dt_ids[] = {
+	{ .compatible = "arc,arc2c0608" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, arcxcnn_dt_ids);
+
+static const struct i2c_device_id arcxcnn_ids[] = {
+	{"arc2c0608", ARC2C0608},
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, arcxcnn_ids);
+
+static struct i2c_driver arcxcnn_driver = {
+	.driver = {
+		.name = "arcxcnn_bl",
+		.of_match_table = of_match_ptr(arcxcnn_dt_ids),
+	},
+	.probe = arcxcnn_probe,
+	.remove = arcxcnn_remove,
+	.id_table = arcxcnn_ids,
+};
+module_i2c_driver(arcxcnn_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
+MODULE_DESCRIPTION("ARCXCNN Backlight driver");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices
  2017-03-15 19:45 ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices Olimpiu Dejeu
@ 2017-03-17 14:48   ` kbuild test robot
  2017-03-17 14:48   ` [PATCH] fix ptr_ret.cocci warnings kbuild test robot
  1 sibling, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2017-03-17 14:48 UTC (permalink / raw)
  To: Olimpiu Dejeu
  Cc: kbuild-all, robh, lee.jones, linux-kernel, linux-fbdev,
	devicetree, jingoohan1, bdodge, joe, medasaro, daniel.thompson,
	Olimpiu Dejeu

Hi Olimpiu,

[auto build test WARNING on robh/for-next]
[also build test WARNING on v4.11-rc2 next-20170310]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Olimpiu-Dejeu/backlight-arcxcnn-add-arc-to-vendor-prefix/20170317-205447
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next


coccinelle warnings: (new ones prefixed by >>)

>> drivers/video/backlight/arcxcnn_bl.c:183:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] fix ptr_ret.cocci warnings
  2017-03-15 19:45 ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices Olimpiu Dejeu
  2017-03-17 14:48   ` kbuild test robot
@ 2017-03-17 14:48   ` kbuild test robot
  2017-03-21 14:58     ` Olimpiu Dejeu
  1 sibling, 1 reply; 16+ messages in thread
From: kbuild test robot @ 2017-03-17 14:48 UTC (permalink / raw)
  To: Olimpiu Dejeu
  Cc: kbuild-all, robh, lee.jones, linux-kernel, linux-fbdev,
	devicetree, jingoohan1, bdodge, joe, medasaro, daniel.thompson,
	Olimpiu Dejeu

drivers/video/backlight/arcxcnn_bl.c:183:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Olimpiu Dejeu <olimpiu@arcticsand.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 arcxcnn_bl.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/video/backlight/arcxcnn_bl.c
+++ b/drivers/video/backlight/arcxcnn_bl.c
@@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st
 
 	lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp,
 				       &arcxcnn_bl_ops, props);
-	if (IS_ERR(lp->bl))
-		return PTR_ERR(lp->bl);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(lp->bl);
 }
 
 static void arcxcnn_parse_dt(struct arcxcnn *lp)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix ptr_ret.cocci warnings
  2017-03-17 14:48   ` [PATCH] fix ptr_ret.cocci warnings kbuild test robot
@ 2017-03-21 14:58     ` Olimpiu Dejeu
  2017-03-21 15:07       ` Daniel Thompson
  0 siblings, 1 reply; 16+ messages in thread
From: Olimpiu Dejeu @ 2017-03-21 14:58 UTC (permalink / raw)
  To: kbuild test robot, fengguang.wu
  Cc: kbuild-all, Rob Herring, Lee Jones, linux-kernel, linux-fbdev,
	devicetree, jingoohan1, Brian Dodge, joe, Matthew D'Asaro,
	Daniel Thompson

On Fri, Mar 17, 2017 at 10:48 AM, kbuild test robot <lkp@intel.com> wrote:
> drivers/video/backlight/arcxcnn_bl.c:183:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>
>
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> CC: Olimpiu Dejeu <olimpiu@arcticsand.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
>  arcxcnn_bl.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- a/drivers/video/backlight/arcxcnn_bl.c
> +++ b/drivers/video/backlight/arcxcnn_bl.c
> @@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st
>
>         lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp,
>                                        &arcxcnn_bl_ops, props);
> -       if (IS_ERR(lp->bl))
> -               return PTR_ERR(lp->bl);
> -
> -       return 0;
> +       return PTR_ERR_OR_ZERO(lp->bl);
>  }
>
>  static void arcxcnn_parse_dt(struct arcxcnn *lp)

Acked-by: Olimpiu Dejeu <olimpiu@arcticsand.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix ptr_ret.cocci warnings
  2017-03-21 14:58     ` Olimpiu Dejeu
@ 2017-03-21 15:07       ` Daniel Thompson
       [not found]         ` <CAF-XLWL_w3OqafbLzcM=kOkS1nPb0VSCAyDaudQh2UwE4Gw0gg@mail.gmail.com>
  0 siblings, 1 reply; 16+ messages in thread
From: Daniel Thompson @ 2017-03-21 15:07 UTC (permalink / raw)
  To: Olimpiu Dejeu, kbuild test robot, fengguang.wu
  Cc: kbuild-all, Rob Herring, Lee Jones, linux-kernel, linux-fbdev,
	devicetree, jingoohan1, Brian Dodge, joe, Matthew D'Asaro

On 21/03/17 14:58, Olimpiu Dejeu wrote:
> On Fri, Mar 17, 2017 at 10:48 AM, kbuild test robot <lkp@intel.com> wrote:
>> drivers/video/backlight/arcxcnn_bl.c:183:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>>
>>
>>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>>
>> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>>
>> CC: Olimpiu Dejeu <olimpiu@arcticsand.com>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>> ---
>>
>>  arcxcnn_bl.c |    5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> --- a/drivers/video/backlight/arcxcnn_bl.c
>> +++ b/drivers/video/backlight/arcxcnn_bl.c
>> @@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st
>>
>>         lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp,
>>                                        &arcxcnn_bl_ops, props);
>> -       if (IS_ERR(lp->bl))
>> -               return PTR_ERR(lp->bl);
>> -
>> -       return 0;
>> +       return PTR_ERR_OR_ZERO(lp->bl);
>>  }
>>
>>  static void arcxcnn_parse_dt(struct arcxcnn *lp)
>
> Acked-by: Olimpiu Dejeu <olimpiu@arcticsand.com>

Glad you approve! Could you apply this change and re-post the patch 
series? Thanks.


Daniel.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix ptr_ret.cocci warnings
       [not found]         ` <CAF-XLWL_w3OqafbLzcM=kOkS1nPb0VSCAyDaudQh2UwE4Gw0gg@mail.gmail.com>
@ 2017-04-24 10:57           ` Lee Jones
  2017-04-24 11:26             ` Daniel Thompson
  0 siblings, 1 reply; 16+ messages in thread
From: Lee Jones @ 2017-04-24 10:57 UTC (permalink / raw)
  To: Olimpiu Dejeu
  Cc: Daniel Thompson, kbuild test robot, fengguang.wu, kbuild-all,
	Rob Herring, linux-kernel, linux-fbdev, devicetree, jingoohan1,
	Brian Dodge, joe, Matthew D'Asaro

On Mon, 17 Apr 2017, Olimpiu Dejeu wrote:

> On Tue, Mar 21, 2017 at 11:07 AM, Daniel Thompson <
> daniel.thompson@linaro.org> wrote:
> 
> > On 21/03/17 14:58, Olimpiu Dejeu wrote:
> >
> >> On Fri, Mar 17, 2017 at 10:48 AM, kbuild test robot <lkp@intel.com>
> >> wrote:
> >>
> >>> drivers/video/backlight/arcxcnn_bl.c:183:1-3: WARNING: PTR_ERR_OR_ZERO
> >>> can be used
> >>>
> >>>
> >>>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> >>>
> >>> Generated by: scripts/coccinelle/api/ptr_ret.cocci
> >>>
> >>> CC: Olimpiu Dejeu <olimpiu@arcticsand.com>
> >>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> >>> ---
> >>>
> >>>  arcxcnn_bl.c |    5 +----
> >>>  1 file changed, 1 insertion(+), 4 deletions(-)
> >>>
> >>> --- a/drivers/video/backlight/arcxcnn_bl.c
> >>> +++ b/drivers/video/backlight/arcxcnn_bl.c
> >>> @@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st
> >>>
> >>>         lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev,
> >>> lp,
> >>>                                        &arcxcnn_bl_ops, props);
> >>> -       if (IS_ERR(lp->bl))
> >>> -               return PTR_ERR(lp->bl);
> >>> -
> >>> -       return 0;
> >>> +       return PTR_ERR_OR_ZERO(lp->bl);
> >>>  }
> >>>
> >>>  static void arcxcnn_parse_dt(struct arcxcnn *lp)
> >>>
> >>
> >> Acked-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
> >>
> >
> > Glad you approve! Could you apply this change and re-post the patch
> > series? Thanks.
> >
> >
> > Daniel.
> >
> >
> Applied change, re-posted series on March 21st. No sure what next. Please
> advise. Thanks.

Yes you did.

Daniel, do you see v9?

FYI, if this happens again, it's best to wait a couple of weeks then
send the patch again like "[RESEND v9] ..." to gain attention.


-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] fix ptr_ret.cocci warnings
  2017-04-24 10:57           ` Lee Jones
@ 2017-04-24 11:26             ` Daniel Thompson
  0 siblings, 0 replies; 16+ messages in thread
From: Daniel Thompson @ 2017-04-24 11:26 UTC (permalink / raw)
  To: Lee Jones, Olimpiu Dejeu
  Cc: kbuild test robot, fengguang.wu, kbuild-all, Rob Herring,
	linux-kernel, linux-fbdev, devicetree, jingoohan1, Brian Dodge,
	joe, Matthew D'Asaro

On 24/04/17 11:57, Lee Jones wrote:
> On Mon, 17 Apr 2017, Olimpiu Dejeu wrote:
>
>> On Tue, Mar 21, 2017 at 11:07 AM, Daniel Thompson <
>> daniel.thompson@linaro.org> wrote:
>>
>>> On 21/03/17 14:58, Olimpiu Dejeu wrote:
>>>
>>>> On Fri, Mar 17, 2017 at 10:48 AM, kbuild test robot <lkp@intel.com>
>>>> wrote:
>>>>
>>>>> drivers/video/backlight/arcxcnn_bl.c:183:1-3: WARNING: PTR_ERR_OR_ZERO
>>>>> can be used
>>>>>
>>>>>
>>>>>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>>>>>
>>>>> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>>>>>
>>>>> CC: Olimpiu Dejeu <olimpiu@arcticsand.com>
>>>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>>> ---
>>>>>
>>>>>  arcxcnn_bl.c |    5 +----
>>>>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>>>>
>>>>> --- a/drivers/video/backlight/arcxcnn_bl.c
>>>>> +++ b/drivers/video/backlight/arcxcnn_bl.c
>>>>> @@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st
>>>>>
>>>>>         lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev,
>>>>> lp,
>>>>>                                        &arcxcnn_bl_ops, props);
>>>>> -       if (IS_ERR(lp->bl))
>>>>> -               return PTR_ERR(lp->bl);
>>>>> -
>>>>> -       return 0;
>>>>> +       return PTR_ERR_OR_ZERO(lp->bl);
>>>>>  }
>>>>>
>>>>>  static void arcxcnn_parse_dt(struct arcxcnn *lp)
>>>>>
>>>>
>>>> Acked-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
>>>>
>>>
>>> Glad you approve! Could you apply this change and re-post the patch
>>> series? Thanks.
>>>
>>>
>>> Daniel.
>>>
>>>
>> Applied change, re-posted series on March 21st. No sure what next. Please
>> advise. Thanks.
>
> Yes you did.
>
> Daniel, do you see v9?

Yep. All fine at my end... it has my Reviewed-by: which is an even more 
emphatic statement than my Acked-by: ;-) .

I think from this point on I think I'll start posting
"[vX-is-still-]Acked-by:" replies so you don't have to worry about 
whether I've seen new versions.


> FYI, if this happens again, it's best to wait a couple of weeks then
> send the patch again like "[RESEND v9] ..." to gain attention.

RESENDs are a good way to go. Also, if there are questions about the 
code its better to reply to the code rather than the side discussion.


Daniel.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
  2017-03-15 19:45 [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Olimpiu Dejeu
  2017-03-15 19:45 ` [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand Olimpiu Dejeu
  2017-03-15 19:45 ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices Olimpiu Dejeu
@ 2017-04-24 15:09 ` Rob Herring
  2017-04-24 17:56   ` Olimpiu Dejeu
  2 siblings, 1 reply; 16+ messages in thread
From: Rob Herring @ 2017-04-24 15:09 UTC (permalink / raw)
  To: Olimpiu Dejeu
  Cc: Lee Jones, linux-kernel, linux-fbdev, devicetree, Jingoo Han,
	bdodge, Joe Perches, medasaro, Daniel Thompson

On Wed, Mar 15, 2017 at 2:45 PM, Olimpiu Dejeu <olimpiu@arcticsand.com> wrote:
> backlight: Add arc to vendor prefixes
> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
> ---
> v8:
> - Version to match other patches in set
>
>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 16d3b5e..6f33a4b 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -28,6 +28,7 @@ andestech     Andes Technology Corporation
>  apm    Applied Micro Circuits Corporation (APM)
>  aptina Aptina Imaging
>  arasan Arasan Chip Systems
> +arc    Arctic Sand

arc is also a cpu arch. While not a vendor, it could be confusing. How
about "arctic" instead?

BTW, some reason your patches are not going to the DT list.

Rob

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
  2017-04-24 15:09 ` [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Rob Herring
@ 2017-04-24 17:56   ` Olimpiu Dejeu
  2017-04-25 16:36     ` Jingoo Han
  0 siblings, 1 reply; 16+ messages in thread
From: Olimpiu Dejeu @ 2017-04-24 17:56 UTC (permalink / raw)
  To: 'Rob Herring'
  Cc: 'Lee Jones',
	linux-kernel, linux-fbdev, devicetree, 'Jingoo Han',
	'Brian Dodge', 'Joe Perches',
	'Matthew D'Asaro', 'Daniel Thompson'


On Mon, April 24, 2017 11:10 AM, Rob Herring < robh@kernel.org> wrote:

> On Wed, Mar 15, 2017 at 2:45 PM, Olimpiu Dejeu <olimpiu@arcticsand.com> wrote:
>> backlight: Add arc to vendor prefixes
>> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
>> ---
>> v8:
>> - Version to match other patches in set
>>
>>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
>> b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> index 16d3b5e..6f33a4b 100644
>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> @@ -28,6 +28,7 @@ andestech     Andes Technology Corporation
>>  apm    Applied Micro Circuits Corporation (APM)
>>  aptina Aptina Imaging
>>  arasan Arasan Chip Systems
>> +arc    Arctic Sand

>arc is also a cpu arch. While not a vendor, it could be confusing. How about "arctic" >instead?

Rob, will do, i.e. I will change it to "arctic"

>BTW, some reason your patches are not going to the DT list.


I'm emailing to devicetree@vger.kernel.org, I think this is the correct list. Please advise.


>Rob
Olimpiu

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand
  2017-03-15 19:45 ` [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand Olimpiu Dejeu
@ 2017-04-25  8:17   ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2017-04-25  8:17 UTC (permalink / raw)
  To: Olimpiu Dejeu
  Cc: robh, linux-kernel, linux-fbdev, devicetree, jingoohan1, bdodge,
	joe, medasaro, daniel.thompson

On Wed, 15 Mar 2017, Olimpiu Dejeu wrote:

> backlight: Add devicetree bindings for the Arctic Sand backlight driver
> This patch provides devicetree bindings for the Arctic Sand
>     driver submitted in the previous patch
> Acked-by: Rob Herring <robh@kernel.org>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
> ---
> v7 => v8:
> - Version updated to match other patch in set. No other changes.
> v6 => v7:
> - Version updated to match other patch in set. No other changes.
> v5 => v6:
> - Version updated to match other patch in set. No other changes.
> v4 => v5:
> - Added spaces for increased readability per Lee Jones
> v3 => v4:
> - Added spaces for increased readability per Lee Jones
> v2 => v3:
> - Version updated to match other patch in set. No other changes.
> v1 => v2:
> - Version updated to match other patch in set. No other changes.
> 
>  .../bindings/leds/backlight/arcxcnn_bl.txt         | 33 ++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

Applied, thanks.

> diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> new file mode 100644
> index 0000000..ecb7731
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> @@ -0,0 +1,33 @@
> +Binding for ArcticSand arc2c0608 LED driver
> +
> +Required properties:
> +- compatible:		should be "arc,arc2c0608"
> +- reg:			slave address
> +
> +Optional properties:
> +- default-brightness:	brightness value on boot, value from: 0-4095
> +- label:		The name of the backlight device
> +			See Documentation/devicetree/bindings/leds/common.txt
> +- led-sources:		List of enabled channels from 0 to 5.
> +			See Documentation/devicetree/bindings/leds/common.txt
> +
> +- arc,led-config-0:	setting for register ILED_CONFIG_0
> +- arc,led-config-1:	setting for register ILED_CONFIG_1
> +- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
> +- arc,comp-config:	setting for register CONFIG_COMP
> +- arc,filter-config:	setting for register FILTER_CONFIG
> +- arc,trim-config:	setting for register IMAXTUNE
> +
> +Note: Optional properties not specified will default to values in IC EPROM
> +
> +Example:
> +
> +arc2c0608@30 {
> +	compatible = "arc,arc2c0608";
> +	reg = <0x30>;
> +	default-brightness = <500>;
> +	label = "lcd-backlight";
> +	linux,default-trigger = "backlight";
> +	led-sources = <0 1 2 5>;
> +};
> +

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
  2017-04-24 17:56   ` Olimpiu Dejeu
@ 2017-04-25 16:36     ` Jingoo Han
  2017-04-27 12:36       ` Geert Uytterhoeven
  0 siblings, 1 reply; 16+ messages in thread
From: Jingoo Han @ 2017-04-25 16:36 UTC (permalink / raw)
  To: 'Olimpiu Dejeu', 'Rob Herring'
  Cc: 'Lee Jones',
	linux-kernel, linux-fbdev, devicetree, 'Brian Dodge',
	'Joe Perches', 'Matthew D'Asaro',
	'Daniel Thompson'

On Monday, April 24, 2017 1:56 PM, Olimpiu Dejeu wrote:
> 
> On Mon, April 24, 2017 11:10 AM, Rob Herring < robh@kernel.org> wrote:
> 
> > On Wed, Mar 15, 2017 at 2:45 PM, Olimpiu Dejeu <olimpiu@arcticsand.com>
> wrote:
> >> backlight: Add arc to vendor prefixes
> >> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
> >> ---
> >> v8:
> >> - Version to match other patches in set
> >>
> >>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> index 16d3b5e..6f33a4b 100644
> >> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> @@ -28,6 +28,7 @@ andestech     Andes Technology Corporation
> >>  apm    Applied Micro Circuits Corporation (APM)
> >>  aptina Aptina Imaging
> >>  arasan Arasan Chip Systems
> >> +arc    Arctic Sand
> 
> >arc is also a cpu arch. While not a vendor, it could be confusing. How
> about "arctic" >instead?
> 
> Rob, will do, i.e. I will change it to "arctic"

Hi Olimpiu,

Oh, "arc" and "arctic" is totally different.
In my opinion, one of the purposes of DT is to describe hardware stuffs.
So, please use more detailed words.

> 
> >BTW, some reason your patches are not going to the DT list.
> 
> 
> I'm emailing to devicetree@vger.kernel.org, I think this is the correct
> list. Please advise.

DT is some kind of ABI. It means that changing DT names such as property names
is not easy, after DT patches were merged. So, if someone want to add new DT stuff
into the vanilla kernel, that patch should be reviewed more thoroughly
than normal patches about driver stuffs.

Thanks,
Jingoo Han

> 
> 
> >Rob
> Olimpiu
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
  2017-04-25 16:36     ` Jingoo Han
@ 2017-04-27 12:36       ` Geert Uytterhoeven
  2017-04-27 17:41         ` Jingoo Han
  0 siblings, 1 reply; 16+ messages in thread
From: Geert Uytterhoeven @ 2017-04-27 12:36 UTC (permalink / raw)
  To: Jingoo Han
  Cc: Olimpiu Dejeu, Rob Herring, Lee Jones, linux-kernel,
	Linux Fbdev development list, devicetree, Brian Dodge,
	Joe Perches, Matthew D'Asaro, Daniel Thompson

On Tue, Apr 25, 2017 at 6:36 PM, Jingoo Han <jingoohan1@gmail.com> wrote:
> On Monday, April 24, 2017 1:56 PM, Olimpiu Dejeu wrote:
>>
>> On Mon, April 24, 2017 11:10 AM, Rob Herring < robh@kernel.org> wrote:
>>
>> > On Wed, Mar 15, 2017 at 2:45 PM, Olimpiu Dejeu <olimpiu@arcticsand.com>
>> wrote:
>> >> backlight: Add arc to vendor prefixes
>> >> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
>> >> ---
>> >> v8:
>> >> - Version to match other patches in set
>> >>
>> >>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>> >>  1 file changed, 1 insertion(+)
>> >>
>> >> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
>> >> b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> >> index 16d3b5e..6f33a4b 100644
>> >> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>> >> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> >> @@ -28,6 +28,7 @@ andestech     Andes Technology Corporation
>> >>  apm    Applied Micro Circuits Corporation (APM)
>> >>  aptina Aptina Imaging
>> >>  arasan Arasan Chip Systems
>> >> +arc    Arctic Sand
>>
>> >arc is also a cpu arch. While not a vendor, it could be confusing. How
>> about "arctic" >instead?
>>
>> Rob, will do, i.e. I will change it to "arctic"
>
> Hi Olimpiu,
>
> Oh, "arc" and "arctic" is totally different.
> In my opinion, one of the purposes of DT is to describe hardware stuffs.
> So, please use more detailed words.

Already acquired by Murata?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
  2017-04-27 12:36       ` Geert Uytterhoeven
@ 2017-04-27 17:41         ` Jingoo Han
  2017-04-28 15:04           ` Olimpiu Dejeu
  0 siblings, 1 reply; 16+ messages in thread
From: Jingoo Han @ 2017-04-27 17:41 UTC (permalink / raw)
  To: 'Geert Uytterhoeven', 'Olimpiu Dejeu'
  Cc: 'Rob Herring', 'Lee Jones',
	linux-kernel, 'Linux Fbdev development list',
	devicetree, 'Brian Dodge', 'Joe Perches',
	'Matthew D'Asaro', 'Daniel Thompson'

On Thursday, April 27, 2017 8:37 AM, Geert Uytterhoeven wrote:
> On Tue, Apr 25, 2017 at 6:36 PM, Jingoo Han <jingoohan1@gmail.com> wrote:
> > On Monday, April 24, 2017 1:56 PM, Olimpiu Dejeu wrote:
> >>
> >> On Mon, April 24, 2017 11:10 AM, Rob Herring < robh@kernel.org> wrote:
> >>
> >> > On Wed, Mar 15, 2017 at 2:45 PM, Olimpiu Dejeu
> <olimpiu@arcticsand.com>
> >> wrote:
> >> >> backlight: Add arc to vendor prefixes
> >> >> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
> >> >> ---
> >> >> v8:
> >> >> - Version to match other patches in set
> >> >>
> >> >>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> >> >>  1 file changed, 1 insertion(+)
> >> >>
> >> >> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> >> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> >> index 16d3b5e..6f33a4b 100644
> >> >> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> >> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> >> >> @@ -28,6 +28,7 @@ andestech     Andes Technology Corporation
> >> >>  apm    Applied Micro Circuits Corporation (APM)
> >> >>  aptina Aptina Imaging
> >> >>  arasan Arasan Chip Systems
> >> >> +arc    Arctic Sand
> >>
> >> >arc is also a cpu arch. While not a vendor, it could be confusing. How
> >> about "arctic" >instead?
> >>
> >> Rob, will do, i.e. I will change it to "arctic"
> >
> > Hi Olimpiu,
> >
> > Oh, "arc" and "arctic" is totally different.
> > In my opinion, one of the purposes of DT is to describe hardware stuffs.
> > So, please use more detailed words.
> 
> Already acquired by Murata?

Yes, Murata already announced the agreement of acquisition. [1]

To Olimpiu Dejeu,
What is your company's plan about naming?
The brand name 'Artic Sand' will be continued or not?
If not, you should replace 'Artic Sand' with 'Murata'.
As you said earlier, changing DT names is not easy after merging.

Best regards,
Jingoo Han

[1] http://www.murata.com/about/newsroom/news/irnews/irnews/2017/0317

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> In personal conversations with technical people, I call myself a hacker.
> But
> when I'm talking to journalists I just say "programmer" or something like
> that.
>                                 -- Linus Torvalds

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix
  2017-04-27 17:41         ` Jingoo Han
@ 2017-04-28 15:04           ` Olimpiu Dejeu
  0 siblings, 0 replies; 16+ messages in thread
From: Olimpiu Dejeu @ 2017-04-28 15:04 UTC (permalink / raw)
  To: 'Jingoo Han'
  Cc: 'Rob Herring', 'Lee Jones',
	'Geert Uytterhoeven',
	linux-kernel, 'Linux Fbdev development list',
	devicetree, Brian Dodge, 'Joe Perches',
	'Daniel Thompson'

> On Thursday, April 27, 2017 8:37 AM, Geert Uytterhoeven wrote:
> > On Tue, Apr 25, 2017 at 6:36 PM, Jingoo Han <jingoohan1@gmail.com> wrote:
> > > On Monday, April 24, 2017 1:56 PM, Olimpiu Dejeu wrote:
> > >>
> > >> On Mon, April 24, 2017 11:10 AM, Rob Herring < robh@kernel.org> wrote:
> > >>
> > >> > On Wed, Mar 15, 2017 at 2:45 PM, Olimpiu Dejeu
> > <olimpiu@arcticsand.com>
> > >> wrote:
> > >> >> backlight: Add arc to vendor prefixes
> > >> >> Signed-off-by: Olimpiu Dejeu <olimpiu@arcticsand.com>
> > >> >> ---
> > >> >> v8:
> > >> >> - Version to match other patches in set
> > >> >>
> > >> >>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> > >> >>  1 file changed, 1 insertion(+)
> > >> >>
> > >> >> diff --git 
> > >> >> a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > >> >> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > >> >> index 16d3b5e..6f33a4b 100644
> > >> >> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > >> >> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > >> >> @@ -28,6 +28,7 @@ andestech     Andes Technology Corporation
> > >> >>  apm    Applied Micro Circuits Corporation (APM)
> > >> >>  aptina Aptina Imaging
> > >> >>  arasan Arasan Chip Systems
> > >> >> +arc    Arctic Sand
> > >>
> > >> >arc is also a cpu arch. While not a vendor, it could be confusing. 
> > >> >How
> > >> about "arctic" >instead?
> > >>
> > >> Rob, will do, i.e. I will change it to "arctic"
> > >
> > > Hi Olimpiu,
> > >
> > > Oh, "arc" and "arctic" is totally different.
> > > In my opinion, one of the purposes of DT is to describe hardware stuffs.
> > > So, please use more detailed words.
> > 
> > Already acquired by Murata?

> Yes, Murata already announced the agreement of acquisition. [1]

> To Olimpiu Dejeu,
> What is your company's plan about naming?
> The brand name 'Artic Sand' will be continued or not?

The brand name 'Arctic Sand' will be continued 

> If not, you should replace 'Artic Sand' with 'Murata'.
> As you said earlier, changing DT names is not easy after merging.

> Best regards,
> Jingoo Han

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-04-28 15:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 19:45 [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Olimpiu Dejeu
2017-03-15 19:45 ` [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand Olimpiu Dejeu
2017-04-25  8:17   ` Lee Jones
2017-03-15 19:45 ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices Olimpiu Dejeu
2017-03-17 14:48   ` kbuild test robot
2017-03-17 14:48   ` [PATCH] fix ptr_ret.cocci warnings kbuild test robot
2017-03-21 14:58     ` Olimpiu Dejeu
2017-03-21 15:07       ` Daniel Thompson
     [not found]         ` <CAF-XLWL_w3OqafbLzcM=kOkS1nPb0VSCAyDaudQh2UwE4Gw0gg@mail.gmail.com>
2017-04-24 10:57           ` Lee Jones
2017-04-24 11:26             ` Daniel Thompson
2017-04-24 15:09 ` [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Rob Herring
2017-04-24 17:56   ` Olimpiu Dejeu
2017-04-25 16:36     ` Jingoo Han
2017-04-27 12:36       ` Geert Uytterhoeven
2017-04-27 17:41         ` Jingoo Han
2017-04-28 15:04           ` Olimpiu Dejeu

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).