From patchwork Sun Sep 16 23:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 146797 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3154564ljw; Sun, 16 Sep 2018 16:46:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYn1/lPFMlvmJ1FW9N0iSvqAz9O7X3Wy2H6VHVsJdfzdpRGB8smwI5ri+CjEbHYi7i+ANfV X-Received: by 2002:adf:9c12:: with SMTP id f18-v6mr17505496wrc.93.1537141567193; Sun, 16 Sep 2018 16:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537141567; cv=none; d=google.com; s=arc-20160816; b=aLht8zYLGLssMb5jHdEjwuuZ0b1gxxFPA8atKUo30TQE9yW9HFRqGxHizGFMHt/sR1 5aCZAUE1IFFNWvbfVYIlOnjXWbuFr0nc6LwnGgTbdVtgj/yq55sww+qQbxpfMSCEEWdg nOw32+o5w3qN7cwJy3gLirn5O5DbBMFq470cRTbhlCxQN0u82NIZmhu8MEml4bhKTbjh Pb3IPN3RNX52bwJb1ALALl9AYA+KVx1Mnqmg2XP8JMVScaJKBLniA07401sbNDSBAxdn erlccW2YXMZTCznXPXw4BHHsUATWncpUmR/bnLGEmGyKXwr8DaKoM2Zvj39r0tgskcZv xpYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=nmspa1M9zJrzvnsqwEu4VEoeJBVBjzcnmLF0mKcQRIk=; b=um4dGRdASmIOiWCKlj+dFE668/luu0LLKcZNROUdkWSIkRNKLAMycz/qJMM9vC/xwu ihWrbpCO+nOMyIuQqed2MXfHts/ghgwON5X5o2YFWTal8QcwdU1Ay/3UpQ9aht4n26mF JwMQe8gkH5hjSsp5U02czgKMU+1Z0ygWiNQ5PNWCdxNdvsICyXj7TUHwkFl2p9esYomL XQevPVJXY+V8nBVp2ce0d5rWRtcZdUgsCJzA62gwI5O01DyOqzLqiLE31E8gexqe8t8E IZ3bYDjIsw6xncR7HOtdqhKc9gON1Ga874aw6mAKtA/81C8cD3KVj3ER84O3GC++3j9n /byg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QZ5CW7Fo; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id i127-v6si5347271wma.47.2018.09.16.16.46.06; Sun, 16 Sep 2018 16:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QZ5CW7Fo; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 13C592677FF; Mon, 17 Sep 2018 01:46:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0F63726781A; Mon, 17 Sep 2018 01:46:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by alsa0.perex.cz (Postfix) with ESMTP id F3B262677FC for ; Mon, 17 Sep 2018 01:45:58 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id r196-v6so10087554iod.0 for ; Sun, 16 Sep 2018 16:45:58 -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:in-reply-to:references; bh=QcoflERtpbbMpFHGfNLZf+J44DqlCQNeE1IN/AfmCyw=; b=QZ5CW7Fo4X2d5dWSsyibw1FewzAcVLqIfsIhOn4Di1qz3uJz15hTqBNSl6D//5Ki9q Eaa02bx8tJ+CixARxakw8c9gpyXYVTtppksrkOPfobracWgN3WG1hQ9GI5FqP3FlMSxp Ny/RKE7IIEv1qOa3nF/AotMXlPtBYPZGF8GaI= 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:in-reply-to :references; bh=QcoflERtpbbMpFHGfNLZf+J44DqlCQNeE1IN/AfmCyw=; b=uOiaFceXGOvJJiGfunPbKIqSCTu5vPfVy2MrdrwIbq57LxfHgij8adrOS5wPhvHfmO RHyM45v4kYoUQLxn5JpEpKJWEF/7GQmEnte9i9c+2p3d0wFA2Xp6uYerXPKQZrG3lAjS hK0AQtGHiyCxb4dovZCuMoDCYC571sNcCGmngAjjFU5hDHCuSLvYbjVMzreX76yvhtPL gQqWDAKcel+StjHrt+7aH2WjQfBLF73zzmXdiFep0VHBi1i3jMVBsc+DQlwgiObEvipx 5PLMcEhqXveHn2Ej0as1OM8k7HOqslEzFj1fNo7nFISa6w59sRy2OY6aD7QctC80ev2I F5NA== X-Gm-Message-State: APzg51Aw/TWDYLVfa//vQlI0CEQ2DLInqxn7f9eNrLN0xKIsfEFAuN/Q 9M53DfGEf2jsjL+VV1fZV2skdA== X-Received: by 2002:a6b:25d2:: with SMTP id l201-v6mr18710058iol.115.1537141558285; Sun, 16 Sep 2018 16:45:58 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.45.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:45:57 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:40 -0700 Message-Id: <20180916234546.29661-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 1/7] slimbus: core: add support to uevent X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org From: Srinivas Kandagatla This patch adds support to uevent to help automatic module loading. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.9.3 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 95b00d2..31f2910 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include "slimbus.h" @@ -57,11 +58,24 @@ static int slim_device_remove(struct device *dev) return 0; } +static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct slim_device *sbdev = to_slim_device(dev); + int ret; + + ret = of_device_uevent_modalias(dev, env); + if (ret != -ENODEV) + return ret; + + return add_uevent_var(env, "MODALIAS=slim:%s", dev_name(&sbdev->dev)); +} + struct bus_type slimbus_bus = { .name = "slimbus", .match = slim_device_match, .probe = slim_device_probe, .remove = slim_device_remove, + .uevent = slim_device_uevent, }; EXPORT_SYMBOL_GPL(slimbus_bus);