From patchwork Sun Feb 21 11:28:21 2016 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: 8369221 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1EE64C0553 for ; Sun, 21 Feb 2016 18:46:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6180E20412 for ; Sun, 21 Feb 2016 18:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 742B22040F for ; Sun, 21 Feb 2016 18:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbcBUSpw (ORCPT ); Sun, 21 Feb 2016 13:45:52 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:32804 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbcBUSpu (ORCPT ); Sun, 21 Feb 2016 13:45:50 -0500 Received: by mail-wm0-f44.google.com with SMTP id g62so130482532wme.0; Sun, 21 Feb 2016 10:45:49 -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=Wvo1/0c14Fc1C/aeGa/95n/MOYWRjvoYo6acMyDZytY=; b=u/iXiJHRAF33j9hKEiPDFhzArPlJ1Yetm5RkXdOEtqhMfHwN0dFSdP7b5PX3lZL9O2 nPBsMOM5P69lhZK07CGirTSg0X+JP4qaT7guPLYmujqNA8+IIGeEmREwj3RdyWdLwec8 UIPcsUqRoXAzeSK0em1e3QM9yLUyc3mvnQQWG2qrFtRjIqhnxZsnTHW+x807k0w89Nun PHEi/WSRdbXB0QH8bBbYn1+xpG8saU1Q3rlWRIRZsY+LmOmwj0Z5D0j2XjLK2Vpo099a io1mmA6fFxlPfpscTygH4OZ2hmtmNuCaYoj3OSS7GBq7oFFpVuvpUj2Q6zsTwmk3c3f8 /WEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Wvo1/0c14Fc1C/aeGa/95n/MOYWRjvoYo6acMyDZytY=; b=RbAOUXUUH9ymqM3f4kF9KsU3M/QhpyRr6sADGyDrtwL+R2/8sDslhAMj8Zs7v4XT8c gDYjvHoLUvbyXvJIPBV+8rLUm252u94EFEGliSSCwfFe/N8GlYivba9pDgoUQge305cd ySBB7ZiZHeqEd2aZqy6lZQwGlIl4PmOBCoOYqJpx5EU0IaaECIprhlaZPoGE3bO0TlUa OvOU2djtHlJlzq5W4chblPod8U4jY/TQbtMXcMCZc6clgRltNOm6bCJ4Q6BhZqU/Hloq w0G4DIwoVd4BRybK1kM970kcS1ky2SM04sWhaH4wldHr/qe4NyItW3ic+U7NzToQdmum 0Yew== X-Gm-Message-State: AG10YOTzVx0NzRl1GKd38w/0Bufu7VIGqk2N2C+Ysd+6317JTX6NpcZOIdvbOdPMaVoNKA== X-Received: by 10.194.59.112 with SMTP id y16mr26579304wjq.175.1456054142450; Sun, 21 Feb 2016 03:29:02 -0800 (PST) Received: from localhost.localdomain (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id jc7sm19670939wjb.33.2016.02.21.03.29.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Feb 2016 03:29:01 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Pavel Machel , Aaro Koskinen , Ivaylo Dimitrov , Nishanth Menon Cc: linux-pm@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 4/6] power_supply: bq2415x_charger: Add of modalias and match table when CONFIG_OF is enabled Date: Sun, 21 Feb 2016 12:28:21 +0100 Message-Id: <1456054103-19551-5-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1456054103-19551-1-git-send-email-pali.rohar@gmail.com> References: <1456054103-19551-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=-6.8 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 Signed-off-by: Pali Rohár --- drivers/power/bq2415x_charger.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index b0863f4..73e2f0b 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -1779,9 +1779,29 @@ static const struct acpi_device_id bq2415x_i2c_acpi_match[] = { MODULE_DEVICE_TABLE(acpi, bq2415x_i2c_acpi_match); #endif +#ifdef CONFIG_OF +static const struct of_device_id bq2415x_of_match_table[] = { + { .compatible = "ti,bq24150" }, + { .compatible = "ti,bq24150a" }, + { .compatible = "ti,bq24151" }, + { .compatible = "ti,bq24151a" }, + { .compatible = "ti,bq24152" }, + { .compatible = "ti,bq24153" }, + { .compatible = "ti,bq24153a" }, + { .compatible = "ti,bq24155" }, + { .compatible = "ti,bq24156" }, + { .compatible = "ti,bq24156a" }, + { .compatible = "ti,bq24157s" }, + { .compatible = "ti,bq24158" }, + {}, +}; +MODULE_DEVICE_TABLE(of, bq2415x_of_match_table); +#endif + static struct i2c_driver bq2415x_driver = { .driver = { .name = "bq2415x-charger", + .of_match_table = of_match_ptr(bq2415x_of_match_table), .acpi_match_table = ACPI_PTR(bq2415x_i2c_acpi_match), }, .probe = bq2415x_probe,