From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02CF8C004C9 for ; Tue, 7 May 2019 20:12:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB17F20675 for ; Tue, 7 May 2019 20:12:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="UNAxWNf6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727161AbfEGUMN (ORCPT ); Tue, 7 May 2019 16:12:13 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:51582 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbfEGUMM (ORCPT ); Tue, 7 May 2019 16:12:12 -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 x47KBrod027910; Tue, 7 May 2019 15:11:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1557259913; bh=LjSX35Zd9AAVl0gh4n5sT6SVSu9q2cBivqmA5diC3lY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UNAxWNf66CSP/KYNQPq7DISHIJU7g7XR7BuzW3HltlV8ed+rDJTWQvP32LncWup5h p5sBHs17S8xJ8E9YSOdwJELy1f2WSuiNccb8J/l/Je4G0pycPLK7MxbIYArQ1Fo76x ww6KC8YMGI4nzyp9hZS9din79DViLRa5ITVrFNrE= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x47KBrJP102925 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 May 2019 15:11:53 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) 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; Tue, 7 May 2019 15:11:53 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE101.ent.ti.com (157.170.170.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; Tue, 7 May 2019 15:11:53 -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 x47KBrhi013903; Tue, 7 May 2019 15:11:53 -0500 From: Dan Murphy To: , CC: , , , , Dan Murphy Subject: [PATCH v4 1/6] regulator: lm363x: Make the gpio register enable flexible Date: Tue, 7 May 2019 15:11:54 -0500 Message-ID: <20190507201159.13940-2-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190507201159.13940-1-dmurphy@ti.com> References: <20190507201159.13940-1-dmurphy@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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) { -- 2.21.0.5.gaeb582a983