Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1134570ybt; Wed, 1 Jul 2020 20:16:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRJ/HFpeEH79bafI66+NwWF1if6mhQiesoiAn1AjtBnXFxFR8kiUVzupJgmJL3VGN3E9x3 X-Received: by 2002:a17:906:7e04:: with SMTP id e4mr16059529ejr.83.1593659791709; Wed, 01 Jul 2020 20:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593659791; cv=none; d=google.com; s=arc-20160816; b=eItJmDV3YebYrOxLF3zbBH/uYoJDrbT0p9FTun+6ofwBjWuoRv1bXU8OinE8pJx85e jxtSOktLYNGeoyIKCrGWxiVia3BX1MjHOEw8w8Ew/Y9u1n3UmQzX8xnS8Cmxey6xEODf vYR8LjnnvL9ind3UnPvhc0EXwNqbO8uZkNGnVpOt7KUDk4agZcrd3/H1tIjmsNMW1YiN XSRh63Q261sC2WChFbSqTIfRpCcR079SmVCJhBiiu3Lxrz8xPeHgJrye1z+GBZt3XIdP 28X/du212MGObwgGMTUW4bVgKIE+h6UYXHP8nhIBGcCDfdyqSwQv0T1wTnDkCLWAzcMM Uh2Q== 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=CdvIUOflYKIpzoou6WtUxcq+gVwfhVp2A4cJfb6QLOQ=; b=ha6FpAGXdErVjZw0Jace/G4pUCldYCUI29zk6zO8DhdJcLVbPx91i3wTIXQUlViTaP eDojv0ZggI/l4lqJwpieoHg2oStEwjqORNR1K4HJv/GdmdYT55iohiLTVR+mWSbLUqAY Rd8y4ZFiVHjPTsETn6VQb2ijYvFbc9h3ImPhfvwRGejv/3XeOxzmmdpPtiLtA2TUxJF/ lrCsiUy0etnpXy1iw/fbefJABq4hqcfMiUGhdWJpUQdeLH+pGKLwg/nRXLJGEgfPZATD nf/keSX3i/Tn5jSqTOH4ynMrQd4gPbDR+61EXIzFT0lUIYeuEVeduBOL6mdlyI9YCMmd De4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=j7CIePE2; 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 a26si2831053ejf.701.2020.07.01.20.16.09; Wed, 01 Jul 2020 20:16:31 -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=j7CIePE2; 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 S1726754AbgGBDPx (ORCPT + 99 others); Wed, 1 Jul 2020 23:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbgGBDPw (ORCPT ); Wed, 1 Jul 2020 23:15:52 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E6C3C08C5C1 for ; Wed, 1 Jul 2020 20:15:52 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 13so13922903ybx.9 for ; Wed, 01 Jul 2020 20:15:52 -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=CdvIUOflYKIpzoou6WtUxcq+gVwfhVp2A4cJfb6QLOQ=; b=j7CIePE2feBXIQoNkIEb9ht1a2F3NGiMraG57XHLRoNnulgQBq3IFW8CQuBoDdO+GV R0Ij5FmaSWYor33Z54uc2bupMuj4TPrjrpMTZ1cg180DmgQI61lzCY1n7mb2Qf/KIN0H QhVnQ2/QfP2S/F6gH/Euq+hf0aKuai9RQyAE10NesyHLF+1y9LXo3jt6NoD4Bx54SeAP N0/D/ZxNn5+ur4bihNwamMHV60sdlDdHYz1h/Swm+j0Ae6zeDytN5vsvy52dR9tqgWou wE8hsx+tiNOjw/ne8XOR/FjOLp21lTeqOCaSJgZ3fPkjYbkwnibTTZ1f/InmQE2IncV4 K/Cg== 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=CdvIUOflYKIpzoou6WtUxcq+gVwfhVp2A4cJfb6QLOQ=; b=ZZFb/+42IC31Z2zX9elgFTkAogxrQSJbsCmC+fHCDBnAGjXt/+ifS+Xz70v9rNp2Iw rfeMray5o+wJzRioFPPe2MhBf/059YYwLBQQTjrb9A7jCYbAoqTAhhiytAIzhi73HZCV tS74Pj6mPgihlkP/7CoPRnpqqmdngwatQCaQhtbj2jCDMDqysKSMGBXgMjqfyUQZRwC6 YpR9ghZvYOlZVkQk3anWsI7Xc/u63JmIfyCAyhvnz0W4tOUatlhyqiDd52W1k5/GpPNS YxvDLYOZrMRNrorL3+XYGOi4Qk2ZP64cxELLje8o8EKeCIAIfYLofODGp4jtbXVwwxLC tB6Q== X-Gm-Message-State: AOAM531EKe1xqvLqiiR92qLO9JxrHzHGhZPktBUo82XW7l259WBpa0vc IpQM4/Ub4u6vb9ZmBSFOlpN0jcw+LGPi X-Received: by 2002:a25:aa70:: with SMTP id s103mr48095292ybi.492.1593659751405; Wed, 01 Jul 2020 20:15:51 -0700 (PDT) Date: Thu, 2 Jul 2020 13:15:22 +1000 In-Reply-To: <20200702031525.2662441-1-amistry@google.com> Message-Id: <20200702131350.1.I96e67ab7b4568287eb939e8a572cbc03e87f1aa0@changeid> Mime-Version: 1.0 References: <20200702031525.2662441-1-amistry@google.com> X-Mailer: git-send-email 2.27.0.212.ge8ba1cc988-goog Subject: [PATCH 1/4] regulator: da9211: Move buck modes into header file From: Anand K Mistry To: linux-mediatek@lists.infradead.org Cc: hsinyi@chromium.org, drinkcat@chromium.org, Anand K Mistry , Liam Girdwood , Mark Brown , Rob Herring , Support Opensource , devicetree@vger.kernel.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 --- drivers/regulator/da9211-regulator.c | 5 +---- .../dt-bindings/regulator/dlg,da9211-regulator.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 include/dt-bindings/regulator/dlg,da9211-regulator.h diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index 2ea4362ffa5c..1f9b75b41346 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator/da9211-regulator.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "da9211-regulator.h" /* DEVICE IDs */ @@ -24,10 +25,6 @@ #define DA9213_DEVICE_ID 0x23 #define DA9215_DEVICE_ID 0x24 -#define DA9211_BUCK_MODE_SLEEP 1 -#define DA9211_BUCK_MODE_SYNC 2 -#define DA9211_BUCK_MODE_AUTO 3 - /* DA9211 REGULATOR IDs */ #define DA9211_ID_BUCKA 0 #define DA9211_ID_BUCKB 1 diff --git a/include/dt-bindings/regulator/dlg,da9211-regulator.h b/include/dt-bindings/regulator/dlg,da9211-regulator.h new file mode 100644 index 000000000000..cdce2d54c8ba --- /dev/null +++ b/include/dt-bindings/regulator/dlg,da9211-regulator.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DT_BINDINGS_REGULATOR_DLG_DA9211_H +#define _DT_BINDINGS_REGULATOR_DLG_DA9211_H + +/* + * These buck mode constants may be used to specify values in device tree + * properties (e.g. regulator-initial-mode, regulator-allowed-modes). + * A description of the following modes is in the manufacturers datasheet. + */ + +#define DA9211_BUCK_MODE_SLEEP 1 +#define DA9211_BUCK_MODE_SYNC 2 +#define DA9211_BUCK_MODE_AUTO 3 + +#endif -- 2.27.0.212.ge8ba1cc988-goog