All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] fsl_pmic.h: add regulator mode 0 and 1 bits
Date: Tue, 17 Jan 2012 11:12:10 +0100	[thread overview]
Message-ID: <4F15497A.1060503@denx.de> (raw)
In-Reply-To: <1326712216-11197-2-git-send-email-helmut.raiger@hale.at>

On 16/01/2012 12:10, Helmut Raiger wrote:
> Add bit definitions for register 32 and 33 of Freescale PMIC.
> 
> Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
> ---
>  include/fsl_pmic.h |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 52 insertions(+), 0 deletions(-)
> 

Hi Helmut,

> diff --git a/include/fsl_pmic.h b/include/fsl_pmic.h
> index 742f2e1..17e7b82 100644
> --- a/include/fsl_pmic.h
> +++ b/include/fsl_pmic.h
> @@ -102,6 +102,58 @@ enum {
>  	PMIC_NUM_OF_REGS,
>  };
>  
> +/* REG_MODE_0 */
> +#define VAUDIOEN	(1 << 0)
> +#define VAUDIOSTBY	(1 << 1)

No, this is not correct. I explain it better. Freescale's PMIC that we
currently support have the same register names, but their layout
differs. What you are defining here is valid for the MC13783, but
conflicts with the mc13892.

See the comments inside fsl_pmic.h:

/*
 * The registers of different PMIC has the same meaning
 * but the bit positions of the fields can differ or
 * some fields has a meaning only on some devices.
 * You have to check with the internal SPI bitmap
 * (see Freescale Documentation) to set the registers
 * for the device you are using
 */

I checked the REG_0 registers in both PMIC and they differ. The way to
do is to have a pmic specific header file with the bit definitions. We
have already include/mc13892.h, and you can add include/mc13783.h with
the constants you need.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de
=====================================================================

  reply	other threads:[~2012-01-17 10:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 16:45 [U-Boot] [PATCH] mmc: access mxcmmc from mx31 boards Helmut Raiger
2011-10-25  9:43 ` Stefano Babic
2011-10-27 12:19   ` [U-Boot] [PATCH V2] " Helmut Raiger
2011-11-02  7:02     ` [U-Boot] [PATCH V2] imx: " Helmut Raiger
2011-11-07  7:59       ` Helmut Raiger
2011-11-07  9:04         ` Stefano Babic
2011-11-14  9:06           ` Helmut Raiger
2011-11-14 10:55             ` Stefano Babic
2011-11-14 15:37               ` Helmut Raiger
2012-01-11 13:59               ` [U-Boot] [PATCH V3] " Helmut Raiger
2012-01-11 13:59                 ` [U-Boot] [PATCH 1/2] " Helmut Raiger
2012-01-13  8:28                   ` Stefano Babic
2012-01-17  9:56                   ` Stefano Babic
2012-01-11 13:59                 ` [U-Boot] [PATCH 2/2] tt01: add MMC support Helmut Raiger
2012-01-12 10:15                   ` [U-Boot] [PATCH 2/2] imx: " Helmut Raiger
2012-01-13  8:32                   ` [U-Boot] [PATCH 2/2] " Stefano Babic
2012-01-16 11:10                     ` [U-Boot] [PATCH V2] " Helmut Raiger
2012-01-16 11:10                       ` [U-Boot] [PATCH 1/2] fsl_pmic.h: add regulator mode 0 and 1 bits Helmut Raiger
2012-01-17 10:12                         ` Stefano Babic [this message]
2012-01-18 10:41                           ` [U-Boot] [PATCH V3 1/2] mc13783.h: create and add regulator mode 0 and 1 Helmut Raiger
2012-01-18 10:41                             ` [U-Boot] [PATCH V3 2/2] tt01: add MMC support Helmut Raiger
2012-01-18 12:37                               ` Stefano Babic
2012-01-19  7:21                                 ` Helmut Raiger
2012-01-19  7:27                                   ` [U-Boot] [PATCH V4] " Helmut Raiger
2012-01-30 14:35                                     ` Stefano Babic
2012-01-30 14:38                             ` [U-Boot] [PATCH V3 1/2] mc13783.h: create and add regulator mode 0 and 1 Stefano Babic
2012-01-16 11:10                       ` [U-Boot] [PATCH 2/2] tt01: add MMC support Helmut Raiger

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=4F15497A.1060503@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.