Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp287108lqh; Mon, 6 May 2024 21:14:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0i5Gp/oUcCFmZPkvu4obAYnoMPLU7vqFBvu0lvupxb9gYvjU7N8ndrVdo1z/CgT4kJvEoy3bCqYNMWDKk4LPotpFceIZGidGVSribKA== X-Google-Smtp-Source: AGHT+IH43OWCpZhbedegIdzqIQQtY961bvQcc2FAwij5na2QimTbP0AsBbqUklPREAOX40q5jgfo X-Received: by 2002:a17:902:f681:b0:1e2:bb09:6270 with SMTP id l1-20020a170902f68100b001e2bb096270mr2277663plg.28.1715055247382; Mon, 06 May 2024 21:14:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715055247; cv=pass; d=google.com; s=arc-20160816; b=VAVMrUGWr4S+yjXVRLvkczvSZundRUtLIrYOqI0PmsBediST7KTtagbsNQJ7IwQB8m gwuFAKHewiEUG3KlzB7D50qc2gJWbveigA9ol+ir8FuC1lfXC6bKg79us5nYfWGxwZ4a mWvuzZIIDBNHw9EY0dTDD9L/BZ2g0WWCTjp0ZcLn8MBm26k5kdZyR/KI4XtvhzdNNunm azrt39XoF8MD0ifNlX3ceBqofc8wZ6Yb7YDlcT+iP3JvnZMXx2+Cj25gm4u/RMB2ozPr /iosVXpEuCP0O/HEbJUGm2U5Ua4rxkaeW4rDoHpJPyJMAmLccn3sZxQFT5nYo3RST+RV FrbQ== 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=6jdM8XclfaWIkdL4gQ5GYGA0vfhTHXten0JTYqFl080=; fh=bVVq5CWcgA+LWEBEyZfBLuBQL3F5xEsF9KggaFFTOMs=; b=Q3WJIb08izfuvStHPPxmzc17svoPFk5Q9MEzmitI+RBLP/pQmnUpdAV9akKMzLkZ7N PBw1J1jG3XS+URV83rnHS/sUauobNKNHESWfHXHkP5BFpQIkJ144+zYnXDD3Zi4aNfI4 35ix6ho8kTQjkn0VtOXg8MNkaeZJh8EfEPaLUoUj8WuswnIwiF3DGuj2sRscpLNpJRhN +FRoEfj3+o0iDNfnBXl6DyGBu7kPILPUWuhPp9difiz4FVUswa2xZGMeoDij0T10nPgR gkmUQhfec4Qlnp1GWG5k3VqYCLmiq+8dOVVkMvW2zoJi/UbRFJC3bBXt7dgStN2VZf6R ylEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rSllRN4Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j5-20020a170902758500b001e3d67e06easi9401995pll.419.2024.05.06.21.14.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 21:14:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rSllRN4Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170638-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DC11F284F7A for ; Tue, 7 May 2024 04:14:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21F7754BCB; Tue, 7 May 2024 04:13:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rSllRN4Q" 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 3282B54911; Tue, 7 May 2024 04:13:51 +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=1715055231; cv=none; b=KQ30GjwvcEs/KvTy6J1mRfO0Qopilh94EeriZ/cz/zA/v7EenX4iVX3q//8iT5KU81FDFY2frn4is9WYXns/XCKvzbhQMP2x4j/X180xYG3JlH4hy+NxHq40gQ+XN5cgD0MCSrhMa9C6GF7G6t0lLXRdqHDWlTONRW+XObCYseI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715055231; c=relaxed/simple; bh=DKpFFQJLudXl5q5EDowTbB8AIlbECgKiTc8spqPSV7w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=W1TCLpjvL6MOuhIwumeXcmrjrURnv74HPrNcofnSFm6XE5brFPIVZutikKPDbwTN47zg8q1OIk1OSqYBTonoHzXIHxzNl2oBQ7LRPLb69VqJtcR4D3x2Q7oBoQuDNSzIry5Q9jC5iNopsutrlHrXBSt824zo85O3u0aG/Pkj6w0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rSllRN4Q; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF888C2BBFC; Tue, 7 May 2024 04:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715055230; bh=DKpFFQJLudXl5q5EDowTbB8AIlbECgKiTc8spqPSV7w=; h=From:To:Cc:Subject:Date:From; b=rSllRN4QHUKvRMyoS8yZW0F2AwQZhSttdbSiC9Q22IV+Lm/n2D6IjNBVOp8oyFV+G b4Azf7LNAeFS553mVgf4vI+9ZBVPLQ5ynoT8jCv/5+CBQgskl5a7OGVDHzc0EEzIof yWAhwSq+YPNqgD6kvKp5fD12VCCv3Hljlpg8XkSXU46/EnnkpSCrqYyfVQZx3S34tY LV+QagkNJ47NCBvXoB3MIsjo8mOc/XJwZCFWTNKWBzeWnnvKKoKfhC9wA+HStz9bLZ JOXz9jbeP9v9/AQ6kEWBVGdwa+mk5YCm90/zIsxgaUg8gHtPsX4mKfCFrzlT6l+IxN y7q6x1bzMXRKQ== Received: by wens.tw (Postfix, from userid 1000) id 3DF815FE3B; Tue, 7 May 2024 12:13:48 +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 RESEND v5 0/2] regulator: sun20i: Add Allwinner D1 LDOs driver Date: Tue, 7 May 2024 12:13:41 +0800 Message-Id: <20240507041343.272569-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 a resend of the Allwinner D1 LDO driver series, separated by subsystem. 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. 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 | 156 ++++++++++++++++++ 4 files changed, 202 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