From patchwork Mon Oct 12 06:23:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 317607 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp4324167ilm; Sun, 11 Oct 2020 22:57:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDMYDQPGgmB4AoK8we5AAc6bGsWoj4J1u9Gw55LpZi0gR4r5gMhMmt7e6xHzisRyItKinP X-Received: by 2002:a17:906:50e:: with SMTP id j14mr26265007eja.138.1602482246754; Sun, 11 Oct 2020 22:57:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1602482246; cv=pass; d=google.com; s=arc-20160816; b=MIrkepmZhZd8HxFO6r2GUS9ofxgKvkbY2a8TPFgtYIIB0HsxziIDs3Pni5MrbLSlTg 9W0qQuEFqNIHctqA5ane58v9ltLUZrJdn83oy9wh15juRxbRp0swWBz//zVtwk5Yf9X5 wak/e4xY95E1FnUTqJUqVVxem/yDDrkYOSoAz5Q2453ihyjeUuGzvCs2KUribYY2bsu7 UgJbUjq36B4rSXNIpnizyRo5X0S33lVqDU5f0M5aFguVgjUna4h1JS+aGJ4CcxuByqYE dHdVgvLZA+vdW6rAZZIArWRSw2k45cORMCPo9DQIyHFQdGVUQAWA/hs5qty15evRsBoW u68g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=BPZwurhqYqgLbBlt4T1fEXL81xskjmoryT3xOw5KbFE=; b=q4UFdi6PDWIOGEkCapLALhcxKZ2tY4iWJG4r0WmjgmK9MSR5iYcumTMlXPtHiSQs/l 4y17pmvt/C/8oaYW006pYPePqKhLn7XSqRiSmlnZkWvnXBRNe3NfZ2XOHbQC37qkyRRG 2tg3NsOQS4IkDG/eP5/5Lua1PlpUP0Cn8qqMKxrovaJ18e6T+IgTTAIF0NUytMRKbaRr frHEgwijGW60D00tag2XtKSfmBsRiB1i2ey9t/7UnlTivR+z4k3uUJ/ui+3J/6UGWlse dxD3TVjHi08CF4zA4aJyYIQgraoFKdORcS2h29SIqHJ3n1JhJLNVly1AjUvYQjcDuVP5 6tng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FTW04VOg; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id f23si12143055edj.426.2020.10.11.22.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 22:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FTW04VOg; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFD0D82487; Mon, 12 Oct 2020 07:57:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="FTW04VOg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7574C82485; Mon, 12 Oct 2020 07:57:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on060b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe02::60b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0853582479 for ; Mon, 12 Oct 2020 07:57:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YC738C3NfaAObe0C4AmARYOzyVx8u0Ul46e/Vq7sQoM5nNgRptDLnGHfeRBGKfRIz3q1U9fYvIsrIXy9RSy/NDOFit1YQVBXPNeNTmVpiwI7f3lm85FmVhJ+fPAb2JIk5M5k3x22ScgUAEOePU6Ma23bM3pah14fmvPka7PxBKnbsM8BetHTNtaejPDLFkR/mMbfihh06lBdB7opebhjcijg/7nkeBziJ27P9wtZ+NmdpG3wDlXcedC0LjIzYjWXfFDfIoxLJs0w18M7wq4HrZ0VgJiEZ1F3dkxLLYCSjXURhXKabkK+AwI645G0HUKCA9YI/Yga16AUeZHMMw90lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BPZwurhqYqgLbBlt4T1fEXL81xskjmoryT3xOw5KbFE=; b=UV7TElt2E+8m9l3A3dGNfHR+b9v+gzOn+g/hCGE23BVxtyy63+7i4vyLXCLi6k5+MVovQrrSIczMCVBU1fY4YpnIIAyocGA2/3UqmmHTfqLy2MEZNnDfdyLJ+iIi/b30ZqbIUe8bTbxKHQErqLD8KSoghzM3FuW30vT1SOkvtUvAnylh6nDnk6EBFWH9oLbVHME9+xvnAZNqh+NA8cMXo0OEa/I1U3U8tA9LJzdmyU2ilkKC0cDpNE+Kr5oYXRwqo5+Jbf59FYrRrKhpa8d3Yttzt7TuL1OGuzvohgkf9uuQ7+A23Lkhuvyyl6yIi7pesW/uV+gK8TzbLDEUzzQu1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BPZwurhqYqgLbBlt4T1fEXL81xskjmoryT3xOw5KbFE=; b=FTW04VOgRvH6AEuCousB+ymz7MOihmaWg/WpY+XsjMSQYcQ3QgMDfN6G84yWrhphCWyLPLXWiFqGuigauEaJKjqy3HkrjTMahhzKSGwuwCplq4k7qUWSfMv7LdX1cgqR82zztC+4IRD3N/HbdtadeZ6CVCMlFtljm2WIhw1ajjM= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4235.eurprd04.prod.outlook.com (2603:10a6:5:22::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.26; Mon, 12 Oct 2020 05:57:19 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6%12]) with mapi id 15.20.3455.029; Mon, 12 Oct 2020 05:57:19 +0000 From: Peng Fan To: sbabic@denx.de, festevam@gmail.com, marex@denx.de, lukma@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH 2/8] power: regulator: add dummy helper Date: Mon, 12 Oct 2020 14:23:48 +0800 Message-Id: <20201012062354.3743-3-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012062354.3743-1-peng.fan@nxp.com> References: <20201012062354.3743-1-peng.fan@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR01CA0105.apcprd01.prod.exchangelabs.com (2603:1096:3:15::31) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR01CA0105.apcprd01.prod.exchangelabs.com (2603:1096:3:15::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22 via Frontend Transport; Mon, 12 Oct 2020 05:57:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fc80abab-a16b-407b-a4c4-08d86e73adb4 X-MS-TrafficTypeDiagnostic: DB7PR04MB4235: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Y2N13lC1ufYJTOrVvChWxuhdxf47vB74VxEU346Nhk1Qd1witBS/S4Br821Nb1L8aIRutFKK61oV0Oc1PBNxst8tt5Zvsc5mFJ+FAH76Ktbi42XL+WQn/hpRAzCJkDF/qBts2ktvbLk1LqfEeeteuv90t/iKeYQJTlJ6OVPQdRq4yR4ZxLn8UT2tBaqqyfMJNhetYZLhbZEJ2Pr01Va5QWQ+tDUcXpd6PcfnFWYzLR/RGAIe5joU0angzdN3T7Y8lFKfFc1D7H0U7K/TZKaM4KUT+bIPvFFZ6YW1Y6tRXv0OhmQoZpf7XviGyE+UnqIWhIoq8bXUrOPPMHurVJqQA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(52116002)(83380400001)(8936002)(6506007)(4326008)(8676002)(44832011)(6512007)(1076003)(6486002)(86362001)(5660300002)(6666004)(66476007)(66946007)(66556008)(316002)(36756003)(2616005)(956004)(2906002)(186003)(26005)(478600001)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: MgGzuRPMIoNd6zJkkp5eneSFjFaTZs8ESIxsZaYCCWc3TWeX+Qz7CroS/atnxwfZ7HmB19uR7wziKm5mEiB34n6Qfx43ENsD443CSUln2RO4ilQ5pYtJgV+0eHwPSRb6JzehJ5ihR96Q80ajVZ7h4Hlzin8VKLoW+nuVJXrIaJKW/z8nHArtKurKMVZLZp+wNgSk3s/rb+i3/Ckw6uC/mH2ITqYV2Ft9jm+gPUpHmleInLIL5LnpyYyS3HnBMg79CA8naYLxgi7NMXqdOdG8HkFMJD19GIsX+HNDEyi2hvEZi8+uNOOYGDMge9LeXxuUcBn5Jy0/Mcq87/SoyaOHyyU+uITKYuacpLdJ1J5VDL/TfPhFztoqnid9TTmZJ9nO3cnW2y7SVz60W/JYwFqycrkJuwEWzmZ9rGdeVZBzHnBK8PDAXekcLng9sEefjqZP6i4Ye790cHDxy+Wb4JH6DOLgbSZa3IzRIT+vI7sqIY0HHpJU4Vt140zJtI9vE5YHJblVeywbMUL6+dn6i9o1rZMziGbWBf042ypXI/SEgHTwAiOkybjd016JltXfQ1EP5ev940GkRtZl92rI72ygRR9/K56vF1WnNv+Lzi51lfXvNFhcUbhuY7P6s5L5umKJka1hrgOFIQX9finnFS+fDg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc80abab-a16b-407b-a4c4-08d86e73adb4 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2020 05:57:19.0005 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HkaWIIIALPHOlARyNg8Lr64a0nIMcF1cRc6t+rohZb7uHMkiQK6QhHKwRfNYDcvxw03rYN0EPaPFLisyUsx2VA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4235 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add dummy helper to enabling the header could be included when DM REGULATOR not enabled. Signed-off-by: Peng Fan --- include/power/regulator.h | 114 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) -- 2.28.0 diff --git a/include/power/regulator.h b/include/power/regulator.h index 74938dd61e..7f278e8c7d 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -264,6 +264,7 @@ struct dm_regulator_ops { int (*set_mode)(struct udevice *dev, int mode_id); }; +#if CONFIG_IS_ENABLED(DM_REGULATOR) /** * regulator_mode: returns a pointer to the array of regulator mode info * @@ -524,5 +525,118 @@ int regulator_get_by_platname(const char *platname, struct udevice **devp); */ int device_get_supply_regulator(struct udevice *dev, const char *supply_name, struct udevice **devp); +#else +static inline int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep) +{ + return -ENOSYS; +} + +static inline int regulator_get_value(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_set_value(struct udevice *dev, int uV) +{ + return -ENOSYS; +} + +static inline int regulator_set_suspend_value(struct udevice *dev, int uV) +{ + return -ENOSYS; +} + +static inline int regulator_get_suspend_value(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_set_value_force(struct udevice *dev, int uV) +{ + return -ENOSYS; +} + +static inline int regulator_get_current(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_set_current(struct udevice *dev, int uA) +{ + return -ENOSYS; +} + +static inline int regulator_get_enable(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_set_enable(struct udevice *dev, bool enable) +{ + return -ENOSYS; +} + +static inline int regulator_set_enable_if_allowed(struct udevice *dev, bool enable) +{ + return -ENOSYS; +} + +static inline int regulator_set_suspend_enable(struct udevice *dev, bool enable) +{ + return -ENOSYS; +} + +static inline int regulator_get_suspend_enable(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_get_mode(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_set_mode(struct udevice *dev, int mode_id) +{ + return -ENOSYS; +} + +static inline int regulators_enable_boot_on(bool verbose) +{ + return -ENOSYS; +} + +static inline int regulator_autoset(struct udevice *dev) +{ + return -ENOSYS; +} + +static inline int regulator_autoset_by_name(const char *platname, struct udevice **devp) +{ + return -ENOSYS; +} + +static inline int regulator_list_autoset(const char *list_platname[], struct udevice *list_devp[], + bool verbose) +{ + return -ENOSYS; +} + +static inline int regulator_get_by_devname(const char *devname, struct udevice **devp) +{ + return -ENOSYS; +} + +static inline int regulator_get_by_platname(const char *platname, struct udevice **devp) +{ + return -ENOSYS; +} + +static inline int device_get_supply_regulator(struct udevice *dev, const char *supply_name, + struct udevice **devp) +{ + return -ENOSYS; +} +#endif #endif /* _INCLUDE_REGULATOR_H_ */