From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/11] misc: pmic: addI2C support to pmic_fsl driver
Date: Sat, 08 Oct 2011 17:57:41 +0400 [thread overview]
Message-ID: <4E9056D5.4040800@mvista.com> (raw)
In-Reply-To: <1318068428-3453-5-git-send-email-sbabic@denx.de>
Hello.
On 08-10-2011 14:07, Stefano Babic wrote:
> Signed-off-by: Stefano Babic<sbabic@denx.de>
> ---
> drivers/misc/pmic_fsl.c | 18 ++++++++++++++----
> 1 files changed, 14 insertions(+), 4 deletions(-)
> diff --git a/drivers/misc/pmic_fsl.c b/drivers/misc/pmic_fsl.c
> index 13dde47..2945dfb 100644
> --- a/drivers/misc/pmic_fsl.c
> +++ b/drivers/misc/pmic_fsl.c
[...]
> @@ -33,25 +34,34 @@ static u32 pmic_spi_prepare_tx(u32 reg, u32 *val, u32 write)
> else
> return (write<< 31) | (reg<< 25) | (*val& 0x00FFFFFF);
> }
> +#endif
>
> int pmic_init(void)
> {
> struct pmic *p = get_pmic();
> static const char name[] = "FSL_PMIC";
>
> - puts("Board PMIC init\n");
> -
> p->name = name;
> - p->interface = PMIC_SPI;
> p->number_of_regs = PMIC_NUM_OF_REGS;
> - p->bus = CONFIG_FSL_PMIC_BUS;
>
> +#if defined(CONFIG_PMIC_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;
> p->hw.spi.bitlen = CONFIG_FSL_PMIC_BITLEN;
> p->hw.spi.flags = SPI_XFER_BEGIN | SPI_XFER_END;
> p->hw.spi.prepare_tx = pmic_spi_prepare_tx;
> +#elif defined(CONFIG_PMIC_I2C)
> + p->interface = PMIC_SPI;
> + p->interface = PMIC_I2C;
You assign one value and immediately assign the other. First assignment
shouldn't be here.
WBR, Sergei
next prev parent reply other threads:[~2011-10-08 13:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-08 10:06 [U-Boot] switch to generic PMIX driver for i.MX boards Stefano Babic
2011-10-08 10:06 ` [U-Boot] [PATCH 01/11] MX3: qong: use new pmic driver Stefano Babic
2011-10-08 10:06 ` [U-Boot] [PATCH 02/11] MX5: efikamx/efikasb: " Stefano Babic
2011-10-08 11:31 ` Marek Vasut
2011-10-08 14:38 ` Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 03/11] I2c: add missing i2c_set_bus_num to mxc_i2c Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 04/11] misc: pmic: addI2C support to pmic_fsl driver Stefano Babic
2011-10-08 13:57 ` Sergei Shtylyov [this message]
2011-10-08 14:37 ` Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 05/11] MX35: mx35pdk: use new pmic driver Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 06/11] MX5: mx51evk: " Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 07/11] MX5: mx53evk: " Stefano Babic
2011-10-09 8:40 ` Jason Hui
2011-10-08 10:07 ` [U-Boot] [PATCH 08/11] MX31: mx31_litekit: " Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 09/11] MX31: mx31ads: " Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 10/11] MX31: mx31pdk: " Stefano Babic
2011-10-08 10:07 ` [U-Boot] [PATCH 11/11] misc: pmic: drop old Freescale's " 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=4E9056D5.4040800@mvista.com \
--to=sshtylyov@mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox