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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,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 EB132C10F11 for ; Wed, 10 Apr 2019 13:38:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B809D20820 for ; Wed, 10 Apr 2019 13:38:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="mmTEbVJp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732632AbfDJNiw (ORCPT ); Wed, 10 Apr 2019 09:38:52 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:41824 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731712AbfDJNiq (ORCPT ); Wed, 10 Apr 2019 09:38:46 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3ADcYRG114409; Wed, 10 Apr 2019 08:38:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554903514; bh=xjr4IevYY44RIcephyTZKOHcl3H52uyijiHxVHQ5f3I=; h=From:To:CC:Subject:Date; b=mmTEbVJpoz+G3JOZgKTAMIs+M0REocPZifCLn75XVVJpaEBIrdXsCa9MEhcOKdV4H OfwYJH5VioqPqJriCQgdB4wYFpt9UNWEzl7Ji6R/37Sg+r3+jAZeBz379ACjYW8Nu1 rP2YQ9y1OObBFDsxdFAVW733y1iX6n2SE9n81N70= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3ADcY45009206 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Apr 2019 08:38:34 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) 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; Wed, 10 Apr 2019 08:38:34 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE107.ent.ti.com (10.64.6.28) 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, 10 Apr 2019 08:38:34 -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 x3ADcYiY123736; Wed, 10 Apr 2019 08:38:34 -0500 From: Dan Murphy To: , , , , , CC: , , , Dan Murphy Subject: [PATCH v2 1/6] regulator: lm363x: Make the gpio register enable flexible Date: Wed, 10 Apr 2019 08:38:28 -0500 Message-ID: <20190410133833.28859-1-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 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 --- v2 - No changes - https://lore.kernel.org/patchwork/patch/1058777/ 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