From patchwork Fri Apr 5 14:55:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 161873 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp534280jan; Fri, 5 Apr 2019 07:55:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxm/ROa6ZCWQF2vsZnslMYnj9V3kSm5VA1BXyrC51ybPDtKWtlHe1VqJiTxzlZDRT8FsyPO X-Received: by 2002:a63:750c:: with SMTP id q12mr12712332pgc.133.1554476157683; Fri, 05 Apr 2019 07:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554476157; cv=none; d=google.com; s=arc-20160816; b=eqY0wywSfPj07vQDp8TI3uOWOIXlK6aHUqtRn+qF/3LQ1HBlVqUtD1in4FLt1p1nts 7hxd3jkI9x0wRyc7Fm5qqAszcVDp/WJX0QzGJQTOyIbwvZCcdbxZogw65gRc6bDWnpk0 2y6TVU1wq6E2IFe6bBEKYShxuFfhKANhoLQCqZZBKW9x0ypoyudk0Pe4P3BX38qyM6iM gAN20yr+jHoUksJBVnFUAk1faE4Dy6Hs1RERl+WAPHVP5990n9RwXbMZmn6ypmpiJtsK +GZsoAzFJ1uEp10/Zsud7PF+DZaZe+Hn3ZyU1Zorhxx31pHXCVjd9XvWYJg1QKmliR7Z xfhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ItvDRxAUYHh6bz/Aku8FuvIslGTYPtRT1G96x9ZVQbM=; b=tIW+DNwBw0mslQKVFmjU5zpNVaQGJeGn519DZWG4pw/k0qolc42CmTDZdDdHkeO6F0 OIIcRlRJRDzOz5cDmyfVRex7c2Sx45jQ6o+qmHs7hQcrLMjgSoShxflJH99irDQFxAZU qCMmsDyuT5IvFkp3u+0yH6GNYNqsp5dr1FV8r6WjjWLyNpoEKJChOQPL8orTrQOYwVp6 P4kmVL99PmsDE/FLY7ewTU4WBSjEoFhJs0TgBFyoDHeODfgcuTkYpy+lByOGSKABfNI6 jU1UJ707o3E1NtUqjk2OBPwoTrVWxy/4M5j92j8vFooD4aeQ7RBNV/9cIkDOpo3Jt6qd BmKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UZi3WtIX; 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 k1si12437083pgq.219.2019.04.05.07.55.57; Fri, 05 Apr 2019 07:55:57 -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=UZi3WtIX; 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 S1731316AbfDEOz5 (ORCPT + 1 other); Fri, 5 Apr 2019 10:55:57 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:33310 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730329AbfDEOz5 (ORCPT ); Fri, 5 Apr 2019 10:55:57 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x35EtqJ6105045; Fri, 5 Apr 2019 09:55:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554476152; bh=ItvDRxAUYHh6bz/Aku8FuvIslGTYPtRT1G96x9ZVQbM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UZi3WtIXHpAELAaSH6O+VekFAnKhs4kAa24vZ1jfsAxhb342LHw9pVpuWZcMe4jzo XXR46S+3Uub0Xnrqn8u5tbUOOtzh3DlWzIDpgHvvocOO+PGwl3tlKEttdwA08saVD3 UIoFPW6Jy4cdDn4hD1YnEW90oFsYPTLgQ2v0s8E0= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x35EtqnV121231 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 5 Apr 2019 09:55:52 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 5 Apr 2019 09:55:51 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE115.ent.ti.com (10.64.6.36) 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; Fri, 5 Apr 2019 09:55:51 -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 x35EtptI088082; Fri, 5 Apr 2019 09:55:51 -0500 From: Dan Murphy To: , , , CC: , , , Dan Murphy Subject: [PATCH 1/6] regulator: lm363x: Make the gpio register enable flexible Date: Fri, 5 Apr 2019 09:55:35 -0500 Message-ID: <20190405145540.27703-2-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20190405145540.27703-1-dmurphy@ti.com> References: <20190405145540.27703-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.19.0 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) {