As for battery charging on the N900, the hardware components involved have full datasheets availabe. I can monitor the charge level, and charge the battery without using the closed bme. It took me about two weekends to write that in busybox sh script plus a helper binary from i2c-tools for the actual hw access.