Received: by 10.223.164.202 with SMTP id h10csp2394463wrb; Sat, 18 Nov 2017 21:11:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMbA2eqaoYG21tJwKQwiov/gh8zuDliddDtrpRqKjDDg+wr+Dk4TBAeeP0zVpp8P5jo5cB4O X-Received: by 10.98.182.16 with SMTP id j16mr1212119pff.47.1511068265979; Sat, 18 Nov 2017 21:11:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511068265; cv=none; d=google.com; s=arc-20160816; b=NmXlhM7PMX+kHer75G9cJL+edai0XQ5/PkKjUs3IMoyz2ZggFpHbcg3/FMNKyv8Xkt O1LredBn0Dv6O5m4ZMwwpYnLSU5tNj23jlv4GKi3eQ8Grzxc0f9IdSJNGxmi+WTjujWR 3s5BpK7z5rf+Iz0qx/57+E8KnJdPGtawUN93JtV8+lws8kpGtzmci9ZFqglQx9vQuEjF 4ENiSooXCjnAc3HZ0+A58hb+ePdWW2g+7PAy+yURlhhiippxdU0jKOeWT/j6XQ3dwFPC ojIetqmg9pa0zIklixbKFFbDjcs4zQ1GKmctdO55KJNpX6n/y2I5JxCs8n+KsewUB5hz R7Hg== 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 :arc-authentication-results; bh=QZl9AcuWmm7AvO1cSTbyK9ZobEdVlZDf0UKkVwnk7oU=; b=YJfzCqiMkpctBk23CgVmE6IvhQCPQr3VCjRHUiN6VhoHSIQ0g2iPFINtG8AXnwtd4O yRP3cmXYQ8SJjdNwsBwoo9vUm+Fe1HOE0ZfJD07EJAL+n/3X5hm+0+6voMrZknMOtOCP ThlAOwnIk4SDMZl7kA0t8qtu46YM3VrbfB3TEGMPYP0CtzW+zyciBmeA7HZNHwJpi47d 2NfOHIiltLdOlSg/VutqZ6L2Kx8srHXJw4lpu9BJMSP0pNfz07kjMq9rxNXM9uuXzuS7 5VZkE4pwdJkrYQzy9DLSB9o9aWQJL/mB4rNAOSOQ/5s3KCV3ozPx1g6UwBkkHnxMBkfY jgcw== ARC-Authentication-Results: i=1; mx.google.com; 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 m17si6112490pfk.263.2017.11.18.21.10.46; Sat, 18 Nov 2017 21:11:05 -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; 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 S1750905AbdKSFJx (ORCPT + 75 others); Sun, 19 Nov 2017 00:09:53 -0500 Received: from mout.gmx.net ([212.227.17.22]:50497 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbdKSFJr (ORCPT ); Sun, 19 Nov 2017 00:09:47 -0500 Received: from localhost.localdomain ([88.153.6.136]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M3MAG-1f7I5U2kCm-00qxCk; Sun, 19 Nov 2017 06:09:40 +0100 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Subject: [PATCH 2/2] regulator: Update code examples in documentation Date: Sun, 19 Nov 2017 06:09:07 +0100 Message-Id: <20171119050907.5043-2-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171119050907.5043-1-j.neuschaefer@gmx.net> References: <20171119050907.5043-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:QGKKeZddn3CRFjXPLexxxx5gDA1PE2FOXwEpsjKTfKnQvfwubw0 Le79TK+etvjDU/qAJdJVsVrKKHCBl/rS+2NjOg0aRCPtSrEaGfriKFlw6AT9/UhDoDFbLUA RBNVhH4rK+t32tqVVaruX1X83J+PG5E2+iIvsvV5PNQ1wDhvI3PW4Hj99PtBF+pvwjZHflR 1wcw3jEY9X0/GMSssvAOA== X-UI-Out-Filterresults: notjunk:1;V01:K0:x3FN3Rwf7Xw=:g0BHuC9RfQb6skjnVdIrgZ TaXKe21fY5g9ak4B4eR+pjI0TXwOoSSHR1Mp29cOzJJUxrcw07jsnxjOv36SQyT7DzswT9vsE 2kcSSg7BM7aH4jVeZ8/+YWRGc0YqS6X3FxuejycSLSNH/kCe/jcw49ApOnZs4V20cfdNvt21x MdUhqEJT+TrEWwPmxUciPjNI9EEcMnkqZ/4t4UjQOQzfZ/Kj6QjAJTMrcDnViWtxI2q/9ftI/ is+aXXZQ4oF6XMq09DZTtr0u++1enhIfNJLKXraL/TzS9I4GOBEbULxQ33/fHsuOvdk01wIVJ XPANnpzoKHhyH+IFf6hzOrqQzB2YwAHq6L2W4FmFN7RIA/qPPHO3U8p56SFL10+YDbVgeEtta k9O4nlxjEhtKZLouO9dGM7ir0MjbSkXBOs71pmIqGDBlC/AQ6fdf6pvY9lSlPhE22pZJM6rm9 gK7vRtaXrm0d3y+2n+pBXWmN61TmjAtZemjQF9xIUAymtWUQEGUXGD8mbTQU2WR/sZPXspQrr CT2aXsyMp4kWu06DdK8Pl66B/pZ8l5fy/WLotOVYVHbdEtV9tuV5+cxFxDILU+kjfS2aa6TCs lceUPmt/zOXaNcwl+bBm2z/n758n7jeI7NCPjjESs9o9+WId+l6xcF4BM5btRVkQpoKMHZND/ ftmRE0yI82DgjFIxL2tJUcta0rmMKe6PWZoBFHdHX+lUKtpqeu0/yscN8uWJXJJCY23mcx9ku V920jiOlRs7ZuUJZOGnq4K5Uh1UZaG/TTQn3//+987PWlaUZhPBM2u7vytWEaxXMtWN+mWYKQ UGRh+/NSO/6SVqMDxaB3ez1CijihXBj/WQdxVt4DztIAc1SGjE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This involves using the REGULATOR_SUPPLY initializer macro and reindenting some of the code. Signed-off-by: Jonathan Neuschäfer --- Documentation/power/regulator/machine.txt | 36 ++++++++++++++----------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/Documentation/power/regulator/machine.txt b/Documentation/power/regulator/machine.txt index 757e3b53dc11..eff4dcaaa252 100644 --- a/Documentation/power/regulator/machine.txt +++ b/Documentation/power/regulator/machine.txt @@ -23,16 +23,12 @@ struct regulator_consumer_supply { e.g. for the machine above static struct regulator_consumer_supply regulator1_consumers[] = { -{ - .dev_name = "dev_name(consumer B)", - .supply = "Vcc", -},}; + REGULATOR_SUPPLY("Vcc", "consumer B"), +}; static struct regulator_consumer_supply regulator2_consumers[] = { -{ - .dev = "dev_name(consumer A"), - .supply = "Vcc", -},}; + REGULATOR_SUPPLY("Vcc", "consumer A"), +}; This maps Regulator-1 to the 'Vcc' supply for Consumer B and maps Regulator-2 to the 'Vcc' supply for Consumer A. @@ -78,20 +74,20 @@ static struct regulator_init_data regulator2_data = { Finally the regulator devices must be registered in the usual manner. static struct platform_device regulator_devices[] = { -{ - .name = "regulator", - .id = DCDC_1, - .dev = { - .platform_data = ®ulator1_data, + { + .name = "regulator", + .id = DCDC_1, + .dev = { + .platform_data = ®ulator1_data, + }, }, -}, -{ - .name = "regulator", - .id = DCDC_2, - .dev = { - .platform_data = ®ulator2_data, + { + .name = "regulator", + .id = DCDC_2, + .dev = { + .platform_data = ®ulator2_data, + }, }, -}, }; /* register regulator 1 device */ platform_device_register(®ulator_devices[0]); -- 2.11.0 From 1584445727110580345@xxx Sat Nov 18 22:46:35 +0000 2017 X-GM-THRID: 1583483345097010805 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread