From patchwork Mon Nov 27 12:17:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Br=C3=BCns?= X-Patchwork-Id: 10076729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6271060353 for ; Mon, 27 Nov 2017 12:18:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61FD428E55 for ; Mon, 27 Nov 2017 12:18:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 558BA28E57; Mon, 27 Nov 2017 12:18:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E6EBA28E55 for ; Mon, 27 Nov 2017 12:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-ID:MIME-Version:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kTUfMyiVXxrbR0rNBsxJd1jyOg23t2iBF1SmbrzS97k=; b=sAt7an/kWRn6D9 SPFsD3zTMtyoQCwMgDPV/d5uVzO5braGZOOYvrT+Yoo4pyS9Ema2KgkaEWkiM59PITlpD2ZCoIqjf TQ9Eno5wMcyH0xvG6FWVb/CaqzC3pl6iO+h+E+RI8f9Fh0KiXDXdm+sUj3Bs+tPiwQRN3ouLjVUIQ 6tfcYFywnbjFoR5N+Bfhwh3HDDhLsqSmkGwSpxWNm3apWtz11tkCNiFPHGS+HeLUGzfPuLnzFqN/U Dt0rXJGeIl9xFesqtLz6o6wN70JgtRLKw7x6IWwOyNxl031WEEjPe3ez+jSVMep+E9d2O8sJQEP3m ljvntbJ+G02XhLBwMnCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eJIMV-0005eq-B8; Mon, 27 Nov 2017 12:18:11 +0000 Received: from mail-out-2.itc.rwth-aachen.de ([134.130.5.47]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eJIMN-0005ca-Ic for linux-arm-kernel@lists.infradead.org; Mon, 27 Nov 2017 12:18:09 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BRBQCKARxa/54agoZcHAEBAQQBAQoBA?= =?us-ascii?q?YM8gXsHg3iZNJp7CoU7hG1DFAEBAQEBAQEBAWsohUkECwFGNQImAl8OBYoiBKV?= =?us-ascii?q?CgW06inkBAQEHAgElCQGBBYIrggeDPimIaoJJgmMFkXaQUIEOn36HTAKWDQICA?= =?us-ascii?q?gIJAhqBOjYigVBwgnaCUhyBaHaIVAGBEwEBAQ?= X-IPAS-Result: =?us-ascii?q?A2BRBQCKARxa/54agoZcHAEBAQQBAQoBAYM8gXsHg3iZNJp?= =?us-ascii?q?7CoU7hG1DFAEBAQEBAQEBAWsohUkECwFGNQImAl8OBYoiBKVCgW06inkBAQEHA?= =?us-ascii?q?gElCQGBBYIrggeDPimIaoJJgmMFkXaQUIEOn36HTAKWDQICAgIJAhqBOjYigVB?= =?us-ascii?q?wgnaCUhyBaHaIVAGBEwEBAQ?= X-IronPort-AV: E=Sophos;i="5.44,465,1505772000"; d="scan'208";a="25921731" Received: from rwthex-w2-a.rwth-ad.de ([134.130.26.158]) by mail-in-2.itc.rwth-aachen.de with ESMTP; 27 Nov 2017 13:17:36 +0100 Received: from pebbles.fritz.box (77.182.182.40) by rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Mon, 27 Nov 2017 13:17:33 +0100 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: Subject: [PATCH] sunxi-rsb: Include OF based modalias in device uevent Date: Mon, 27 Nov 2017 13:17:25 +0100 X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 X-Originating-IP: [77.182.182.40] X-ClientProxiedBy: rwthex-s1-b.rwth-ad.de (2002:8682:1a99::8682:1a99) To rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) Message-ID: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171127_041803_912808_2EFD57D0 X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Arnd Bergmann , linux-kernel@vger.kernel.org, stable , Chen-Yu Tsai , Maxime Ripard , =?UTF-8?q?Stefan=20Br=C3=BCns?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Include the OF-based modalias in the uevent sent when registering devices on the sunxi RSB bus, so that user space has a chance to autoload the kernel module for the device. Fixes a regression caused by commit 3f241bfa60bd ("arm64: allwinner: a64: pine64: Use dcdc1 regulator for mmc0"). When the axp20x-rsb module for the AXP803 PMIC is built as a module, it is not loaded and the system ends up with an disfunctional MMC controller. Cc: stable Signed-off-by: Stefan BrĂ¼ns --- drivers/bus/sunxi-rsb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c index 328ca93781cf..37cb57244cbe 100644 --- a/drivers/bus/sunxi-rsb.c +++ b/drivers/bus/sunxi-rsb.c @@ -173,11 +173,24 @@ static int sunxi_rsb_device_remove(struct device *dev) return drv->remove(to_sunxi_rsb_device(dev)); } +static int sunxi_rsb_device_uevent(struct device *dev, + struct kobj_uevent_env *env) +{ + int ret; + + ret = of_device_uevent_modalias(dev, env); + if (ret != -ENODEV) + return ret; + + return 0; +} + static struct bus_type sunxi_rsb_bus = { .name = RSB_CTRL_NAME, .match = sunxi_rsb_device_match, .probe = sunxi_rsb_device_probe, .remove = sunxi_rsb_device_remove, + .uevent = sunxi_rsb_device_uevent, }; static void sunxi_rsb_dev_release(struct device *dev)