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) {