From patchwork Tue Jun 4 17:43:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 165802 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp6159923ili; Tue, 4 Jun 2019 10:43:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxICwamqAQCkgKuZRDCu+t6t0cOo2L64bgCkHRwBzaWstjdubVaUDzaZ3AjJuItbukI2yFV X-Received: by 2002:a17:90a:a00b:: with SMTP id q11mr38757149pjp.108.1559670234646; Tue, 04 Jun 2019 10:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559670234; cv=none; d=google.com; s=arc-20160816; b=WDUJaleTk4QlyXjf/6L3tbhIwJExmn2lvIChoOzLTndtkywLTGa8+dYKxNwS8yASkD 1TocOG43VlPWDXYrVo36n/bFq1bjj10h9TY9hQXTPYCl46yQKOi1A2A4JNzW+tbiQNrN sRVj+ZUGyZihPSoZtaVNd1FxToqs1vGMWwrl6PA8Y5viSkJTjODqrheBT0v01vNMD4By PwhwBjHwxGyWKQsqujN+W/YOtEUq7xHwKl9ccIxURIyh9dxu3QQay6y/+0gZmq0mQyd1 mua7W3d0Ayv1Qi0jclFw/pc7wU2hKPDaDhls7BTpy613rYcMQGJdPW8th73dM6lAONcb ANtQ== 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=NMQ81banQ+yLIzO7vLSBo9E1X//dRsl0FgC88w6UiEo=; b=Fs8sHq9WsORk4GPYh3aDzknHggiubiwbVT+/P53NS1zh3BLlTqj7oypYp5czozQWz9 syY99NJgfYrKacyTAmwcOVJVlXElRu1HMKb0n7HKk0tXh3nDNHTVGAFYxNRIkoW9fLvL NA6w1mgIsdM8XcSRK02SY/9CwrSFncl3wWCumju/FAAliB+hD+ghE7EUsppqEOGrJDfQ WYMNQFIho1YBrHZ5z/GMnEy23MpIXYOJEC7iPbDWIaqQqmAWOl4n8t6MjNf76s+B5RxN aOqtVQbDPgBnxd7CfEckx3NHMiu5fRoGwAokN8R5AL6YfFkVhvW1O5zMtPRxK6k0FqBV zZQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PxtExU0i; 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 q8si1045744pfc.155.2019.06.04.10.43.54; Tue, 04 Jun 2019 10:43:54 -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=PxtExU0i; 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 S1726502AbfFDRny (ORCPT + 1 other); Tue, 4 Jun 2019 13:43:54 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:57096 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726416AbfFDRny (ORCPT ); Tue, 4 Jun 2019 13:43:54 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x54HhmQB093923; Tue, 4 Jun 2019 12:43:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559670228; bh=NMQ81banQ+yLIzO7vLSBo9E1X//dRsl0FgC88w6UiEo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=PxtExU0i2Oxb8BBWlShtkFgo7Mcsn2W4c8Bs6zdHph5MjZh2KYRvNSxOvhHGKNOpR ck9/AwcPMyNsM8wEnDBW0aWyjhGhVkH0ddnIyLUN52NIictzNSpfTT4ksJKLSSYg7s ApTmSOPWgQhAGShINjZBTtUroEzJDA7Tgj1rop8E= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x54HhmEf057662 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Jun 2019 12:43:48 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) 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; Tue, 4 Jun 2019 12:43:48 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE106.ent.ti.com (10.64.6.27) 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, 4 Jun 2019 12:43:47 -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 x54Hhl75123657; Tue, 4 Jun 2019 12:43:47 -0500 From: Dan Murphy To: , , , CC: , , , Dan Murphy Subject: [PATCH v5 1/6] regulator: lm363x: Make the gpio register enable flexible Date: Tue, 4 Jun 2019 12:43:40 -0500 Message-ID: <20190604174345.14841-2-dmurphy@ti.com> X-Mailer: git-send-email 2.21.0.5.gaeb582a983 In-Reply-To: <20190604174345.14841-1-dmurphy@ti.com> References: <20190604174345.14841-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 Signed-off-by: Jacek Anaszewski --- v5 - No changes to the patch changes requested in this patch were done in patch 4 of this series - https://lore.kernel.org/patchwork/patch/1077408/ drivers/regulator/lm363x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.21.0.5.gaeb582a983 diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index e02fdd1dd092..1b5d7d2f26b8 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) {