Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1245837lqo; Thu, 9 May 2024 08:31:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTnQ9GrS5+LFTBl5IpYzrUA1I5O00WhWKYXcL1Oj7n7oWBEI0zhHbkGqsiOGIUscikFC+a6oxu3SCoRt+k3da6XdX1wscwqHNq9GquuQ== X-Google-Smtp-Source: AGHT+IG28E+YdgBebKhwkOOtcawoEx0mNOY2qRO+5SHC9QHVqz5UOW2bH8wM8EYdIuslLtQZYtAx X-Received: by 2002:a05:622a:2282:b0:43d:ee0c:c5d9 with SMTP id d75a77b69052e-43dee0cc885mr29125731cf.2.1715268693566; Thu, 09 May 2024 08:31:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715268693; cv=pass; d=google.com; s=arc-20160816; b=tpc+mK0F5d10aakmECV8m9e7T5D7Py54ef3AFCH8naGHhbbKPxmz88gp9xp8aQagnB J/0Bu4BN4vPlfvoxybOqI6uWHsNdlEe+g2CW4+6rYYj1tPqPCRuJzL16VE/1URjgYPwa giUqkfSJ+wGxJTZmW3u4no4QgCtJhymH2d0+TV+OZMlnwQsyfjrbqijdhUuWIZ7vg8LG a7MJMpXqBG/1vuDIW+dxM5H0iqNjbWEyaFDRfRTisPnYn62T++y9RqVbY/LucRXdO1H3 cqYQwCySqAsXZAD7ZofrBh4ZjSsANaHgXOmDhWU3YpwmCdNVmxD9A+T7pkgBoIVIZeNF d3rA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=HxSiQ8eKgW9eNu37MrTmQ2vsJIlhBo+tDCPpJVuWgR8=; fh=bVVq5CWcgA+LWEBEyZfBLuBQL3F5xEsF9KggaFFTOMs=; b=ntxxzb+cLDctqGTKDITembVkbjabwlrkqko0GwOYD4eV51RfPYe+yowVDlyZT/+3x5 U8Ipwi2wzDlbwjSwnXjBzRLbNDzwj5HKTWvK7WDcVa4l8R65S/zNR3jMa/ou7E7MgJyW mZQFi4fVtmsbcObENl7A2JFHW61iYoUuTYckA8Y19hjiW9ZIDZ9C6EinDKzsC3IH58HZ QuJAxmkHOHq556CTZwJ0k7QqFpIl4RYRLZlwhPbDhswWKSaa8KeGCsZ6Mh46ZWB2qnCb CoaBmhoY/iUdJE02VfcQ2c1x4xtyVtQvefN6MgnMdowfVttgMjUYwkgan9THwwsn1b8C sp6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FJ29uykF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df56c4ed9si15985861cf.624.2024.05.09.08.31.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 08:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FJ29uykF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3DF151C20F3C for ; Thu, 9 May 2024 15:31:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 826CC16F82F; Thu, 9 May 2024 15:31:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FJ29uykF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F34814A612; Thu, 9 May 2024 15:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715268676; cv=none; b=slm5hV+T76K1cg82AP44hjbs4goKPdN+CwPTcY7/SH1utUggX2C67l4GyAn7Ek63jq13DpNQ0UiGtyrMn3R71mmF8ERag7f/QS6qBmNkm6u8k0Co9tyH1nZ6W2JYd/Fe7kygo/yZcBVevo71WdR7AUPWNp0YzajHucBK5gMQaZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715268676; c=relaxed/simple; bh=E1T+WvvKQJ/1nv6nEvXpTe9Sga5sVZOQiVRom7AV5uQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YBLetPmD6Mm3WyT/nfvEOjriRT8hRfQqvdcKGyzv5OVwir17YMJ0nzNg+5jMKhOMSjPzgLynRvNil5gjkv20o2K3U2qkYCJrj1eFRUkS/MgQPh0z03B8Zg50XEz5y5QFtXO/xMV6QT0viB7DVM8+SCm92BV/egCnETTcUIwSX7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FJ29uykF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 233D4C2BD11; Thu, 9 May 2024 15:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715268676; bh=E1T+WvvKQJ/1nv6nEvXpTe9Sga5sVZOQiVRom7AV5uQ=; h=From:To:Cc:Subject:Date:From; b=FJ29uykFQL3ACOuqQURRxlGidNafj5oQb6JnqYrJTZ+igXr14m9qaQcXnV8r2PpuI 8oKsmxqeElmZVd/V+fA7Z812L+J5qPfm0NQwhr/c8xXZ2O47DO7j1sfZAkBjf7h2iw 1i+ci9rIy2DTaNHJsSwTFaIkZQ85dZC2vxbThxa3fvXjqfd8Cj6+Ug1fUYe1rciV7g mur4fq7pC1V8Fu2Wt9/iKO4JnGgmNn7vWmaOK45IuKSBMj9KbsAa7lA5GS5rbfyHm6 E5Z7X4fBFvXI429BaS5k7zR5gPvmK5Y4qpq08TRMQcPH1sep/bVlCQXvAHmCUMG5eI TQop7fnXwcFrQ== Received: by wens.tw (Postfix, from userid 1000) id 9E69B5FB60; Thu, 9 May 2024 23:31:13 +0800 (CST) From: Chen-Yu Tsai To: Mark Brown Cc: Chen-Yu Tsai , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jernej Skrabec , Samuel Holland , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH v6 0/2] regulator: sun20i: Add Allwinner D1 LDOs driver Date: Thu, 9 May 2024 23:31:05 +0800 Message-Id: <20240509153107.438220-1-wens@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chen-Yu Tsai Hi, This is v6 of the Allwinner D1 LDO driver series, separated by subsystem. I've picked up this work from Samuel. This part contains just the regulator driver bits. The sunxi SRAM binding part will be sent out after the merge window due to a conflict in next. Unlike what the original cover letter mentioned, it is perfectly OK to merge this part separately. The SRAM driver changes were already merged some time ago, and the SRAM bindings depend on the regulator bindings, not the other way around. Changes in v6: - Include linux/of.h in the regulator driver to fix the "implicit declaration of function of_'device_get_match_data'" and unknown type 'struct of_device_id' errors. Original cover letter: This series adds the binding and driver for one of the two pairs of LDOs inside the Allwinner D1 SoC. I am splitting up the two pairs of LDOs to unblock merging the SoC devicetree; the analog LDOs depend on the audio codec binding, but they are not required to boot. A binding and driver change is required for the SRAM controller, to accept the regulators device as its child node. The example for the regulator device binding is in SRAM controller binding document, per Rob's request to keep MFD examples in one place. Because of this, at least the first 3 patches need to be taken together through the regulator tree, though it should be fine to merge the whole series that way. Changes in v5: - Correct the voltage calculation for the non-linearity around 1.6 V. Changes in v4: - Fix the order of the maintainer/description sections - Replace unevaluatedProperties with "additionalProperties: false" - Drop the analog LDOs until the codec binding is ready - Drop the analog LDOs until the codec binding is ready - Remove unevaluatedProperties from regulators schema reference - Check the compatible string instead of the node name Changes in v3: - Add "reg" property to bindings - Add "unevaluatedProperties: true" to regulator nodes - Minor changes to regulator node name patterns - Remove system-ldos example (now added in the parent binding) - Adjust control flow in sun20i_regulator_get_regmap() for clarity - Require the regulators node to have a unit address - Reference the regulator schema from the SRAM controller schema - Move the system LDOs example to the SRAM controller schema - Reorder the patches so the example passes validation Changes in v2: - Remove syscon property from bindings - Update binding examples to fix warnings and provide context - Use decimal numbers for .n_voltages instead of field widths - Get the regmap from the parent device instead of a property/phandle Samuel Holland (2): regulator: dt-bindings: Add Allwinner D1 system LDOs regulator: sun20i: Add Allwinner D1 LDOs driver .../allwinner,sun20i-d1-system-ldos.yaml | 37 +++++ drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/sun20i-regulator.c | 157 ++++++++++++++++++ 4 files changed, 203 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-system-ldos.yaml create mode 100644 drivers/regulator/sun20i-regulator.c -- 2.39.2