linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@nokia.com>
To: ext Anuj Aggarwal <anuj.aggarwal@ti.com>
Cc: "broonie@sirena.org.uk" <broonie@sirena.org.uk>,
	"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH 4/8] Regulator: Adding header file for TI TPS6507x regulator driver
Date: Fri, 7 Aug 2009 23:27:51 +0300	[thread overview]
Message-ID: <20090807202751.GF9780@nokia.com> (raw)
In-Reply-To: <1249658954-10977-1-git-send-email-anuj.aggarwal@ti.com>

move this to the driver, unless any other piece of code will use it,
which seems unlikely.

On Fri, Aug 07, 2009 at 05:29:14PM +0200, ext Anuj Aggarwal wrote:
> 
> Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> ---
>  include/linux/mfd/tps6507x.h |   93 ++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 93 insertions(+), 0 deletions(-)
>  create mode 100644 include/linux/mfd/tps6507x.h
> 
> diff --git a/include/linux/mfd/tps6507x.h b/include/linux/mfd/tps6507x.h
> new file mode 100644
> index 0000000..069b02a
> --- /dev/null
> +++ b/include/linux/mfd/tps6507x.h
> @@ -0,0 +1,93 @@
> +/*
> + * tps6507x.h
> + *
> + * Header file for TI TPS6507x Regulators
> + *
> + * 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	TPS6507X_REG_PPATH1				0X01
> +#define	TPS6507X_REG_INT				0X02
> +#define	TPS6507X_REG_CHGCONFIG0				0X03
> +#define	TPS6507X_REG_CHGCONFIG1				0X04
> +#define	TPS6507X_REG_CHGCONFIG2				0X05
> +#define	TPS6507X_REG_CHGCONFIG3				0X06
> +#define	TPS6507X_REG_REG_ADCONFIG			0X07
> +#define	TPS6507X_REG_TSCMODE				0X08
> +#define	TPS6507X_REG_ADRESULT_1				0X09
> +#define	TPS6507X_REG_ADRESULT_2				0X0A
> +#define	TPS6507X_REG_PGOOD				0X0B
> +#define	TPS6507X_REG_PGOODMASK				0X0C
> +#define	TPS6507X_REG_CON_CTRL1				0X0D
> +#define	TPS6507X_REG_CON_CTRL2				0X0E
> +#define	TPS6507X_REG_CON_CTRL3				0X0F
> +#define	TPS6507X_REG_DEFDCDC1				0X10
> +#define	TPS6507X_REG_DEFDCDC2_LOW			0X11
> +#define	TPS6507X_REG_DEFDCDC2_HIGH			0X12
> +#define	TPS6507X_REG_DEFDCDC3_LOW			0X13
> +#define	TPS6507X_REG_DEFDCDC3_HIGH			0X14
> +#define	TPS6507X_REG_DEFSLEW				0X15
> +#define	TPS6507X_REG_LDO_CTRL1				0X16
> +#define	TPS6507X_REG_DEFLDO2				0X17
> +#define	TPS6507X_REG_WLED_CTRL1				0X18
> +#define	TPS6507X_REG_WLED_CTRL2				0X19
> +
> +/* CON_CTRL1 bitfields */
> +#define	TPS6507X_CON_CTRL1_DCDC1_ENABLE		BIT(4)
> +#define	TPS6507X_CON_CTRL1_DCDC2_ENABLE		BIT(3)
> +#define	TPS6507X_CON_CTRL1_DCDC3_ENABLE		BIT(2)
> +#define	TPS6507X_CON_CTRL1_LDO1_ENABLE		BIT(1)
> +#define	TPS6507X_CON_CTRL1_LDO2_ENABLE		BIT(0)
> +
> +/* DEFDCDC1 bitfields */
> +#define TPS6507X_DEFDCDC1_DCDC1_EXT_ADJ_EN	BIT(7)
> +#define TPS6507X_DEFDCDC1_DCDC1_MASK		0X3F
> +
> +/* DEFDCDC2_LOW bitfields */
> +#define TPS6507X_DEFDCDC2_LOW_DCDC2_MASK	0X3F
> +
> +/* DEFDCDC2_HIGH bitfields */
> +#define TPS6507X_DEFDCDC2_HIGH_DCDC2_MASK	0X3F
> +
> +/* DEFDCDC3_LOW bitfields */
> +#define TPS6507X_DEFDCDC3_LOW_DCDC3_MASK	0X3F
> +
> +/* DEFDCDC3_HIGH bitfields */
> +#define TPS6507X_DEFDCDC3_HIGH_DCDC3_MASK	0X3F
> +
> +/* TPS6507X_REG_LDO_CTRL1 bitfields */
> +#define TPS6507X_REG_LDO_CTRL1_LDO1_MASK	0X0F
> +
> +/* TPS6507X_REG_DEFLDO2 bitfields */
> +#define TPS6507X_REG_DEFLDO2_LDO2_MASK		0X3F
> +
> +/* VDCDC MASK */
> +#define TPS6507X_DEFDCDCX_DCDC_MASK		0X3F
> +
> +/* DCDC's */
> +#define TPS6507X_DCDC_1				0
> +#define TPS6507X_DCDC_2				1
> +#define TPS6507X_DCDC_3				2
> +/* LDOs */
> +#define TPS6507X_LDO_1				3
> +#define TPS6507X_LDO_2				4
> +
> +#define TPS6507X_MAX_REG_ID			TPS6507X_LDO_2
> +
> +/* Number of step-down converters available */
> +#define TPS6507X_NUM_DCDC			3
> +/* Number of LDO voltage regulators  available */
> +#define TPS6507X_NUM_LDO			2
> +/* Number of total regulators available */
> +#define TPS6507X_NUM_REGULATOR		(TPS6507X_NUM_DCDC + TPS6507X_NUM_LDO)
> +
> -- 
> 1.6.2.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi

           reply	other threads:[~2009-08-07 20:27 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1249658954-10977-1-git-send-email-anuj.aggarwal@ti.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090807202751.GF9780@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=anuj.aggarwal@ti.com \
    --cc=broonie@sirena.org.uk \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).