Re: [PATCH v2 3/3] RX-51: Add platform data for bq24150a charger

From: Pali RohÃr
Date: Sun Nov 24 2013 - 05:28:41 EST


On Tuesday 19 November 2013 14:32:13 Pavel Machek wrote:
> On Tue 2013-11-19 11:18:05, Pali RohÃr wrote:
> > This patch will register bq24150a charger in RX-51 board
> > data.
> >
> > So finally charging battery on Nokia N900 (RX-51) working
> > automatically without any proprietary Nokia bits in
> > userspace.
> >
> > Signed-off-by: Pali RohÃr <pali.rohar@xxxxxxxxx>
>
> Reviewed-by: Pavel Machek <pavel@xxxxxx>
>
> Pavel
> BTW, current code says:
>
> That seems to limit charging voltage to 3.9V, with comment
> saying 4.11V... which means battery will not be charged
> fully. does it make sense to raise limit to 4.11V here?
>
> Aha, and actually will not 4.2V requested by
> rx51_bq24150a_platform_data trigger -EINVAL?
>
> /* set battery regulation voltage in mV */
> static int bq2415x_set_battery_regulation_voltage(struct
> bq2415x_device *bq,
> int mV)
> {
> int val = (mV/10 - 350) / 2;
>
> if (val < 0)
> val = 0;
> else if (val > 94) /* FIXME: Max is 94 or 122 ? Set
> max value ? */
> return -EINVAL;
>
> return bq2415x_i2c_write_mask(bq, BQ2415X_REG_VOLTAGE,
> val, BQ2415X_MASK_VO, BQ2415X_SHIFT_VO); }
>

Above bq2415x_set_battery_regulation_voltage function is updated
in 3.13, see commit 3ed5cd79b82e9a055e0df3275eeb471ea0f1e2d7.

--
Pali RohÃr
pali.rohar@xxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part.