* [PATCH 2/8] Regulator: Adding header file for TPS65023
@ 2009-08-07 15:25 Anuj Aggarwal
2009-08-07 15:55 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Anuj Aggarwal @ 2009-08-07 15:25 UTC (permalink / raw)
To: broonie, lrg, linux-omap, linux-kernel; +Cc: Anuj Aggarwal
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
---
include/linux/regulator/tps65023.h | 74 ++++++++++++++++++++++++++++++++++++
1 files changed, 74 insertions(+), 0 deletions(-)
create mode 100644 include/linux/regulator/tps65023.h
diff --git a/include/linux/regulator/tps65023.h b/include/linux/regulator/tps65023.h
new file mode 100644
index 0000000..6afba6c
--- /dev/null
+++ b/include/linux/regulator/tps65023.h
@@ -0,0 +1,74 @@
+/*
+ * tps65023.h
+ *
+ * Header file for TI TPS65023 Regulator
+ *
+ * Copyright (C) 2009 Texas Instrument Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+/* Register definitions */
+#define TPS65023_REG_VERSION 0
+#define TPS65023_REG_PGOODZ 1
+#define TPS65023_REG_MASK 2
+#define TPS65023_REG_REG_CTRL 3
+#define TPS65023_REG_CON_CTRL 4
+#define TPS65023_REG_CON_CTRL2 5
+#define TPS65023_REG_DEF_CORE 6
+#define TPS65023_REG_DEFSLEW 7
+#define TPS65023_REG_LDO_CTRL 8
+
+/* PGOODZ bitfields */
+#define TPS65023_PGOODZ_PWRFAILZ BIT(7)
+#define TPS65023_PGOODZ_LOWBATTZ BIT(6)
+#define TPS65023_PGOODZ_VDCDC1 BIT(5)
+#define TPS65023_PGOODZ_VDCDC2 BIT(4)
+#define TPS65023_PGOODZ_VDCDC3 BIT(3)
+#define TPS65023_PGOODZ_LDO2 BIT(2)
+#define TPS65023_PGOODZ_LDO1 BIT(1)
+
+/* MASK bitfields */
+#define TPS65023_MASK_PWRFAILZ BIT(7)
+#define TPS65023_MASK_LOWBATTZ BIT(6)
+#define TPS65023_MASK_VDCDC1 BIT(5)
+#define TPS65023_MASK_VDCDC2 BIT(4)
+#define TPS65023_MASK_VDCDC3 BIT(3)
+#define TPS65023_MASK_LDO2 BIT(2)
+#define TPS65023_MASK_LDO1 BIT(1)
+
+/* REG_CTRL bitfields */
+#define TPS65023_REG_CTRL_VDCDC1_EN BIT(5)
+#define TPS65023_REG_CTRL_VDCDC2_EN BIT(4)
+#define TPS65023_REG_CTRL_VDCDC3_EN BIT(3)
+#define TPS65023_REG_CTRL_LDO2_EN BIT(2)
+#define TPS65023_REG_CTRL_LDO1_EN BIT(1)
+
+/* LDO_CTRL bitfields */
+#define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4)
+#define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4))
+
+/* Number of step-down converters available */
+#define TPS65023_NUM_DCDC 3
+/* Number of LDO voltage regulators available */
+#define TPS65023_NUM_LDO 2
+/* Number of total regulators available */
+#define TPS65023_NUM_REGULATOR (TPS65023_NUM_DCDC + TPS65023_NUM_LDO)
+
+/* DCDC's */
+#define TPS65023_DCDC_1 0
+#define TPS65023_DCDC_2 1
+#define TPS65023_DCDC_3 2
+/* LDOs */
+#define TPS65023_LDO_1 3
+#define TPS65023_LDO_2 4
+
+#define TPS65023_MAX_REG_ID TPS65023_LDO_2
+
--
1.6.2.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/8] Regulator: Adding header file for TPS65023
2009-08-07 15:25 [PATCH 2/8] Regulator: Adding header file for TPS65023 Anuj Aggarwal
@ 2009-08-07 15:55 ` Mark Brown
2009-08-07 20:25 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2009-08-07 15:55 UTC (permalink / raw)
To: Anuj Aggarwal; +Cc: lrg, linux-omap, linux-kernel
On Fri, Aug 07, 2009 at 08:55:36PM +0530, Anuj Aggarwal wrote:
This is OK but since you'll need to resubmit anyway it might be nice to
consider moving the register & bitfield definitions into the driver file
since they can't be used by any other code.
> +/* DCDC's */
Extra ' here :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/8] Regulator: Adding header file for TPS65023
2009-08-07 15:55 ` Mark Brown
@ 2009-08-07 20:25 ` Felipe Balbi
0 siblings, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2009-08-07 20:25 UTC (permalink / raw)
To: ext Mark Brown
Cc: Anuj Aggarwal, lrg@slimlogic.co.uk, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-i2c
On Fri, Aug 07, 2009 at 05:55:58PM +0200, ext Mark Brown wrote:
> On Fri, Aug 07, 2009 at 08:55:36PM +0530, Anuj Aggarwal wrote:
>
> This is OK but since you'll need to resubmit anyway it might be nice to
> consider moving the register & bitfield definitions into the driver file
> since they can't be used by any other code.
>
> > +/* DCDC's */
>
> Extra ' here :)
I agree, there shouldn't be need for this file.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
balbi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-07 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-07 15:25 [PATCH 2/8] Regulator: Adding header file for TPS65023 Anuj Aggarwal
2009-08-07 15:55 ` Mark Brown
2009-08-07 20:25 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox