From patchwork Wed May 22 19:27:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 164888 Delivered-To: patch@linaro.org Received: by 2002:ac9:2a84:0:0:0:0:0 with SMTP id p4csp1206912oca; Wed, 22 May 2019 12:46:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9NOsVPmrhUwIuByI2j/ZzXRKsIoC/qLFKrF7d2KRLzn02S7AzxxQlQG+7DPEbATxnqO9+ X-Received: by 2002:a63:225b:: with SMTP id t27mr5480955pgm.25.1558554364929; Wed, 22 May 2019 12:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558554364; cv=none; d=google.com; s=arc-20160816; b=qdPxrYwpWNKVmrFGnMEo757ZQA53Uf8LY7WbwxyWMZtdRZoR/BSbvAZ5j1QSgnT1MT s5zkwgM6CH4FbAzn6+v0O3JAgLphdebJCPRG5m+TDTjhvStrOwvrjx+Vt3yw0StiOMxR Y/n7ih8jNFIzx1YlYcmN7GnVOtagBw9oZDHESMrs+uibGCkQpqMAOR8bpBKE4n/TjzjJ JCnLGsj9VXVdtPapA/Mu9mlvbS1JhpIw9Ae/2dcjnRKt8IuHVFIkuj99NKecofKz9gdO jemdWcNwhwA9lJq4FEoFogVku3evyxd4bG5yFxDMvxPjsy9sxMflRjFNvsr1UG6aT+kp fWhQ== 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=LjSX35Zd9AAVl0gh4n5sT6SVSu9q2cBivqmA5diC3lY=; b=Wx4+jBX1GUzPzzYRAFZcpw6EDPVrZgbOZRrpOhumilcVy/h1WZ+xxQ3BVKKEI+wjw7 Ka3hlERqF7KJW1/Mnh5AvlGcn6sc1JWtZp+sMfr7Q7wgaH7tsxw+9ZSlthcHePoupmYk R57Oy84MjTGZMauN5UJkrZ31Lv4jTpmDRrzyOzIc7/7xOtW3MXzGW+H0qdZCnbJG3Hn9 3BSraB35fszioJqyae35ldr09e9eD10T/bDKVG76L06mUYfjJyjSbrUHsfWbk3Wfe5T8 urOKU/B6ci1/8xFKIE399FkjX/CAl8xy12q+ghMMa0R6zyOvJgEd6CXBMSEQtRKsE86u 6mmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IDPA+9a+; 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 a15si29424886pfa.85.2019.05.22.12.46.04; Wed, 22 May 2019 12:46:04 -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=IDPA+9a+; 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 S2387543AbfEVTqE (ORCPT + 1 other); Wed, 22 May 2019 15:46:04 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:36708 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732406AbfEVT1v (ORCPT ); Wed, 22 May 2019 15:27:51 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4MJRjYE117819; Wed, 22 May 2019 14:27:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1558553265; bh=LjSX35Zd9AAVl0gh4n5sT6SVSu9q2cBivqmA5diC3lY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IDPA+9a+FSnphel0B7xSOm2LJZ/UEmME3iciTCPvFc7vRF/aC7vqc6pPbn3BopcGN 5UzaTpZd7uM2qfwcnmkF7E+JWVAIBV8vGFEjPsb6TTeSYc+DHZt8Z02x0vigSjuDaE AsA0ct6d8W3BHcqKDzfbBev2izOwO1MTdXQSSj80= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4MJRjMS031997 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 May 2019 14:27:45 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 22 May 2019 14:27:45 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) 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; Wed, 22 May 2019 14:27:45 -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 x4MJRjJO081593; Wed, 22 May 2019 14:27:45 -0500 From: Dan Murphy To: , , , CC: , , , Dan Murphy Subject: [RESEND PATCH v4 1/6] regulator: lm363x: Make the gpio register enable flexible Date: Wed, 22 May 2019 14:27:28 -0500 Message-ID: <20190522192733.13422-2-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190522192733.13422-1-dmurphy@ti.com> References: <20190522192733.13422-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 The use of and enablement of the GPIO can be used across devices. Use the enable_reg in the regulator descriptor for the register to write. Signed-off-by: Dan Murphy --- drivers/regulator/lm363x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.21.0.5.gaeb582a983 Acked-by: Pavel Machek diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index c876e161052a..382b1cecdd93 100644 --- a/drivers/regulator/lm363x-regulator.c +++ b/drivers/regulator/lm363x-regulator.c @@ -263,8 +263,8 @@ static int lm363x_regulator_probe(struct platform_device *pdev) if (gpiod) { cfg.ena_gpiod = gpiod; - - ret = regmap_update_bits(regmap, LM3632_REG_BIAS_CONFIG, + ret = regmap_update_bits(regmap, + lm363x_regulator_desc[id].enable_reg, LM3632_EXT_EN_MASK, LM3632_EXT_EN_MASK); if (ret) { From patchwork Wed May 22 19:27:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 164883 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1253368ili; Wed, 22 May 2019 12:27:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/h0iKQC5jyLLqo1xYEr/4BAZ7CUbf7+RlwD+mJjwq3EHA0sI7nK3Urxw3PlH1+6RY4bAk X-Received: by 2002:a63:2b92:: with SMTP id r140mr4548399pgr.363.1558553275336; Wed, 22 May 2019 12:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558553275; cv=none; d=google.com; s=arc-20160816; b=Rcl/HXXsMpALgn63o1RIkDxfs0URRpwGWnR29zQ5pwKVbTheNk/zrjxfWnNpi4Nu+X N14Vj+9qkF3/YL9lkVe38cu0md2ne9QfvuaTbzxq7mVQVgfAUJpwf+q6hdetrr8upSqm qLvd16rGF1GbZVvpQBPi15drUbFZC0TcBNyzsVjCVyEb+CrLCtqzSaSW0zwBBESvUOHP OMlUdAyWCWnrEBPkWKAiJlilNp4KhdRzfbmsp52YzI9mJeqTqDJCpaL076HNNHfPNC7N AVj5zCSp2NwpjmFCk6oRM8wBncO0+y5eCeMJy6bLwYGD+5IXcW5ObwlJQ+PTzhd89AWj QLmg== 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=itExORL3KdLT3HQGYDuVv7awOOxxOEGDK+mdWtGGt8g=; b=gtHy515J0S31ibBBFJN5SH9KBHKlqKRG0Gj/HV5wYC7t7sD3a2msPNEHHiuNVNseif R2NfDjVT2sv9K3dnpFfZGR1RJ/UtDMquaUWseSJLpZDxFs/GpG6L9BoQynFQ+psh/h7d XwxEq+0O+Yhk86ZuJuZS4MJZlD9vwJPzDv+ehuvvZaSr07s7HYydVSVViSiMJUnSnl7A F38y3ptoejre8xWBdoVphv9xiGno21zJCRiKMlOYEQawJcpBu7WdalxcSWTyy9kSKcnu bbTo0kRrefvpKJ5g+6YSjbNnsNhjPEynTHH885dbg+ha+1i/QgCUaScKsMxrs5PInyB/ dbvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="A+/dnBdX"; 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 p24si371044plr.269.2019.05.22.12.27.55; Wed, 22 May 2019 12:27:55 -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="A+/dnBdX"; 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 S1731429AbfEVT1x (ORCPT + 1 other); Wed, 22 May 2019 15:27:53 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:41340 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731387AbfEVT1w (ORCPT ); Wed, 22 May 2019 15:27:52 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4MJRkxb016907; Wed, 22 May 2019 14:27:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1558553266; bh=itExORL3KdLT3HQGYDuVv7awOOxxOEGDK+mdWtGGt8g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=A+/dnBdXikfvNMSE4qlFprTFq9k/4DOWQwNTvLSEcSQaFH7NO4+lMSgG1p/NrnXfb XBMExeCbtNqe0+NQZVztFJlqD/pntCx5m9cplu04h5rPeGrKv3JhTNSNN5mM6r5i5+ diMFASqzmeU5N4zzOhWUKjRBIms04VocZ4s5HO1A= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4MJRkgp010662 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 May 2019 14:27:46 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 22 May 2019 14:27:45 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE108.ent.ti.com (157.170.170.38) 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; Wed, 22 May 2019 14:27:45 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x4MJRj89101064; Wed, 22 May 2019 14:27:45 -0500 From: Dan Murphy To: , , , CC: , , , Dan Murphy Subject: [RESEND PATCH v4 4/6] regulator: lm363x: Add support for LM36274 Date: Wed, 22 May 2019 14:27:31 -0500 Message-ID: <20190522192733.13422-5-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190522192733.13422-1-dmurphy@ti.com> References: <20190522192733.13422-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 Adding regulator support for the LM36274 backlight driver. This device can leverage this existing code as the functionality and registers are common enough between the LM36274 and the LM363x series of devices. Signed-off-by: Dan Murphy --- drivers/regulator/Kconfig | 2 +- drivers/regulator/lm363x-regulator.c | 52 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) -- 2.21.0.5.gaeb582a983 Acked-by: Pavel Machek Acked-by: Mark Brown diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index b7f249ee5e68..23252ae81fdf 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -362,7 +362,7 @@ config REGULATOR_LM363X tristate "TI LM363X voltage regulators" depends on MFD_TI_LMU help - This driver supports LM3631 and LM3632 voltage regulators for + This driver supports LM3631, LM3632 and LM36274 voltage regulators for the LCD bias. One boost output voltage is configurable and always on. Other LDOs are used for the display module. diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index 382b1cecdd93..1944677b1448 100644 --- a/drivers/regulator/lm363x-regulator.c +++ b/drivers/regulator/lm363x-regulator.c @@ -37,6 +37,11 @@ #define LM3632_VBOOST_MIN 4500000 #define LM3632_VLDO_MIN 4000000 +/* LM36274 */ +#define LM36274_BOOST_VSEL_MAX 0x3f +#define LM36274_LDO_VSEL_MAX 0x34 +#define LM36274_VOLTAGE_MIN 4000000 + /* Common */ #define LM363X_STEP_50mV 50000 #define LM363X_STEP_500mV 500000 @@ -217,6 +222,51 @@ static const struct regulator_desc lm363x_regulator_desc[] = { .enable_reg = LM3632_REG_BIAS_CONFIG, .enable_mask = LM3632_EN_VNEG_MASK, }, + + /* LM36274 */ + { + .name = "vboost", + .of_match = "vboost", + .id = LM36274_BOOST, + .ops = &lm363x_boost_voltage_table_ops, + .n_voltages = LM36274_BOOST_VSEL_MAX, + .min_uV = LM36274_VOLTAGE_MIN, + .uV_step = LM363X_STEP_50mV, + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .vsel_reg = LM36274_REG_VOUT_BOOST, + .vsel_mask = LM36274_VOUT_MASK, + }, + { + .name = "ldo_vpos", + .of_match = "vpos", + .id = LM36274_LDO_POS, + .ops = &lm363x_regulator_voltage_table_ops, + .n_voltages = LM36274_LDO_VSEL_MAX, + .min_uV = LM36274_VOLTAGE_MIN, + .uV_step = LM363X_STEP_50mV, + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .vsel_reg = LM36274_REG_VOUT_POS, + .vsel_mask = LM36274_VOUT_MASK, + .enable_reg = LM36274_REG_BIAS_CONFIG_1, + .enable_mask = LM36274_EN_VPOS_MASK, + }, + { + .name = "ldo_vneg", + .of_match = "vneg", + .id = LM36274_LDO_NEG, + .ops = &lm363x_regulator_voltage_table_ops, + .n_voltages = LM36274_LDO_VSEL_MAX, + .min_uV = LM36274_VOLTAGE_MIN, + .uV_step = LM363X_STEP_50mV, + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .vsel_reg = LM36274_REG_VOUT_NEG, + .vsel_mask = LM36274_VOUT_MASK, + .enable_reg = LM36274_REG_BIAS_CONFIG_1, + .enable_mask = LM36274_EN_VNEG_MASK, + }, }; static struct gpio_desc *lm363x_regulator_of_get_enable_gpio(struct device *dev, int id) @@ -229,9 +279,11 @@ static struct gpio_desc *lm363x_regulator_of_get_enable_gpio(struct device *dev, */ switch (id) { case LM3632_LDO_POS: + case LM36274_LDO_POS: return gpiod_get_index_optional(dev, "enable", 0, GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE); case LM3632_LDO_NEG: + case LM36274_LDO_NEG: return gpiod_get_index_optional(dev, "enable", 1, GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE); default: From patchwork Wed May 22 19:27:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 164889 Delivered-To: patch@linaro.org Received: by 2002:ac9:2a84:0:0:0:0:0 with SMTP id p4csp1206916oca; Wed, 22 May 2019 12:46:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9H36hT6DYhkXIii0UNyE60Fg/HyNYggM1CFmOT9G/nQ8tnWR5Z9m7dzHJBtuB2L4piYOD X-Received: by 2002:a17:902:29e6:: with SMTP id h93mr67593171plb.111.1558554365143; Wed, 22 May 2019 12:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558554365; cv=none; d=google.com; s=arc-20160816; b=xDL/zK7tyjKcjdz69NnMlZzgvhxLDNJKUlOv4VeEvS7XY2w94JUjZ3Vva1Sm3NpCJU NslJRTwLnSnX1WwC+sZhXhBQhb/KgsDcyFX8yVKOTLmj4eLu22UmGQ7MqvVheSuRWNWr s3Jn9iAOvVhXtPvgmYc0h4y1uxSBKzRW1GIKVic8FN8Fhzuxwy7lm3md7aqsLs2F6jlC 8DHzVfzuAttJGEQ/wpxBzN3k79mnM64iJTFrCCl3S1wYSRfjJn/SrtgZE/uiV8AqBnKO vDElBxuokwMjuLX/pR+C7L7WxQXQY6lnfQ3Y+7he2w/ThpcwoQESgct2IUhPiqySgbr3 IfTA== 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=DRVV299Ci0j5Cexq/cMMqdAHfnEZfgwA2Ei4XT3yojQ=; b=zQ2V1cG87OGFBebHC+26c7s9a9Jfpl0TJ1qoEQby5o3ZJ0k8/xh7AVjPhOlP2hzSdL SG2jOcSuXDd7/QBeDsfz1WqFLv7SG5RlkjOYLT5lDCevtqseP9sr1nds4VC33eN/sbM4 YgOB/4PrHkP8R58KqihLCwGvDF7KKVoi09xIuipjA6VFrIVitM93PVHuEy5oAVLWoRxs zN06bxzcN5VHhqcT1lNW5DCBh6Lx75iMXgsx+NhOVzxupiPP3Fv3olITo9GmooTa9hux 2cFXDOmKHK1ApqygnpbATdusopu/t5aj/v1gTJxwJDtB4YMnVupg7P/BiOPs+n+HTDLy JLrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GEjctaRy; 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 a15si29424886pfa.85.2019.05.22.12.46.05; Wed, 22 May 2019 12:46:05 -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=GEjctaRy; 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 S2387690AbfEVTqE (ORCPT + 1 other); Wed, 22 May 2019 15:46:04 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50656 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732410AbfEVT1v (ORCPT ); Wed, 22 May 2019 15:27:51 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4MJRkhR079742; Wed, 22 May 2019 14:27:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1558553266; bh=DRVV299Ci0j5Cexq/cMMqdAHfnEZfgwA2Ei4XT3yojQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GEjctaRyWoZOCQ7b7QHrQeDHev9z7Rf/i8aAZMlkqNSdxABMMKfX/NP3qlU5VDUcN vTNuAeeTRpQf3TBCgkJR7+rfXml6xS8sysxr0xjkSuMmgeuAFoOaydKZ+IkwJknzcn qyWSrDv2hUV6J0i/tni5eo+7o7qn+Qjr+vhMKJxo= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4MJRklT130161 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 May 2019 14:27:46 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 22 May 2019 14:27:46 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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; Wed, 22 May 2019 14:27:46 -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 x4MJRj0g033003; Wed, 22 May 2019 14:27:45 -0500 From: Dan Murphy To: , , , CC: , , , Dan Murphy , Rob Herring Subject: [RESEND PATCH v4 5/6] dt-bindings: leds: Add LED bindings for the LM36274 Date: Wed, 22 May 2019 14:27:32 -0500 Message-ID: <20190522192733.13422-6-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190522192733.13422-1-dmurphy@ti.com> References: <20190522192733.13422-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 the LM36274 LED specific bindings. Reviewed-by: Rob Herring Signed-off-by: Dan Murphy --- .../devicetree/bindings/leds/leds-lm36274.txt | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lm36274.txt -- 2.21.0.5.gaeb582a983 Acked-by: Pavel Machek diff --git a/Documentation/devicetree/bindings/leds/leds-lm36274.txt b/Documentation/devicetree/bindings/leds/leds-lm36274.txt new file mode 100644 index 000000000000..329393700191 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-lm36274.txt @@ -0,0 +1,82 @@ +* Texas Instruments LM36274 4-Channel LCD Backlight Driver w/Integrated Bias + +The LM36274 is an integrated four-channel WLED driver and LCD bias supply. +The backlight boost provides the power to bias four parallel LED strings with +up to 29V total output voltage. The 11-bit LED current is programmable via +the I2C bus and/or controlled via a logic level PWM input from 60 μA to 30 mA. + +Parent device properties are documented in ../mfd/ti_lmu.txt +Regulator properties are documented in ../regulator/lm363x-regulator.txt + +Required backlight properties: + - compatible: + "ti,lm36274-backlight" + - reg : 0 + - #address-cells : 1 + - #size-cells : 0 + - led-sources : Indicates which LED strings will be enabled. + Values from 0-3, sources is 0 based so strings will be + source value + 1. + +Optional backlight properties: + - label : see Documentation/devicetree/bindings/leds/common.txt + - linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt + +Example: + +HVLED string 1 and 3 are controlled by control bank A and HVLED 2 string is +controlled by control bank B. + +lm36274@11 { + compatible = "ti,lm36274"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x11>; + + enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; + + regulators { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lm363x-regulator"; + + enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>, + <&pioC 1 GPIO_ACTIVE_HIGH>; + + vboost { + regulator-name = "lcd_boost"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <7150000>; + regulator-always-on; + }; + + vpos { + regulator-name = "lcd_vpos"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6500000>; + }; + + vneg { + regulator-name = "lcd_vneg"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6500000>; + }; + }; + + backlight { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,lm36274-backlight"; + + led@0 { + reg = <0>; + led-sources = <0 2>; + label = "white:backlight_cluster"; + linux,default-trigger = "backlight"; + }; + }; +}; + +For more product information please see the link below: +http://www.ti.com/lit/ds/symlink/lm36274.pdf