Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1224829ybt; Wed, 1 Jul 2020 23:24:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweXDjP+/VbWMz5C9lHpU/M6PjTTkEmW+J8J9yt8R9wLH1tnmO+Yln78pUsiA51iC2Opz8p X-Received: by 2002:a05:6402:3058:: with SMTP id bu24mr15827426edb.242.1593671072025; Wed, 01 Jul 2020 23:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593671072; cv=none; d=google.com; s=arc-20160816; b=GandFjUWj8pYgRh/k6UJduQ7vzF0YM1UaCWJs9rn6R0iBROFJWUL2oZCj2WxMLOCu1 znqZSw59VB3fLZ4XN+jim4nk4QhOe5d0luHWJlajp9ltzYkJlAbo70YBiUDqWhjmPr3d cPvM/mG3Y/m2CRh26RJQUzL7TXcBGwLMFXc0AR5k2XdBKX7dHj6JN3iOuuKAwbLw0k4O ycFe3YpQ2GJv3UMaxGCs+DlnmTc1VIZE6yySXra6hVx26B4kx21ERWEy5eZGEGq2b36H tfcq+yobCNgrM4rS9Ft7T7klY4MlpZO8jpHW8CrDppp0GqCzwho4FKzjNR2ng4yC+8U/ m2eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=MaFXFUTySiLKYk3Z8Ey8ljkWyigRLA9QlN8KpEVxaas=; b=knR3LUBZ9SilXyOJWiiMuJqmlEo11DCQcDBjHQaYtMvc+qI/Nf9/ceRCy264ew+TrU aCSS7dYZEfjebyfTd0qSWiRIIIAOO9UGBX+IZ/HneXx8tRNypuZ2wKT8UnWrG7WtA7Y8 WDDHCk59IxxPLNIVaZrvIK2vqJecPWpVFvdBE12iAghl7U/vTTInTREeCa656YF3Xf+H XKGV2z6L+Oh7RTkFCMBoqZacUFgSThQH1cXk0Dp32pq4ZEvRWB/6BkMt+iEwSZsYDlmG bfFhD2goXwkM5CAH3uFAuxbDJWXZg+MQTO8l01+s+NTKNCkzTKbJsxoAyzQfncIrYnYz WpHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HpO8j+oo; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si5403635edw.306.2020.07.01.23.24.08; Wed, 01 Jul 2020 23:24:32 -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=@google.com header.s=20161025 header.b=HpO8j+oo; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbgGBGXt (ORCPT + 99 others); Thu, 2 Jul 2020 02:23:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbgGBGXt (ORCPT ); Thu, 2 Jul 2020 02:23:49 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 018B0C08C5DC for ; Wed, 1 Jul 2020 23:23:49 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id h10so3527742ybk.19 for ; Wed, 01 Jul 2020 23:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=MaFXFUTySiLKYk3Z8Ey8ljkWyigRLA9QlN8KpEVxaas=; b=HpO8j+ooh+DAxXHg28sv9p6lhCrB1r7AJwKn3FWvCL7Paa0RV1y7CZudbCkjxY0KV+ n72PRRaqDGQhUZQHNggZCAWf7jI+GiM6bpUiRpXsNkrvTrI6WpupwUDmvs6ayML5k9hA uWuCFog9HN3f7U6A3Ch77vna3rMlKTNhfdfWrCbG3KJc9LXr1fbsrLjvHAbeazQmzTrD Qeya3T0QHKtAWY5tfs04Ewd9Fqqvh+LsDCBn2pnd6xoeOrTCHYtQGCkG/CJ2e5AIyOd9 14OCWdylxbNxCvsVJyeGHS6zkW5Uox2NesJFpP2g6rzPGStCszqKfAdz7mbYVKv9fpu8 pasA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=MaFXFUTySiLKYk3Z8Ey8ljkWyigRLA9QlN8KpEVxaas=; b=nhFlNNPxlJEcCbdI5htejXAaW/x2OcFwKXu3rdFor7ldawLc4oJZ+YqenP/HMFXRZj 3EP5OnEW2iL70ohR0M6aAH2buGNpJVvGRrF1F00mAJxq/+gWCtIuFsXT7JKK3R9OPJ+s lYzzrImJ+bDUMDKOMIqHdquqsFVa6ykacdYWrYkrU/LOBC5dONHkkwZ9isK+eMANA7uS 1zY79p6Wf8rF0uonOxjPffBB4ccv4mEU2qd4YWdxnyu2BHyGB/d4FFvKVL6bgf5rCpQ6 SI4WXUWX+a83hy6cenMaGwXRdIoSMtkzvqgLFTrtF4C3GqNfJkOiI6v1TFYn7vIKNfk8 8vxg== X-Gm-Message-State: AOAM532bDrVLUTIkekdg/PP3g43aa/FRFz+R+lRrphj1MrcbjicqhZmW Bb+3qY4T3gddQhrlFKJ42BFy5KUQlzBN X-Received: by 2002:a25:9904:: with SMTP id z4mr47219203ybn.146.1593671028182; Wed, 01 Jul 2020 23:23:48 -0700 (PDT) Date: Thu, 2 Jul 2020 16:23:17 +1000 In-Reply-To: <20200702062320.2903147-1-amistry@google.com> Message-Id: <20200702162231.v2.1.Icf69e2041b1af4548347018186c3ba6310f53e66@changeid> Mime-Version: 1.0 References: <20200702062320.2903147-1-amistry@google.com> X-Mailer: git-send-email 2.27.0.212.ge8ba1cc988-goog Subject: [PATCH v2 1/4] regulator: mt6397: Move buck modes into header file From: Anand K Mistry To: linux-mediatek@lists.infradead.org Cc: hsin-hsiung.wang@mediatek.com, drinkcat@chromium.org, Anand K Mistry , Liam Girdwood , Mark Brown , Matthias Brugger , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will allow device trees to make use of these constants. Signed-off-by: Anand K Mistry --- Changes in v2: None drivers/regulator/mt6397-regulator.c | 4 +--- .../regulator/mediatek,mt6397-regulator.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/regulator/mediatek,mt6397-regulator.h diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c index 269c2a6028e8..d51e98ce1138 100644 --- a/drivers/regulator/mt6397-regulator.c +++ b/drivers/regulator/mt6397-regulator.c @@ -13,9 +13,7 @@ #include #include #include - -#define MT6397_BUCK_MODE_AUTO 0 -#define MT6397_BUCK_MODE_FORCE_PWM 1 +#include /* * MT6397 regulators' information diff --git a/include/dt-bindings/regulator/mediatek,mt6397-regulator.h b/include/dt-bindings/regulator/mediatek,mt6397-regulator.h new file mode 100644 index 000000000000..99869a8665cf --- /dev/null +++ b/include/dt-bindings/regulator/mediatek,mt6397-regulator.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DT_BINDINGS_REGULATOR_MEDIATEK_MT6397_H_ +#define _DT_BINDINGS_REGULATOR_MEDIATEK_MT6397_H_ + +/* + * Buck mode constants which may be used in devicetree properties (eg. + * regulator-initial-mode, regulator-allowed-modes). + * See the manufacturer's datasheet for more information on these modes. + */ + +#define MT6397_BUCK_MODE_AUTO 0 +#define MT6397_BUCK_MODE_FORCE_PWM 1 + +#endif -- 2.27.0.212.ge8ba1cc988-goog