From patchwork Thu Aug 1 15:14:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 170389 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5580381ile; Thu, 1 Aug 2019 08:14:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4JOZKFU4/X+mIx/1HLYVUGs+MkXiRAQrCmZn3qW6cwgZQAPKxXvk8eoWIDdSOAZj2p2gC X-Received: by 2002:a17:902:e20c:: with SMTP id ce12mr44910plb.130.1564672478632; Thu, 01 Aug 2019 08:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564672478; cv=none; d=google.com; s=arc-20160816; b=Jm5GbxU3Rbm0kJZ5eEDIsFij8JV4KfiuI3G5Jt5lcoMTqGaaWlpnVNuogJz8NbvWEK Ud5zfKl2blPD7gA89KQUey4WunPEwF8B4vtJIaRxnQ+ZKWedbQdqtvf32xPrtUBjVdpy vbW/C4YLykErEU1Zr9LmzEi/emYzIA7nYvicHNIDQw2NWTVZl1fmRfbsz63WqKKSY5mB aUwCM5XgFEqSH+Q2RlUpCL9P+kmaa5zYT/hIOrhLbA1yIEymlErEXl8vGz3NBFuiiMzy 3CcFCq+5qxKv4ODxep+Fua5b6aBuuydqB1dftwH1xDk16+YBFBypqzetJhkpCwvpwlLx HRzQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=leg2rOHZ3RydDboOvt8GXTP7raeVqY+8GAyTLFKbYLo=; b=e2sz+X6hPjEIY6FNLxqddelV88BpWxXVq5vSE8lUttbxkUOzffenF5mPctR1GydTry XaWX/eJYgDq3wS8w9IfRraIzeXKGFrvFAJX3k+8AUS638F+UssfQkpJzgw51L2gx1WQ7 36LUUCZYlv+hJstjaDLnYhPB0JWEpDE85S/4ZUfu+oI/uYfzKzpGGqNdYcYWDZXbNwBr Hrk9/ZYpEoYPTT7iglToqx/6iPKR9yxErv7pvvGjDaKtOax9G1y/RRukP08l7WVMKgZR mpieeo4y9kOpDHH96Algd5cv9DxO76V5858zjOYzjyg2TwdpgkGS7EKrjKGBKmGHhJC0 JqXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=A0BnS6wY; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si34138723plk.225.2019.08.01.08.14.38; Thu, 01 Aug 2019 08:14:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=A0BnS6wY; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727853AbfHAPOe (ORCPT + 1 other); Thu, 1 Aug 2019 11:14:34 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:39080 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732400AbfHAPOc (ORCPT ); Thu, 1 Aug 2019 11:14:32 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x71FEMVs106262; Thu, 1 Aug 2019 10:14:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1564672462; bh=leg2rOHZ3RydDboOvt8GXTP7raeVqY+8GAyTLFKbYLo=; h=From:To:CC:Subject:Date; b=A0BnS6wYWNH3lmYHai4jMXDRaU1loJ1RzI5tv4oFJwo7tuQta+VXMP+xjZAtxAorS fXpmQCVPri6+EVzioC2ipSkWY8W6d5FkDhYgAaCRx/BPXuyF7MJBg6ZHY1QPOX2g/M MGSWlyYNCEvzWy337pnlT9dEfRxuThF87L6t4WiI= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x71FEM3J121647 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 1 Aug 2019 10:14:22 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 1 Aug 2019 10:14:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 1 Aug 2019 10:14:22 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x71FEMRe032738; Thu, 1 Aug 2019 10:14:22 -0500 From: Dan Murphy To: , , , , , , CC: , , Dan Murphy Subject: [PATCH 1/3] leds: lm3532: Fix brightness control for i2c mode Date: Thu, 1 Aug 2019 10:14:19 -0500 Message-ID: <20190801151421.21486-1-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Fix the brightness control for I2C mode. Instead of changing the full scale current register update the ALS target register for the appropriate banks. In addition clean up some code errors and random misspellings found during coding. Tested on Droid4 as well as LM3532 EVM connected to a BeagleBoneBlack Fixes: e37a7f8d77e1 ("leds: lm3532: Introduce the lm3532 LED driver") Reported-by: Pavel Machek Signed-off-by: Dan Murphy --- drivers/leds/leds-lm3532.c | 78 ++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 28 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 646100724971..ff197adb2f22 100644 --- a/drivers/leds/leds-lm3532.c +++ b/drivers/leds/leds-lm3532.c @@ -23,11 +23,11 @@ #define LM3532_REG_PWM_B_CFG 0x14 #define LM3532_REG_PWM_C_CFG 0x15 #define LM3532_REG_ZONE_CFG_A 0x16 -#define LM3532_REG_CTRL_A_BRT 0x17 +#define LM3532_REG_CTRL_A_FS_CURR 0x17 #define LM3532_REG_ZONE_CFG_B 0x18 -#define LM3532_REG_CTRL_B_BRT 0x19 +#define LM3532_REG_CTRL_B_FS_CURR 0x19 #define LM3532_REG_ZONE_CFG_C 0x1a -#define LM3532_REG_CTRL_C_BRT 0x1b +#define LM3532_REG_CTRL_C_FS_CURR 0x1b #define LM3532_REG_ENABLE 0x1d #define LM3532_ALS_CONFIG 0x23 #define LM3532_REG_ZN_0_HI 0x60 @@ -38,9 +38,12 @@ #define LM3532_REG_ZN_2_LO 0x65 #define LM3532_REG_ZN_3_HI 0x66 #define LM3532_REG_ZN_3_LO 0x67 +#define LM3532_REG_ZONE_TRGT_A 0x70 +#define LM3532_REG_ZONE_TRGT_B 0x75 +#define LM3532_REG_ZONE_TRGT_C 0x7a #define LM3532_REG_MAX 0x7e -/* Contorl Enable */ +/* Control Enable */ #define LM3532_CTRL_A_ENABLE BIT(0) #define LM3532_CTRL_B_ENABLE BIT(1) #define LM3532_CTRL_C_ENABLE BIT(2) @@ -63,6 +66,8 @@ #define LM3532_ZONE_2 BIT(3) #define LM3532_ZONE_3 (BIT(2) | BIT(3)) #define LM3532_ZONE_4 BIT(4) +#define LM3532_BRT_CFG_MASK (LM3532_I2C_CTRL | LM3532_LINEAR_MAP | \ + LM3532_ZONE_MASK) #define LM3532_ENABLE_ALS BIT(3) #define LM3532_ALS_SEL_SHIFT 6 @@ -127,6 +132,7 @@ struct lm3532_led { int control_bank; int mode; int num_leds; + int ctrl_brt_pointer; u32 led_strings[LM3532_MAX_CONTROL_BANKS]; char label[LED_MAX_NAME_SIZE]; }; @@ -161,18 +167,18 @@ struct lm3532_data { }; static const struct reg_default lm3532_reg_defs[] = { - {LM3532_REG_OUTPUT_CFG, 0xe4}, + {LM3532_REG_OUTPUT_CFG, 0x24}, {LM3532_REG_STARTSHUT_RAMP, 0xc0}, {LM3532_REG_RT_RAMP, 0xc0}, {LM3532_REG_PWM_A_CFG, 0x82}, {LM3532_REG_PWM_B_CFG, 0x82}, {LM3532_REG_PWM_C_CFG, 0x82}, {LM3532_REG_ZONE_CFG_A, 0xf1}, - {LM3532_REG_CTRL_A_BRT, 0xf3}, + {LM3532_REG_CTRL_A_FS_CURR, 0x13}, {LM3532_REG_ZONE_CFG_B, 0xf1}, - {LM3532_REG_CTRL_B_BRT, 0xf3}, + {LM3532_REG_CTRL_B_FS_CURR, 0x13}, {LM3532_REG_ZONE_CFG_C, 0xf1}, - {LM3532_REG_CTRL_C_BRT, 0xf3}, + {LM3532_REG_CTRL_C_FS_CURR, 0x13}, {LM3532_REG_ENABLE, 0xf8}, {LM3532_ALS_CONFIG, 0x44}, {LM3532_REG_ZN_0_HI, 0x35}, @@ -302,7 +308,7 @@ static int lm3532_led_disable(struct lm3532_led *led_data) int ret; ret = regmap_update_bits(led_data->priv->regmap, LM3532_REG_ENABLE, - ctrl_en_val, ~ctrl_en_val); + ctrl_en_val, 0); if (ret) { dev_err(led_data->priv->dev, "Failed to set ctrl:%d\n", ret); return ret; @@ -321,7 +327,7 @@ static int lm3532_brightness_set(struct led_classdev *led_cdev, mutex_lock(&led->priv->lock); - if (led->mode == LM3532_BL_MODE_ALS) { + if (led->mode == LM3532_ALS_CTRL) { if (brt_val > LED_OFF) ret = lm3532_led_enable(led); else @@ -339,11 +345,9 @@ static int lm3532_brightness_set(struct led_classdev *led_cdev, if (ret) goto unlock; - brightness_reg = LM3532_REG_CTRL_A_BRT + led->control_bank * 2; - brt_val = brt_val / LM3532_BRT_VAL_ADJUST; - + brightness_reg = LM3532_REG_ZONE_TRGT_A + led->control_bank * 5 + + (led->ctrl_brt_pointer >> 2); ret = regmap_write(led->priv->regmap, brightness_reg, brt_val); - unlock: mutex_unlock(&led->priv->lock); return ret; @@ -356,8 +360,29 @@ static int lm3532_init_registers(struct lm3532_led *led) unsigned int output_cfg_val = 0; unsigned int output_cfg_shift = 0; unsigned int output_cfg_mask = 0; + int brightness_config_reg; + int brightness_config_val; int ret, i; + if (drvdata->enable_gpio) + gpiod_direction_output(drvdata->enable_gpio, 1); + + brightness_config_reg = LM3532_REG_ZONE_CFG_A + led->control_bank * 2; + /* This could be hard coded to the default value but the control + * brightness register may have changed during boot. + */ + ret = regmap_read(drvdata->regmap, brightness_config_reg, + &led->ctrl_brt_pointer); + if (ret) + return ret; + + led->ctrl_brt_pointer &= LM3532_ZONE_MASK; + brightness_config_val = led->ctrl_brt_pointer | led->mode; + ret = regmap_write(drvdata->regmap, brightness_config_reg, + brightness_config_val); + if (ret) + return ret; + for (i = 0; i < led->num_leds; i++) { output_cfg_shift = led->led_strings[i] * 2; output_cfg_val |= (led->control_bank << output_cfg_shift); @@ -382,7 +407,6 @@ static int lm3532_als_configure(struct lm3532_data *priv, struct lm3532_als_data *als = priv->als_data; u32 als_vmin, als_vmax, als_vstep; int zone_reg = LM3532_REG_ZN_0_HI; - int brightnes_config_reg; int ret; int i; @@ -411,14 +435,7 @@ static int lm3532_als_configure(struct lm3532_data *priv, als->config = (als->als_avrg_time | (LM3532_ENABLE_ALS) | (als->als_input_mode << LM3532_ALS_SEL_SHIFT)); - ret = regmap_write(priv->regmap, LM3532_ALS_CONFIG, als->config); - if (ret) - return ret; - - brightnes_config_reg = LM3532_REG_ZONE_CFG_A + led->control_bank * 2; - - return regmap_update_bits(priv->regmap, brightnes_config_reg, - LM3532_I2C_CTRL, LM3532_ALS_CTRL); + return regmap_write(priv->regmap, LM3532_ALS_CONFIG, als->config); } static int lm3532_parse_als(struct lm3532_data *priv) @@ -542,12 +559,14 @@ static int lm3532_parse_node(struct lm3532_data *priv) } if (led->mode == LM3532_BL_MODE_ALS) { + led->mode = LM3532_ALS_CTRL; ret = lm3532_parse_als(priv); if (ret) dev_err(&priv->client->dev, "Failed to parse als\n"); else lm3532_als_configure(priv, led); - } + } else + led->mode = LM3532_I2C_CTRL; led->num_leds = fwnode_property_count_u32(child, "led-sources"); if (led->num_leds > LM3532_MAX_LED_STRINGS) { @@ -587,7 +606,13 @@ static int lm3532_parse_node(struct lm3532_data *priv) goto child_out; } - lm3532_init_registers(led); + ret = lm3532_init_registers(led); + if (ret) { + dev_err(&priv->client->dev, "register init err: %d\n", + ret); + fwnode_handle_put(child); + goto child_out; + } i++; } @@ -634,9 +659,6 @@ static int lm3532_probe(struct i2c_client *client, return ret; } - if (drvdata->enable_gpio) - gpiod_direction_output(drvdata->enable_gpio, 1); - return ret; } From patchwork Thu Aug 1 15:14:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 170388 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5580236ile; Thu, 1 Aug 2019 08:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqztHZmsxJ6I/jk+BphjzVRiCOoPMz2MVRr4kuG8EdxHOOapBEIyiuE8+ll21EsSSFAmp88B X-Received: by 2002:a17:90a:bb01:: with SMTP id u1mr9066540pjr.92.1564672472648; Thu, 01 Aug 2019 08:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564672472; cv=none; d=google.com; s=arc-20160816; b=JOI08du5RqC4w7I7Ts7pXzAFPS00cggNWFcBRaEHKed5U4wQ4bAO+DwIVhikTS6ZgB avF7+bHNH4RV0TmJU5/UcGkBOz4j+KmuyTAJVoIbzUpFxoyXw20EqCQC87sorEyI8yO3 eaHU4PqA8qHxtZWKiNW+gkzvtugo/FqkFivOQ8TRTil5UIZ7DINopaL4a66w3JBKeWN0 WoTHKU/GFzTja275mxHQwKnEJND9Rds9xXZC8LxN0Fhbpl+zJO0e2rJjNg6Gi579CXem y6CRROcmLX5y/+IBLkmlARSiIB7zAn12de6UOMLoFQiRKj6fwC1syYP5u++togr3H1G9 izZw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vT9TTA9+yJvY9rAaobu7P0YUoXflgY+8195JQIElkeU=; b=E/LZPpZbzLnRm7kI+K3H7fAMey8KnYQFsUnB+MOGcXusboAq27yKr2fYHiOqU/vyAf L1VlQqyttN9SAfAw3emtvtMXhG1KJauDy7pr9jZDcw40KyVhDTSgvP6OIqomC3aOcGwI +Y4tG+RQ94jknyytncJGHBvDpVMpI7VM1/NWRf4x18vFmOu36Gl35sSxc/bCxBQXGewm GMfNvQxdzxMdIrYVMtc0A4YtyACmBwYP/wKNv37SkJV9ebmS/2XW4fpmBXLa8qP1//D/ TKltozOqGHRQgbscVUmiVofALYdSy8Eqiv0xC/dtJiAy1b9RfRBW0rnYY7Nwl1D300Jp C0fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=M3Rtfh41; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e18si12585502pgv.139.2019.08.01.08.14.32; Thu, 01 Aug 2019 08:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=M3Rtfh41; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732401AbfHAPOc (ORCPT + 1 other); Thu, 1 Aug 2019 11:14:32 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:33780 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727853AbfHAPOc (ORCPT ); Thu, 1 Aug 2019 11:14:32 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x71FENOn066123; Thu, 1 Aug 2019 10:14:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1564672463; bh=vT9TTA9+yJvY9rAaobu7P0YUoXflgY+8195JQIElkeU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=M3Rtfh41Py3G8PEm5bW+uyZWynRjC+FZyqNipU9MJlkycXPkxZP8xuXyw4b4gUztu J362/+p+7VkRdMeT1JXuCvyibQu3tkXPrDirP6dgG2KMY0GbgpS4NrAOrCO6q8kZwr +/FCW1w2VO6HpycPZQhuYiZIpNS1KGEldkPMmNOg= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x71FEN01121654 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 1 Aug 2019 10:14:23 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 1 Aug 2019 10:14:22 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 1 Aug 2019 10:14:22 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x71FEMNL089261; Thu, 1 Aug 2019 10:14:22 -0500 From: Dan Murphy To: , , , , , , CC: , , Dan Murphy Subject: [PATCH 2/3] dt: lm3532: Add property for full scale current. Date: Thu, 1 Aug 2019 10:14:20 -0500 Message-ID: <20190801151421.21486-2-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190801151421.21486-1-dmurphy@ti.com> References: <20190801151421.21486-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add a property for each control bank to configure the full scale current setting for the device. Signed-off-by: Dan Murphy --- Documentation/devicetree/bindings/leds/leds-lm3532.txt | 4 ++++ 1 file changed, 4 insertions(+) -- 2.22.0.214.g8dca754b1e diff --git a/Documentation/devicetree/bindings/leds/leds-lm3532.txt b/Documentation/devicetree/bindings/leds/leds-lm3532.txt index c087f85ddddc..d3498dd24e8e 100644 --- a/Documentation/devicetree/bindings/leds/leds-lm3532.txt +++ b/Documentation/devicetree/bindings/leds/leds-lm3532.txt @@ -62,6 +62,9 @@ Optional LED child properties: - label : see Documentation/devicetree/bindings/leds/common.txt - linux,default-trigger : see Documentation/devicetree/bindings/leds/common.txt + - ti,fs-current : Defines the full scale current value for each control + bank. The range is from 5000uA-29800uA in increments + of 800uA. Example: led-controller@38 { @@ -85,6 +88,7 @@ led-controller@38 { reg = <0>; led-sources = <2>; ti,led-mode = <1>; + ti,fs-current = <21800>; label = ":backlight"; linux,default-trigger = "backlight"; };