From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 831B525A643 for ; Tue, 28 Jan 2025 17:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738085512; cv=none; b=bzrIXJK5tNt9ZR5QF/eFgm/Ke8d26LznyjA5OFUgNZaxNetrWeQYVwkB4MHniKmYFrwpGHZX4HLoijBTi7yYwdvlo16WGXvMXyif7QcQOC6LQCz0cRiLuWhWT8Ta0XktNS8mzlY8Cagb6QuaEwAP9cbnM7bGJGgcEQgMbQ/gyqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738085512; c=relaxed/simple; bh=qTMI6a1FT0BbzlNtDDjLRDWris5eKGH8QxTu7ZrR6P8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DblQ6d/HlULhulf/R5ME2KLN9p+zw22+8fOw+YL6jtX2nqEhfJt+5CJ/SL1NQuDtR0uX9luw9OqJFtPscvPWl2JI77UVOR5WGwkRUZeIBqeIAwnO+31drRiopjsLhgHI2Z+a3pCOEMiewTFSRsau/QieJYUlfuwjhsPPgJdoj50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=gBKYPUJw; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gBKYPUJw" Received: from isaac-ThinkPad-T16-Gen-2.lan (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 01343496; Tue, 28 Jan 2025 18:30:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1738085441; bh=qTMI6a1FT0BbzlNtDDjLRDWris5eKGH8QxTu7ZrR6P8=; h=From:To:Cc:Subject:Date:From; b=gBKYPUJwryiX+zmr4m/mkkHVpEsar+EFbCCjoMWmTJBrr3ftsrMfWyz55Zfz1J1SV NPddfQNJIuu4J8QTu2Ut4Pqigo3PYAsdqAEL1rHNrhgPxZOCJd26jpgzqg1mqyzkZ6 CA+GTUfEeCbgETQExeZEUeVq5eDaXNuFdZ2JiAZI= From: Isaac Scott To: michael.hennerich@analog.com Cc: lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, Isaac Scott Subject: [PATCH v2 0/3] regulator: Add device tree support to AD5398 Date: Tue, 28 Jan 2025 17:31:40 +0000 Message-ID: <20250128173143.959600-1-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The AD5398 is a DAC that can be used to control current flow in circuits in a wide variety of applications such as motor control, or in my case, LED control. I found when working with the current driver that it did not work for my use case. It transpired that it only had support for platform_data, and didn't appear to be correctly implemented according to the datasheet, which can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/ad5398.pdf One example of this is the "soft power-down" bit being referred to in the driver as simply "enable", which gives the impression that the setting that bit will allow current through the regulator, which it does not. This series allows the regulator to be given its constraints via the device tree, and makes the function of the enable register much more obvious. Best wishes, Isaac Tested on v6.13 (origin/master) Isaac Scott (3): regulator: ad5398: change enable bit name to improve readibility RFC: regulator: ad5398: Change selector division calculation regulator: ad5398: Add device tree support drivers/regulator/ad5398.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) -- 2.43.0