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); } > --- a/arch/arm/mach-omap2/board-rx51-peripherals.c > +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c > @@ -1275,6 +1276,16 @@ static struct aic3x_pdata rx51_aic3x_data2 = { > .gpio_reset = 60, > }; > > +static struct bq2415x_platform_data rx51_bq24150a_platform_data = { > + .current_limit = 100, /* mA */ > + .weak_battery_voltage = 3400, /* mV */ > + .battery_regulation_voltage = 4200, /* mV */ > + .charge_current = 650, /* mA */ > + .termination_current = 100, /* mA */ > + .resistor_sense = 68, /* m ohm */ > + .notify_device = "isp1704", > +}; > + > static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { > { > I2C_BOARD_INFO("tlv320aic3x", 0x18), -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html