Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp173092ybg; Thu, 11 Jun 2020 21:07:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymCtDgDE5qv+CSKFLet5MGIKo1/2hLynC5hZdfZL+A86+Py+84KG32T7S/AMhDzs1SBTlh X-Received: by 2002:aa7:d359:: with SMTP id m25mr9476779edr.365.1591934877259; Thu, 11 Jun 2020 21:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591934877; cv=none; d=google.com; s=arc-20160816; b=eFnsAtPdDNl6He9ZhEYcNFvLJATeBsoSV7gKOnIOmhplMHnmdKbCkeXkoBSFuPmzoY QYqLP8kfGEpvuSJCCyXKwiB1SYmZgPJ5AW5ikuwBujchX8FraSUCDgSVpETtGXWtZis1 HZgGYmYbRVW5DkAf5FYppAzxOloZnU3snonCfxd5vW0XQ7fTaQiLmgfPAM+qoA+E1q05 lqNllULSe0MCL6eskrgUsxQTnXnhL2q4mLv5oICuc0QsXiRpW3sNXjAJlFY8Taize+Wm 1jtzd0DXbLn3s8GKSK7+QJRc8LC+u84g94B4q0JY9v4Tdwt/Lt9UStH7S4T9fYczJ9jD 3KEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=85+tXbAucR1bugiRvSByYbhr5wkv6IY9XidvyzSLZWs=; b=TFXahW/B829Idx9/P5ZTIpe4bGfv45RLRy297Mxb+ZtkNRI2GTeOzmWCbv/kLS981w FafkD2fZUxmBuX3W4eM04a5gFGLsW9+s2F5fzM1Q82Iu+1xR4IRHNXzhVcA5aHkvouf8 vNsOPYBsi4RB7q/fF/JU53faQwLM3x3I6jPMGyKVX2COtr0J/nkeARGMdH4s8XlUTXHO npSuDgX8aXmpiihH/uyUrjDfWx1QfF9Bo+daxj9n5y2kLIrdhc9cPrbG02vqcbLuxk0T Dz/hsK7R4uubF+wBzrZ4Q3QAcBekMrly1PSBCS2P7TnPhzhm/0cWwpnvIT3aeKFLO0jU iTkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=WlHj4pso; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si2829503edm.343.2020.06.11.21.07.31; Thu, 11 Jun 2020 21:07:57 -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=fail header.i=@chromium.org header.s=google header.b=WlHj4pso; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbgFLEFe (ORCPT + 99 others); Fri, 12 Jun 2020 00:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgFLEFd (ORCPT ); Fri, 12 Jun 2020 00:05:33 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8545C08C5C1 for ; Thu, 11 Jun 2020 21:05:33 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id z63so2762787pfb.1 for ; Thu, 11 Jun 2020 21:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=85+tXbAucR1bugiRvSByYbhr5wkv6IY9XidvyzSLZWs=; b=WlHj4psoyA9tlTc6VPj2OiMWyd7DySl+1Z8xyv0iR1SiLd1PbPGGVsJb2TFJPlVZ3m IWfZzbdOEMI1IWfOqVORgs9ceYRH8G+3IXoeLFKx88oj+vLY97Swe+ZEQpRyl33WTqJ4 vfEBmSbEkYJpbJXmQdiXcnfIx59jadys1G2fo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=85+tXbAucR1bugiRvSByYbhr5wkv6IY9XidvyzSLZWs=; b=m7pJbGTrHchgnJnH9fNCxVdCeO8Cj6LWwNfy3oGIxve4dI4ivJQQ1cq6tXly/eDQPe Aub1aNj88S+/q1Zf2whqAQNqncKoU7UU6dcC+FkVOJ4hcPk6MIlF11Tl7nz45h4hqMsh l+6WpEikmLeREzY02YRMn1UtYKzJbBuqdTrAPvpXWvJXtOWptm4MTKjgoffS9b1TOZ/w qRvrSoxm+sYGxlQbpdk+tu4pHDwKxxqL1EiDlWoXYhdTUR4rt7g09kin5GdWnHXuiutq 7NrBCmGLXge/Enf5wuLA67rK9HHt0EmreFgmWutoJuFDR2OtAqfXhwomZyFXxs6mQExh 13oQ== X-Gm-Message-State: AOAM533r1GXeb9N8+HQ/fi5Nz95sRiZ5vjgtLHO5CbWuYgaH5jMB9z40 ZEDHcSzwQ9fVvCv59GY37i3aFw== X-Received: by 2002:a62:7a4a:: with SMTP id v71mr10361639pfc.35.1591934733183; Thu, 11 Jun 2020 21:05:33 -0700 (PDT) Received: from pihsun-glaptop.lan (180-176-97-18.dynamic.kbronet.com.tw. [180.176.97.18]) by smtp.googlemail.com with ESMTPSA id u7sm4686983pfu.162.2020.06.11.21.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 21:05:32 -0700 (PDT) From: Pi-Hsun Shih Cc: Pi-Hsun Shih , Nicolas Boichat , Benson Leung , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), Enric Balletbo i Serra , Guenter Roeck , Lee Jones , linux-kernel@vger.kernel.org (open list), Mark Brown , Tzung-Bi Shih , Yicheng Li Subject: [PATCH v6 0/3] Add support for voltage regulator on ChromeOS EC. Date: Fri, 12 Jun 2020 12:05:17 +0800 Message-Id: <20200612040526.192878-1-pihsun@chromium.org> X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for controlling voltage regulator that is connected and controlled by ChromeOS EC. Kernel controls these regulators through newly added EC host commands. Changes from v5: * Move new host command to a separate patch. * Use devm_regulator_register. * Address review comments. Changes from v4: * Change compatible name from regulator-cros-ec to cros-ec-regulator. Changes from v3: * Fix dt bindings file name. * Remove check around CONFIG_OF in driver. * Add new host commands to cros_ec_trace. * Address review comments. Changes from v2: * Add 'depends on OF' to Kconfig. * Add Kconfig description about compiling as module. Changes from v1: * Change compatible string to google,regulator-cros-ec. * Use reg property in device tree. * Change license for dt binding according to checkpatch.pl. * Address comments on code styles. Pi-Hsun Shih (3): dt-bindings: regulator: Add DT binding for cros-ec-regulator platform/chrome: cros_ec: Add command for regulator control. regulator: Add driver for cros-ec-regulator .../regulator/google,cros-ec-regulator.yaml | 51 ++++ drivers/platform/chrome/cros_ec_trace.c | 5 + drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/cros-ec-regulator.c | 257 ++++++++++++++++++ .../linux/platform_data/cros_ec_commands.h | 82 ++++++ 6 files changed, 406 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml create mode 100644 drivers/regulator/cros-ec-regulator.c base-commit: b791d1bdf9212d944d749a5c7ff6febdba241771 -- 2.27.0.290.gba653c62da-goog