Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1128080ybg; Thu, 11 Jun 2020 01:28:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl6YGIPHx095Ko6nVgJesJca9otWn7JooOiXLjiYxQnivH/3yG8ltX5WOZ0wlv6XsUoEuq X-Received: by 2002:a05:6402:1750:: with SMTP id v16mr6188386edx.137.1591864086535; Thu, 11 Jun 2020 01:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591864086; cv=none; d=google.com; s=arc-20160816; b=XdnwK7/VYYqEM101MGnNgYvczCJI0kyVBuapdPduf1DX7YHAMmgiyxaHra5kkfDgiL OzgRTafmrB3f9xyIZNDRu/lhMj/CW6Qra2kPX11ElTWf+SuJV6P5Qy8UCtKc0tPGocmh tezbIgsD5pkhFELY4mQtvFvNiCUi7XPS5OLvL1WAwjbgzizrjbivoLwJNoKPYpviDos2 KuZBH1WehgbU9D3DSviEA1wD8eYEp/X9OVaKbTct5VYEJeYey/e2vtZZtJ7NSrr3HBcm G1dIGw1VvDOk579RyFvELcHAE+NpYrYUjWTQxNJcV7fCz4LZSFPdoaWXaP7bAeVt2E0j LXsg== 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=VcdvgMi0Xcc7Ab0dGvWFdpG5J1Q/LouhVGvMRTvGq+M=; b=DAiIoy/hHp5ik8jn1cefg15ZXhn1AAgwTMDKyDDTSFMWNQn3XE6slqX1uUiog/UlqU BOPG1ap8uu6gxISFbuyXSr37GHGbOJJkQuktB6RRxZqd/DVuPy13J21fu2Fnq93RQLt7 rkDpnmmwdP2cjSfA0ZSYAS7MZbFOiqIGkIBKjLhja59GzZjabU/ykiKY5oggRP3Q/87l NTeYdnUPnaay/x5s/gfQSAYFEPRrdi2mJKqaF+EyQiGTyR87P8HrqUbF6MCLcviyntgS EWXn3v7cSDTLyWfFhGAlgeQSLu2NW6ZabwHryq/McJb+DhZwq78RGAuDu1RVd3QGs05z NKfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=AW8zZuny; 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 lj21si1601114ejb.324.2020.06.11.01.27.44; Thu, 11 Jun 2020 01:28:06 -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=AW8zZuny; 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 S1726783AbgFKIZw (ORCPT + 99 others); Thu, 11 Jun 2020 04:25:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgFKIZv (ORCPT ); Thu, 11 Jun 2020 04:25:51 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53F30C08C5C1 for ; Thu, 11 Jun 2020 01:25:51 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id 185so2234784pgb.10 for ; Thu, 11 Jun 2020 01:25:51 -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=VcdvgMi0Xcc7Ab0dGvWFdpG5J1Q/LouhVGvMRTvGq+M=; b=AW8zZunyFOy7ogqrnyoJDLBKiXbpoHHaT2rDKSXg5N31yrBfMQpcm+3pIV0C0rdNRT YVCKQWdblJ7ElB+Dd91WiDFq5ctI7j7em6PDJMrgAUqQP11okcZU++NIjP5yQnJgA6GE i+9kaThIdvstFQW/MjpfOeXnVTIIOTYX5+DFU= 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=VcdvgMi0Xcc7Ab0dGvWFdpG5J1Q/LouhVGvMRTvGq+M=; b=fuSTblzWxHUshp7w5y6OS0TUmRQTfTHax6mqv3rWoKlWjt9gCECwOso+UskHiBXVFb QnPPGOPREC5cMNOgfrE/0ShSdceuV/aDSy/UJ5qawbm3PQPTXKKEhLAUv6mss0o+0Lj8 Wcov1RbN1ogP955L8hhCv7I6bDAeg522W40H6qqGEv3PzZ4QQ99RMhwyKFdfisM+mBJV wE47HmjlbsyIG5vDPTWLho4jI13dENiz+Qtp5ON3wLXzO8gsN/nHkRZkKBCkzOyIyuMq cdRMEe+9rB3Vajx2KV2TQ2a6kMtvY45yMLFAtkl7NNlMs+jgv/esdMRgtJbKnqr2wjzz LDtA== X-Gm-Message-State: AOAM533G0MCvAJpCKolv8rhwcwKIynFsDPxu+OSTWOjx4W772bi7hFB+ 7HHnUKm8dCWc4xk2vj/18cyOzg== X-Received: by 2002:a62:1d89:: with SMTP id d131mr6179776pfd.294.1591863950760; Thu, 11 Jun 2020 01:25:50 -0700 (PDT) Received: from pihsun-glaptop.roam.corp.google.com (2001-b400-e256-fea4-a6c2-ff17-248d-0f67.emome-ip6.hinet.net. [2001:b400:e256:fea4:a6c2:ff17:248d:f67]) by smtp.googlemail.com with ESMTPSA id m5sm1994749pga.3.2020.06.11.01.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 01:25:50 -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 , Gwendal Grignou , linux-kernel@vger.kernel.org (open list), Mark Brown , Tzung-Bi Shih , Yicheng Li Subject: [PATCH v5 0/2] Add support for voltage regulator on ChromeOS EC. Date: Thu, 11 Jun 2020 16:25:35 +0800 Message-Id: <20200611082542.219516-1-pihsun@chromium.org> X-Mailer: git-send-email 2.27.0.278.ge193c7cf3a9-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 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 (2): dt-bindings: regulator: Add DT binding for cros-ec-regulator 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 | 256 ++++++++++++++++++ .../linux/platform_data/cros_ec_commands.h | 82 ++++++ 6 files changed, 405 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml create mode 100644 drivers/regulator/cros-ec-regulator.c base-commit: b29482fde649c72441d5478a4ea2c52c56d97a5e -- 2.27.0.278.ge193c7cf3a9-goog