From: Lukasz Majewski <lukma633@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/16] pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C
Date: Mon, 17 Sep 2012 22:46:34 +0200 [thread overview]
Message-ID: <20120917224634.3e3ba554@jawa> (raw)
In-Reply-To: <5056EF02.60607@denx.de>
Hi Stefano,
> On 14/09/2012 17:40, Lukasz Majewski wrote:
> > PMIC MAX8997 is now ready to work with single and multibus soft I2C
> > implementation.
> >
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> > drivers/misc/pmic_max8997.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/misc/pmic_max8997.c
> > b/drivers/misc/pmic_max8997.c index 62dbc05..4943f66 100644
> > --- a/drivers/misc/pmic_max8997.c
> > +++ b/drivers/misc/pmic_max8997.c
> > @@ -24,6 +24,7 @@
> > #include <common.h>
> > #include <pmic.h>
> > #include <max8997_pmic.h>
> > +#include <i2c.h>
> >
> > int pmic_init(void)
> > {
> > @@ -37,7 +38,7 @@ int pmic_init(void)
> > p->number_of_regs = PMIC_NUM_OF_REGS;
> > p->hw.i2c.addr = MAX8997_I2C_ADDR;
> > p->hw.i2c.tx_num = 1;
> > - p->bus = I2C_PMIC;
> > + p->bus = I2C_0;
> >
>
> I do not see so useful to add an enum for each instance of the I2C
> bus. And we have to add it if the number of i2c busses grows. IMHO it
> is better to use directly the constant, so later in another patch
> pmic_init(5) instead of pmic(I2C_5).
>
This problem has been already discussed with Heiko:
http://patchwork.ozlabs.org/patch/181789/
I think, that we will have to have an enum of available I2C_x busses at
<i2c.h> header file.
In the case of Trats and PMIC framework, the I2C_0 is done on purpose
to keep the trats board working (since the PMIC is in reality connected
to I2C_5). This numbering (I2C_0) needs to be there until prerequisite
patches aren't accepted (the multibus I2C support on trats board)
Regards,
Lukasz Majewski
next prev parent reply other threads:[~2012-09-17 20:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 15:39 [U-Boot] [PATCH 00/16] pmic: Redesign PMIC framework to support multiple instances of devices Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 01/16] pmic:i2c: Handle PMIC I2C transmission comprising of two bytes Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 02/16] pmic:i2c: Add I2C byte order to PMIC framework Lukasz Majewski
2012-09-17 9:33 ` Stefano Babic
2012-09-17 20:41 ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 03/16] pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C Lukasz Majewski
2012-09-17 9:36 ` Stefano Babic
2012-09-17 20:46 ` Lukasz Majewski [this message]
2012-09-14 15:40 ` [U-Boot] [PATCH 04/16] pmic: Extend PMIC framework to support multiple instances of PMIC devices Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 05/16] pmic: Introduce power_board_init() method at ./lib/board.c file Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 06/16] pmic: Enable power_board_init() support at TRATS Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 07/16] pmic:chrg: Common information about charger and battery (power_chrg.h) Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 08/16] pmic:muic: Support for MUIC built into MAX8997 device Lukasz Majewski
2012-09-17 9:51 ` Stefano Babic
2012-09-17 21:05 ` Lukasz Majewski
2012-10-02 12:49 ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 09/16] pmic:fuel-gauge: Support for MAX17042 fuel-gauge Lukasz Majewski
2012-09-14 17:23 ` Tom Rini
2012-09-17 20:59 ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 10/16] pmic:max8997: Function for calculating LDO internal register value Lukasz Majewski
2012-09-14 17:24 ` Tom Rini
2012-09-17 20:57 ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 11/16] arm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 12/16] arm:trats:pmic: Enable MUIC (MAX8997) at " Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 13/16] arm:trats:pmic: Enable fuel-gauge (MAX17042) " Lukasz Majewski
2012-09-14 17:26 ` Tom Rini
2012-09-17 20:56 ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 14/16] pmic:max8997: Support for MAX8997 internal charger control Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 15/16] arm:trats:pmic: Support for charging battery at Samsung's TRATS board Lukasz Majewski
2012-09-14 17:32 ` Tom Rini
2012-09-17 20:55 ` Lukasz Majewski
2012-09-17 21:27 ` Tom Rini
2012-09-14 15:40 ` [U-Boot] [PATCH 16/16] arm:trats:pmic: Power consumption reduction state for " Lukasz Majewski
2012-09-14 17:35 ` [U-Boot] [PATCH 00/16] pmic: Redesign PMIC framework to support multiple instances of devices Tom Rini
2012-09-17 20:49 ` Lukasz Majewski
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=20120917224634.3e3ba554@jawa \
--to=lukma633@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox