mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] mc13xxx: Added dummy definitions if CONFIG_MFD_MC13XXX is not set
Date: Mon, 23 Jul 2012 22:13:48 +0200	[thread overview]
Message-ID: <20120723201348.GE30009@pengutronix.de> (raw)
In-Reply-To: <1342846209-10461-1-git-send-email-shc_work@mail.ru>

On Sat, Jul 21, 2012 at 08:50:07AM +0400, Alexander Shiyan wrote:
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

Applied 1/3 and 3/3. Thanks

 Sascha

> ---
>  arch/arm/boards/pcm038/pcm038.c |    2 --
>  include/mfd/mc13xxx.h           |   23 ++++++++++++++++++++++-
>  2 files changed, 22 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
> index badc978..ffd8d87 100644
> --- a/arch/arm/boards/pcm038/pcm038.c
> +++ b/arch/arm/boards/pcm038/pcm038.c
> @@ -125,7 +125,6 @@ static inline uint32_t get_pll_spctl10(void)
>   */
>  static int pcm038_power_init(void)
>  {
> -#ifdef CONFIG_MFD_MC13XXX
>  	uint32_t spctl0 = get_pll_spctl10();
>  	struct mc13xxx *mc13xxx = mc13xxx_get();
>  
> @@ -159,7 +158,6 @@ static int pcm038_power_init(void)
>  			printf("Failed to initialize PMIC. Will continue with low CPU speed\n");
>  		}
>  	}
> -#endif
>  
>  	/* clock gating enable */
>  	GPCR = 0x00050f08;
> diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
> index 2880307..632c9fb 100644
> --- a/include/mfd/mc13xxx.h
> +++ b/include/mfd/mc13xxx.h
> @@ -163,10 +163,31 @@ struct mc13xxx {
>  	int			revision;
>  };
>  
> +#ifdef CONFIG_MFD_MC13XXX
>  extern struct mc13xxx *mc13xxx_get(void);
> -
>  extern int mc13xxx_reg_read(struct mc13xxx *mc13xxx, u8 reg, u32 *val);
>  extern int mc13xxx_reg_write(struct mc13xxx *mc13xxx, u8 reg, u32 val);
>  extern int mc13xxx_set_bits(struct mc13xxx *mc13xxx, u8 reg, u32 mask, u32 val);
> +#else
> +static inline struct mc13xxx *mc13xxx_get(void)
> +{
> +	return NULL;
> +}
> +
> +static inline int mc13xxx_reg_read(struct mc13xxx *mc13xxx, u8 reg, u32 *val)
> +{
> +	return -ENODEV;
> +}
> +
> +static inline int mc13xxx_reg_write(struct mc13xxx *mc13xxx, u8 reg, u32 val)
> +{
> +	return -ENODEV;
> +}
> +
> +static inline int mc13xxx_set_bits(struct mc13xxx *mc13xxx, u8 reg, u32 mask, u32 val)
> +{
> +	return -ENODEV;
> +}
> +#endif
>  
>  #endif /* __MFD_MC13XXX_H */
> -- 
> 1.7.3.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2012-07-23 20:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21  4:50 Alexander Shiyan
2012-07-21  4:50 ` [PATCH 2/3] mc13xxx: Hide struct mc13xxx from board support code Alexander Shiyan
2012-07-21  5:11   ` Alexander Shiyan
2012-07-21  4:50 ` [PATCH 3/3] PCM038: Added setup for OTG host pins Alexander Shiyan
2012-07-23 20:13 ` Sascha Hauer [this message]

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=20120723201348.GE30009@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /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