Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754308AbaBDMVG (ORCPT ); Tue, 4 Feb 2014 07:21:06 -0500 Received: from mail-ig0-f176.google.com ([209.85.213.176]:37125 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753305AbaBDMTU (ORCPT ); Tue, 4 Feb 2014 07:19:20 -0500 From: Matt Porter To: Wolfram Sang , Tim Kryger , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Samuel Ortiz , Lee Jones , Liam Girdwood , Mark Brown , Christian Daudt Cc: Devicetree List , Linux I2C List , Linux ARM Kernel List , Linux Kernel Mailing List Subject: [PATCH 1/6] i2c: bcm-kona: register with subsys_initcall Date: Tue, 4 Feb 2014 07:19:07 -0500 Message-Id: <1391516352-32359-2-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1391516352-32359-1-git-send-email-mporter@linaro.org> References: <1391516352-32359-1-git-send-email-mporter@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Voltage regulators are needed very early due to deferred probe being incompatible with built-in USB gadget drivers. In order to have the PMU driver available before USB UDC, make i2c available during subsys_initcall. Signed-off-by: Matt Porter Reviewed-by: Tim Kryger Reviewed-by: Markus Mayer --- drivers/i2c/busses/i2c-bcm-kona.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c index 18a74a6..bfd4056 100644 --- a/drivers/i2c/busses/i2c-bcm-kona.c +++ b/drivers/i2c/busses/i2c-bcm-kona.c @@ -901,7 +901,19 @@ static struct platform_driver bcm_kona_i2c_driver = { .probe = bcm_kona_i2c_probe, .remove = bcm_kona_i2c_remove, }; -module_platform_driver(bcm_kona_i2c_driver); + +static int __init bcm_kona_i2c_init_driver(void) +{ + return platform_driver_register(&bcm_kona_i2c_driver); +} +/* PMU access is needed early so use subsys init */ +subsys_initcall(bcm_kona_i2c_init_driver); + +static void __exit bcm_kona_i2c_exit_driver(void) +{ + platform_driver_unregister(&bcm_kona_i2c_driver); +} +module_exit(bcm_kona_i2c_exit_driver); MODULE_AUTHOR("Tim Kryger "); MODULE_DESCRIPTION("Broadcom Kona I2C Driver"); -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/