All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
Date: Wed, 20 Nov 2013 20:26:06 -0200	[thread overview]
Message-ID: <1384986366-14003-4-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1384986366-14003-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

There is no need to pass p->bus differently when the PMIC is connected via SPI
or via I2C.

Handle the both cases in the same way.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/power/power_fsl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index ed778f3..ac0b541 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -36,10 +36,10 @@ int pmic_init(unsigned char bus)
 
 	p->name = name;
 	p->number_of_regs = PMIC_NUM_OF_REGS;
+	p->bus = bus;
 
 #if defined(CONFIG_POWER_SPI)
 	p->interface = PMIC_SPI;
-	p->bus = CONFIG_FSL_PMIC_BUS;
 	p->hw.spi.cs = CONFIG_FSL_PMIC_CS;
 	p->hw.spi.clk = CONFIG_FSL_PMIC_CLK;
 	p->hw.spi.mode = CONFIG_FSL_PMIC_MODE;
@@ -50,7 +50,6 @@ int pmic_init(unsigned char bus)
 	p->interface = PMIC_I2C;
 	p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
 	p->hw.i2c.tx_num = FSL_PMIC_I2C_LENGTH;
-	p->bus = bus;
 #else
 #error "You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C"
 #endif
-- 
1.8.1.2

  parent reply	other threads:[~2013-11-20 22:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 22:26 [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Fabio Estevam
2013-11-20 22:26 ` [U-Boot] [PATCH 2/4] mx31pdk: " Fabio Estevam
2013-11-27  8:42   ` Stefano Babic
2013-11-20 22:26 ` [U-Boot] [PATCH 3/4] efikamx: " Fabio Estevam
2013-11-27  8:43   ` Stefano Babic
2013-11-20 22:26 ` Fabio Estevam [this message]
2013-11-27  8:43   ` [U-Boot] [PATCH 4/4] power: power_fsl: Pass p->bus in the same way for SPI and I2C cases Stefano Babic
2013-11-21 15:14 ` [U-Boot] [PATCH 1/4] mx51evk: Fix pmic_init() argument Stefano Babic
2013-11-27  8:42 ` Stefano Babic

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=1384986366-14003-4-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --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.