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: 841656 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sAt7an/k"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ylm6J03M0z9s7G for ; Mon, 27 Nov 2017 23:18:16 +1100 (AEDT) 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-MU; 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: A2BRBQCKARxa/54agoZcHAEBAQQBAQoBAYM8gXsHg3iZNJp7CoU7hG1DFAEBAQEBAQEBAWsohUkECwFGNQImAl8OBYoiBKVCgW06inkBAQEHAgElCQGBBYIrggeDPimIaoJJgmMFkXaQUIEOn36HTAKWDQICAgIJAhqBOjYigVBwgnaCUhyBaHaIVAGBEwEBAQ X-IPAS-Result: A2BRBQCKARxa/54agoZcHAEBAQQBAQoBAYM8gXsHg3iZNJp7CoU7hG1DFAEBAQEBAQEBAWsohUkECwFGNQImAl8OBYoiBKVCgW06inkBAQEHAgElCQGBBYIrggeDPimIaoJJgmMFkXaQUIEOn36HTAKWDQICAgIJAhqBOjYigVBwgnaCUhyBaHaIVAGBEwEBAQ 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_Br=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-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [134.130.5.47 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list 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_Br=C3=BCns?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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)