Received: by 10.223.176.46 with SMTP id f43csp966107wra; Fri, 26 Jan 2018 09:37:22 -0800 (PST) X-Google-Smtp-Source: AH8x227hjXBjCohgJo78uNuGHV2QUN6cKsRzzp/Mgbir0QRwfEf9oTfVtfsAVlO1LMxjaDoTjbT/ X-Received: by 2002:a17:902:34a:: with SMTP id 68-v6mr15176505pld.276.1516988242802; Fri, 26 Jan 2018 09:37:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516988242; cv=none; d=google.com; s=arc-20160816; b=HuLOuZ6617JPbVjKCZlemkNLLRIEIMe8E1UJFSSZM294ORUNnN2Cycbb+pFLWp6Rds 3Mg9SYGy8pkzv/MPO0NxgXDah8PCEtFtlAfFCI2cG7ZTlNjAH+D22KcILXIDMsxb2Di+ +bljowj7n8zD1RvlmFWlq8ETP0ZSlnkXv+5wC/Xls9GyR69tmbJ74cyIP8lKmUqlH531 CdsL2tzy7/I72Uqth1AT4nq8LuQEzjgQxT8kvtxdHVRZ5lvz3CKNYlyUAeEmQghYRTwM /Uegg0zGqmeywigo+AbMNjZxyNmkKdA1QmUC5vOd7vZSa9jHhlSlP9ZGHQzFcIeHiciB NWmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=lN5PEajwfeyUyshiS2aup7AHiDes/F4bOB8ncfMt/Qs=; b=eKJrbcdY1m5GPAwt4sQQ8Kr3JbHT4ZIPGnsRzaWj++MdC6h9DdmIG1PbYaGH2H9+kx 98KrSHGbL/8D+9bZvhGdZQzTYARc+wE4fVWLiweBD31BOss0+iYtkCcWJZd1Kqbq5UP4 e3Xh8o+ByYwV+IEMSmTr/rDsWUWo2U7O/MFU+zsh8W6xqAqU5KwPyN3WUUfTiJu0Zz6Q Pny/HyKykylevrGCGVxlRwLuFyDvrted/bj8iGFH2Md6qvYGOftoYMmwBym+F94D3O8m J1UKN5rs0XQgBpxWe7hGqmxu/VC6MK4vkgm6i1iRzxnHFdZhzXOPDVD00UiqKcRFyKnb iXqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ldeXXcp8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si6650108pfb.84.2018.01.26.09.37.08; Fri, 26 Jan 2018 09:37:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ldeXXcp8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbeAZRfw (ORCPT + 99 others); Fri, 26 Jan 2018 12:35:52 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:59062 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbeAZRft (ORCPT ); Fri, 26 Jan 2018 12:35:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=lN5PEajwfeyUyshiS2aup7AHiDes/F4bOB8ncfMt/Qs=; b=ldeXXcp8gDGQ 3GYDobMl17oXLq3roz2FxX1+wo9iSpszxQm/cEzPyyu8xZbB2frS+D3Qjgigi3puPhRx26x5i+Zyv A6XU7i3Y8BBbujGh3VNA5FiGjDuBN4+QVWgpe96ctOZKHgvD4a+Wc5tTCjdaMjHf2jb7FR+w+aBmB vZi1Y=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ef7uj-0007QX-6q; Fri, 26 Jan 2018 17:35:45 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1ef7ui-0002cM-Mz; Fri, 26 Jan 2018 17:35:44 +0000 From: Mark Brown To: Maciej Purski Cc: Mark Brown , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mark Brown , Liam Girdwood , Rob Herring , Mark Rutland , Marek Szyprowski , Doug Anderson , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Subject: Applied "regulator: core: Refactor regulator_list_voltage()" to the regulator tree In-Reply-To: <1516631412-17542-3-git-send-email-m.purski@samsung.com> Message-Id: Date: Fri, 26 Jan 2018 17:35:44 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch regulator: core: Refactor regulator_list_voltage() has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 3d67fe950707a930664c5673ecc026f1bb497136 Mon Sep 17 00:00:00 2001 From: Maciej Purski Date: Mon, 22 Jan 2018 15:30:07 +0100 Subject: [PATCH] regulator: core: Refactor regulator_list_voltage() Change _regulator_list_voltage() argument from regulator to regulator_dev in order to provide better separation of core layers. Allow calling _regulator_list_voltage() from functions, with regulator_dev argument. This refactoring is needed in order to implement setting voltage of coupled regulators. Signed-off-by: Maciej Purski Signed-off-by: Mark Brown --- drivers/regulator/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 5f7678292cef..fd8eacfea422 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2447,10 +2447,9 @@ static int _regulator_is_enabled(struct regulator_dev *rdev) return rdev->desc->ops->is_enabled(rdev); } -static int _regulator_list_voltage(struct regulator *regulator, - unsigned selector, int lock) +static int _regulator_list_voltage(struct regulator_dev *rdev, + unsigned selector, int lock) { - struct regulator_dev *rdev = regulator->rdev; const struct regulator_ops *ops = rdev->desc->ops; int ret; @@ -2466,7 +2465,8 @@ static int _regulator_list_voltage(struct regulator *regulator, if (lock) mutex_unlock(&rdev->mutex); } else if (rdev->is_switch && rdev->supply) { - ret = _regulator_list_voltage(rdev->supply, selector, lock); + ret = _regulator_list_voltage(rdev->supply->rdev, + selector, lock); } else { return -EINVAL; } @@ -2542,7 +2542,7 @@ EXPORT_SYMBOL_GPL(regulator_count_voltages); */ int regulator_list_voltage(struct regulator *regulator, unsigned selector) { - return _regulator_list_voltage(regulator, selector, 1); + return _regulator_list_voltage(regulator->rdev, selector, 1); } EXPORT_SYMBOL_GPL(regulator_list_voltage); -- 2.15.1