From patchwork Tue Nov 19 10:18:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 3200821 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0069E9F26C for ; Tue, 19 Nov 2013 10:22:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB3132012C for ; Tue, 19 Nov 2013 10:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA04B20103 for ; Tue, 19 Nov 2013 10:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730Ab3KSKW1 (ORCPT ); Tue, 19 Nov 2013 05:22:27 -0500 Received: from mail-wi0-f175.google.com ([209.85.212.175]:62982 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751869Ab3KSKWP (ORCPT ); Tue, 19 Nov 2013 05:22:15 -0500 Received: by mail-wi0-f175.google.com with SMTP id hi5so367768wib.14 for ; Tue, 19 Nov 2013 02:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=AuIMC+BMMRFQt7q0v1YFuMFab1uccvleRxfkynlAJP0=; b=PkRNy8vciZoyNFuLYizmGRcSOh77KyGi9m2QcdQjr8wCBUlZ55CjEda3MrCwW6UhK1 vhI3etPe46GlDXpc+b+UIFMvROThr88zWCx+s3seKpPtfUwHFMpOmMYpk1ZzoID8WR1C w0VowgG0sszOljX2SQfdXsyA0bzkTUvtpOKgKfgYXkhjJNQpznC6hGnn/vqx3Axn2wGl XKBfFZxwv26NcRkHa9Gten0Kxd72UNvaBE2d5k5jtkypyAL/bR7/aylNZGLiN3prjEJ/ NPDBFKUp7on0l2DGM+otytEmv+7uhVTUvWo+sWCZC9LzyUizA17ZFIVPtYe9SW67qyFX pwPQ== X-Received: by 10.180.160.212 with SMTP id xm20mr6658146wib.33.1384856533175; Tue, 19 Nov 2013 02:22:13 -0800 (PST) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id fu1sm4175598wib.8.2013.11.19.02.22.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 02:22:12 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Anton Vorontsov , David Woodhouse , Tony Lindgren , Russell King Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, freemangordon@abv.bg, aaro.koskinen@iki.fi, pavel@ucw.cz, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2 3/3] RX-51: Add platform data for bq24150a charger Date: Tue, 19 Nov 2013 11:18:05 +0100 Message-Id: <1384856285-19593-4-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384856285-19593-1-git-send-email-pali.rohar@gmail.com> References: <1378630239-10006-1-git-send-email-pali.rohar@gmail.com> <1384856285-19593-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Pavel Machek --- arch/arm/mach-omap2/board-rx51-peripherals.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 70fcaff..95e6638 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -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), @@ -1302,7 +1313,11 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { { I2C_BOARD_INFO("tpa6130a2", 0x60), .platform_data = &rx51_tpa6130a2_data, - } + }, + { + I2C_BOARD_INFO("bq24150a", 0x6b), + .platform_data = &rx51_bq24150a_platform_data, + }, }; static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_3[] = {