Skip to contentSkip to conversation

regulator: new drivers for AD5398 and AD5821

PATCH Superseded sonic zhang 2 participants 3 messages Jun 4, 2010

Subsystems (2)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 regulator: new drivers for AD5398 and AD5821

Quoted 1 line

From 32646efc2e7fb19945a10ad3f1172d6f751186b8 Mon Sep 17 00:00:00 2001

From: Sonic Zhang <[email protected]>
Date: Fri, 4 Jun 2010 11:46:04 +0800
Subject: [PATCH v5] regulator: new drivers for AD5398 and AD5821

The AD5398 and AD5821 are single 10-bit DAC with 120 mA output current sink capability. They feature an internal reference and operates from a single 2.7 V to 5.5 V supply.

This driver supports both the AD5398 and the AD5821. It adapts into the voltage and current framework.

---
 drivers/regulator/Kconfig  |    6 +
 drivers/regulator/Makefile |    1 +
 drivers/regulator/ad5398.c |  288 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 295 insertions(+), 0 deletions(-)
 create mode 100644 drivers/regulator/ad5398.c
drivers/regulator/Kconfig +6 -0
index 04f2e08..679ea37 100644
@@ -201,5 +201,11 @@ config REGULATOR_88PM8607
 	help
 	  This driver supports 88PM8607 voltage regulator chips.
 
+config REGULATOR_AD5398
+	tristate "Analog Devices AD5398/AD5821 regulators"
+	depends on I2C
+	help
+	  This driver supports AD5398 and AD5821 current regulator chips.
+	  If building into module, its name is ad5398.ko.
 endif
 
drivers/regulator/Makefile +1 -0
index 4e7feec..c256668 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
 obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
 obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o
 
+obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
 obj-$(CONFIG_REGULATOR_BQ24022) += bq24022.o
 obj-$(CONFIG_REGULATOR_DUMMY) += dummy.o
 obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
drivers/regulator/ad5398.c new file +288 -0

288 lines not on this page · raw message

Signature · 1 line
1.6.0
#1 lore raw

drivers/regulator/ad5398.c line 187

Quoted 2 lines · sonic zhang
drivers/regulator/ad5398.c new file +2 -0
+static const struct regulator_ops ad5398_ops = {
+static const struct regulator_desc ad5398_reg = {

when i said these should be const, this isnt something that can start with the drivers. the core needs to be fixed first. otherwise these simply trigger warnings.
-mike

#2 lore raw
Quoted 9 lines · Mike Frysinger

drivers/regulator/ad5398.c line 187

Quoted 2 lines · sonic zhang
drivers/regulator/ad5398.c new file +2 -0
+static const struct regulator_ops ad5398_ops = {
+static const struct regulator_desc ad5398_reg = {

when i said these should be const, this isnt something that can start with the drivers.  the core needs to be fixed first.  otherwise these simply trigger warnings.
-mike

This is a typo error.

Sonic