From patchwork Thu Jun 29 21:46:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 106656 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1579901qge; Thu, 29 Jun 2017 14:47:02 -0700 (PDT) X-Received: by 10.99.105.200 with SMTP id e191mr17687606pgc.215.1498772822462; Thu, 29 Jun 2017 14:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498772822; cv=none; d=google.com; s=arc-20160816; b=ubJzFwCCAXIiLDnnsxL2tI4IktjNSgaV3XfYcD/bl/EEjLhLWa5UN0bEcZ2n5orWg7 EDDMs+qmxzdBU4kEudzsGFpeWUoREiWpolNzLz1rCzWLd+3QnBm4TylTXl95vRvC9RBf KL3iV2M7SZjkonbNdoVmllgbgRD0akIeGCA5hpnJmWbdfUVvBCmptC8eso3NFp92c9qU 38g3OZkKbWuIOzGkWSPbwjCBZ03VAulE2jQHdMv0mi+qwmuEEaemxTgVXZrAv8wFef6a qtuCuItYKYVjsD348EzdhMaAZbiASRVXEvcbGK7ZMzyxMI/01Et96BCl85y39mWqM1Ez cr3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=r/XQywJxzuG4HgSGVUSA5VLWdQXn8wkKnZ+tl8yOR3s=; b=JPhq2kKKGWgOc8CzdSUwg9sBMZnnlUeB5YVN+LZ67xcIV3wLUeAAFWSg7cqUnZpWBv hIkShWeIsXHODgeDkLAzNm/8gdif2xdXETK7g6rZCRtUVNtV1N1HiWCyo+j6lOyeTRbv JXtvoZQL38tJMTnjzunL1Hn6Trd3ih+dtcY435LjLSObqOUPDMkMs0xU0TgcKPHFEKCX 31b6NVoF7ZmG0hcNWHZjwI9SpY53SDsH8H7ssJT95PANk//3SlTFxlA/D5me0xuU8CuR HTJLv9ErXnOEOrq0jjT0T8yk/be01GR539n8yagdcJmaCyqOn4ZgK+Bh0Lwk5G7h4gRv ohWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=jfe5EZYE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si4846969plk.20.2017.06.29.14.47.02; Thu, 29 Jun 2017 14:47:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=jfe5EZYE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753859AbdF2Vqu (ORCPT + 25 others); Thu, 29 Jun 2017 17:46:50 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:33263 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752454AbdF2Vqs (ORCPT ); Thu, 29 Jun 2017 17:46:48 -0400 Received: by mail-pf0-f176.google.com with SMTP id e7so56726010pfk.0 for ; Thu, 29 Jun 2017 14:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=r/XQywJxzuG4HgSGVUSA5VLWdQXn8wkKnZ+tl8yOR3s=; b=jfe5EZYEeys5TbDlWGn3FjLZ3gtLqUeQ6ar88NJTALlmj1Nh6yD8MAI6RRekq5SHIS yHlfatS6HfcmFm4bS2mZd5vN4v+SSXU2CjVbISHkv9NxiXNXp3vnmn+GaxzwWOJ4Yd3t vUMR/A6CAT6atPj6HGdJ37tAemcTgeO64tGc8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=r/XQywJxzuG4HgSGVUSA5VLWdQXn8wkKnZ+tl8yOR3s=; b=p7iO62bQYOdS4zdPuJhoy3DHKcDv7gVJBjHab8ZyBAz3uZG+Hcj6/kSJEMi7eu5Y9p oeZZ+cEr5EFH9/dmPlSAuLLgJUsUgwEEoq6hpXxixR85/VsnmUhaUIK9X4u7gr2DZRgi pdCnN0DQ1QXyM/Wzj6NJRgy+lpOOin0IuinZ3chg6yaOzdtMuvZG2qZ6U7iPk6VATOee qZvwaCS9Y9clEzo+au7rSpWscTQy4RSIhq636UlVXKEYPhEq7UpwOAyIpmlDz2S62EZe 0ACm54hSKMAdvNNaQv91N8mlhhKncpSH2obwU1JUuVq6RUvLbndsudc86d/pLcm3EnRH JJEw== X-Gm-Message-State: AKS2vOwktrDzS0N8QMON4pBjp6N55fJ4hnnVT4WYcPiiNYSUxsAl0SVo wCQzweFNRTunsktM X-Received: by 10.84.138.131 with SMTP id 3mr20790589plp.24.1498772808005; Thu, 29 Jun 2017 14:46:48 -0700 (PDT) Received: from localhost.localdomain (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79]) by smtp.gmail.com with ESMTPSA id d71sm15677497pfe.106.2017.06.29.14.46.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 14:46:47 -0700 (PDT) From: Bjorn Andersson To: Greg Kroah-Hartman Cc: Stephen Boyd , Rob Clark , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [RESEND PATCH] spmi: Include OF based modalias in device uevent Date: Thu, 29 Jun 2017 14:46:44 -0700 Message-Id: <20170629214644.16876-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.12.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Include the OF-based modalias in the uevent sent when registering SPMI devices, so that user space has a chance to autoload the kernel module for the device. Tested-by: Rob Clark Reported-by: Rob Clark Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson --- Resend to collect Rob's T-b and Stephen's R-b, and add Greg as recipient. drivers/spmi/spmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.12.0 diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 2b9b0941d9eb..6d23226e5f69 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev) return 0; } +static int spmi_drv_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 spmi_bus_type = { .name = "spmi", .match = spmi_device_match, .probe = spmi_drv_probe, .remove = spmi_drv_remove, + .uevent = spmi_drv_uevent, }; /**