
Hi Fabio,
On 05/05/2014 18:08, Fabio Estevam wrote:
On Mon, May 5, 2014 at 12:56 PM, Fabio Estevam festevam@gmail.com wrote:
On Mon, May 5, 2014 at 12:32 PM, Tim Harvey tharvey@gateworks.com wrote:
Hi Fabio,
Yes, I think Stefano is correct in that power_init_board() is the right place to put pmic init. He asked me to do that to my recent series as well and it worked fine. Note that in that series I do have a patch that will rename pmic_init() for the PFUZE100 to power_pfuze100_init() [1]. I'm hoping that will make it in soon.
Thanks, Tim.
Stefano,
It seems that I need to wait for Tim's series to be applied, otherwise there will be a build breakage.
In the meantime I converted the current patch to using power_init_board() instead, but this causes problems:
=> pmic list PMIC devices: name: PFUZE100_PMIC bus: I2C_1 => pmic PFUZE100_PMIC dump PMIC: PFUZE100_PMIC wait_for_sr_state: failed sr=81 cr=a0 state=2020 i2c_init_transfer: failed for chip 0x8 retry=0 wait_for_sr_state: failed sr=81 cr=a0 state=2020 i2c_init_transfer: failed for chip 0x8 retry=1 wait_for_sr_state: failed sr=81 cr=a0 state=2020 i2c_init_transfer: failed for chip 0x8 retry=2 i2c_init_transfer: give up i2c_regs=021a0000 PMIC: Registers dump failed
With the previous misc_init_r() approach the 'dump' command worked correctly.
Any suggestions?
Checkin in arch/arm/lib/board.c, I see that power_init_board() is called quite early (that makes sense, as power can be necessary to go on). Can you try moving power_init_board() later ? Anyway, I2C is already set (by board_init, called previously) and malloc is also available.
Regards, Stefano