All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] sunxi: power: Compile sy8106a driver only during SPL build
Date: Fri, 28 Apr 2017 05:42:10 +0200	[thread overview]
Message-ID: <5902BA12.6090903@denx.de> (raw)
In-Reply-To: <20170426220337.13136-2-jernej.skrabec@siol.net>

Hello Jernej,

Am 27.04.2017 um 00:03 schrieb Jernej Skrabec:
> Driver for that regulator is used only in SPL and it uses old I2C
> interface. If we want to use DM I2C in U-Boot proper, compilation of
> this driver has to be limited only to SPL.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>
>   drivers/power/sy8106a.c | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
>
> diff --git a/drivers/power/sy8106a.c b/drivers/power/sy8106a.c
> index bbf116f655..f9db3965f2 100644
> --- a/drivers/power/sy8106a.c
> +++ b/drivers/power/sy8106a.c
> @@ -12,6 +12,7 @@
>   #define SY8106A_VOUT1_SEL 1
>   #define SY8106A_VOUT1_SEL_ENABLE (1 << 7)
>
> +#ifdef CONFIG_SPL_BUILD
>   static u8 sy8106a_mvolt_to_cfg(int mvolt, int min, int max, int div)
>   {
>   	if (mvolt < min)
> @@ -27,3 +28,4 @@ int sy8106a_set_vout1(unsigned int mvolt)
>   	u8 data = sy8106a_mvolt_to_cfg(mvolt, 680, 1950, 10) | SY8106A_VOUT1_SEL_ENABLE;
>   	return i2c_write(SY8106A_I2C_ADDR, SY8106A_VOUT1_SEL, 1, &data, 1);
>   }
> +#endif
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2017-04-28  3:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 22:03 [U-Boot] [PATCH 0/4] sunxi: i2c: Add DM I2C support for A64/H3/H5 Jernej Skrabec
2017-04-26 22:03 ` [U-Boot] [PATCH 1/4] sunxi: power: Compile sy8106a driver only during SPL build Jernej Skrabec
2017-04-28  3:42   ` Heiko Schocher [this message]
2017-04-26 22:03 ` [U-Boot] [PATCH 2/4] sunxi: Move function for later convenience Jernej Skrabec
2017-04-28  3:43   ` Heiko Schocher
2017-04-26 22:03 ` [U-Boot] [PATCH 3/4] sunxi: i2c: Add support for DM I2C Jernej Skrabec
2017-04-28  3:43   ` Heiko Schocher
2017-04-29  0:28   ` Simon Glass
2017-04-26 22:03 ` [U-Boot] [PATCH 4/4] sunxi: Enable DM_I2C for A64/H3/H5 Jernej Skrabec
2017-04-28  3:44   ` Heiko Schocher
2017-04-27  7:44 ` [U-Boot] [PATCH 0/4] sunxi: i2c: Add DM I2C support " Maxime Ripard
2017-04-28  3:46 ` Heiko Schocher
2017-04-28  6:44   ` Maxime Ripard
2017-04-28  6:53     ` Heiko Schocher invitel
2017-04-28  7:27       ` Maxime Ripard
2017-04-28 10:04         ` Heiko Schocher

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=5902BA12.6090903@denx.de \
    --to=hs@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.