Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp297093pxt; Fri, 6 Aug 2021 02:12:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeCD5uBub3rO/+beG9n/ScrQ7vhoG/vIwax0jX/p7eWlpCf0A+u/WDka6uosdEDrNjgkGe X-Received: by 2002:a05:6602:2199:: with SMTP id b25mr677682iob.75.1628241170495; Fri, 06 Aug 2021 02:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628241170; cv=none; d=google.com; s=arc-20160816; b=AH55IX/id/7G0k+fOmlkiZ5N1r8sVgkmlZDgSVIKfplPJWzMqlqonDdpmHsuAGLsR9 CKP3ox34qzrRQm0fADEdLWEO1ZcmK5mnqK/Eu+rQFEV8H0YR6NplsyNWHUa0P0O+wqKP s7S//CHszpqIoc6qX5j1Ai5hlxIMPjIEnT52oxRJNdUA0EEtQvRLgn7sZvI+Y8RBiK1N bHCZIDwpE6JCEwkRGyyiACkOztpGYY1Qfwzbz+ZLhBReEg6zY5x9mlARF2i7LAOMP69c CydD9vc5bPrwbxdxcLqU9/M1phxDRX/+qFyx31Duu/nU7yLCVK9GloQ74nOHSdJ9H4XE 6qbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=tmsLsa/eRaufFJ8jRKvAmHCUqfWGYVXTYZw+tCYDWos=; b=psnHRqOAt1lA2CPP2oA/5bQ4xNmj9OukvnyeJ2+RItfC4cW+B3ERKs0ud8flDCl9WC QgYyCoqqK32yZqTa2R0Uc5P31tjKqTMrLlVW9KOplW/et9/DgJQfdLOuolTTRpWaXJRR pUe/7uvneoMEsZLduuOvLMmUAfIWaUhrVpw4F2HtReOlz5R7KyC1z9wAYXWEQGHUUMBr U2Y/S5kySCaVht/p4iqTifySqwzhlGTJlU1R4OIJD6XtrE599+s+9cwrzYqCVSalkztf YIdzuOsYYSClwSYfhp/whls/rRsOTcCFb6EfQf/BCTD1EYiBj6Kb3+JheHrPB/4ETLwo pUAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm1 header.b=IFPrClOm; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=jZdDI3k8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k40si8360472jav.47.2021.08.06.02.12.38; Fri, 06 Aug 2021 02:12:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm1 header.b=IFPrClOm; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=jZdDI3k8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244232AbhHFJLw (ORCPT + 99 others); Fri, 6 Aug 2021 05:11:52 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59861 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244085AbhHFJLt (ORCPT ); Fri, 6 Aug 2021 05:11:49 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 04CD15C00D9; Fri, 6 Aug 2021 05:11:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 06 Aug 2021 05:11:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=tmsLsa/eRaufF J8jRKvAmHCUqfWGYVXTYZw+tCYDWos=; b=IFPrClOmDWtBDLGH/54BI3Y4lPbfe vYnovPVgUePLAq4UyXGtphNo7WrKc9QgIgZxVmkQ8UVJ2eU0QemZ13wP46Kl/ORT COmKKVzND5GZ9ZvkYBLoQ6FqrWbX0XDf5rpwf7e9HDy6GIo/+sng83+ygPcAddvQ 74e7eayoZfKVEyM3VsMWkzvJ+epAXpusPzOzZnR/8ZybpF9wysDW92IwXour0JuP YcivRG2dMCeHhGM4gwFfQwUDIi7sEWCgjj8aoDU3C9y1dT7Rxu3G9MZDp1OlDj7b cP5rR/qa2noBl9W7sziPsdgHlDYWNaGAMcqACJLD4EWXW+JssuRkjyvbA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=tmsLsa/eRaufFJ8jRKvAmHCUqfWGYVXTYZw+tCYDWos=; b=jZdDI3k8 YdbDwL2oY5uIKQ4V4FRBlUH//21ZtmBfTP67WvyTRlI6f8KLxXcXA3azfcukvhOU Cwwt53Mm5erQUxnQy5aikD61Z7AA2HlBes6rqj0DNWpExnlZTCrwd7FmQMnKvONq DJEKSp9jVF4xj8GCd+mheHc95apk3lizOMcrPbVOvbV8EcbiM/jaqGsTi9P4Im1O 6FBEFXORkUTExIh8s27M1+F8CVCpbmkJVRK6snV0Sl05CT3HL/6GtJrpJDXUcctY JQWlSc2ihYIipammOnvSzWVh3vE3xR30NilNoJK++9J90Bov4Q19PM2izOlDFss/ EASK2pUL5kHCXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjedugdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 Aug 2021 05:11:30 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v9 05/12] regulator: sy7636a: Use the regmap directly Date: Fri, 6 Aug 2021 19:10:51 +1000 Message-Id: <20210806091058.141-6-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210806091058.141-1-alistair@alistair23.me> References: <20210806091058.141-1-alistair@alistair23.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Alistair Francis --- drivers/regulator/sy7636a-regulator.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c index 37bf2a3c06b7..8360b3947ead 100644 --- a/drivers/regulator/sy7636a-regulator.c +++ b/drivers/regulator/sy7636a-regulator.c @@ -14,7 +14,7 @@ #include struct sy7636a_data { - struct sy7636a *sy7636a; + struct regmap *regmap; struct gpio_desc *pgood_gpio; }; @@ -70,14 +70,14 @@ static const struct regulator_desc desc = { static int sy7636a_regulator_probe(struct platform_device *pdev) { - struct sy7636a *sy7636a = dev_get_drvdata(pdev->dev.parent); + struct regmap *regmap = dev_get_drvdata(pdev->dev.parent); struct regulator_config config = { }; struct regulator_dev *rdev; struct gpio_desc *gdp; struct sy7636a_data *data; int ret; - if (!sy7636a) + if (!regmap) return -EPROBE_DEFER; gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN); @@ -90,12 +90,12 @@ static int sy7636a_regulator_probe(struct platform_device *pdev) if (!data) return -ENOMEM; - data->sy7636a = sy7636a; + data->regmap = regmap; data->pgood_gpio = gdp; platform_set_drvdata(pdev, data); - ret = regmap_write(sy7636a->regmap, SY7636A_REG_POWER_ON_DELAY_TIME, 0x0); + ret = regmap_write(regmap, SY7636A_REG_POWER_ON_DELAY_TIME, 0x0); if (ret) { dev_err(pdev->dev.parent, "Failed to initialize regulator: %d\n", ret); return ret; @@ -103,8 +103,7 @@ static int sy7636a_regulator_probe(struct platform_device *pdev) config.dev = &pdev->dev; config.dev->of_node = pdev->dev.parent->of_node; - config.driver_data = sy7636a; - config.regmap = sy7636a->regmap; + config.regmap = regmap; rdev = devm_regulator_register(&pdev->dev, &desc, &config); if (IS_ERR(rdev)) { -- 2.31.1