Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1009542ybf; Thu, 27 Feb 2020 03:31:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwDbfEX5sPq+ArLL192EuqImdv2q1NirnnpBtmyJiPhPwvlzvFC8r/v6+b0pEzJRqrVJ6Sr X-Received: by 2002:a05:6830:16c5:: with SMTP id l5mr2935903otr.165.1582803114382; Thu, 27 Feb 2020 03:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582803114; cv=none; d=google.com; s=arc-20160816; b=O1zFXGXiLIfU4vlw9Vqfmco69WtEWQqE6z/ek1CojkvTJp4V8GwiBrSW+msKhJaXZZ jTL0OAk/k+3R13x+sKIc2KhALo3XXzsZlOwfRWZ+tb32vVc2tO46gAG2g7mbqBDrnOQ4 Wdsj+RT6UDjW+oT3Crd5zOIW7jwQXQHhpcQs1pSWPbNSXWTSb2UQ2DER8lVqTBUVqwn0 uNmkuZLmkDVat6JuqEcEDBxXzUOMbutMX4MHD6vzo2xRIzC+w3WyxdG6/y2GmcK7sknp YgWy16s1Qjg1PqHJZvNXvTi2xP9CmcN+o8K02s+2jjtrJzfXxvnnxPCTdpgyWAOSWCHI hj1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=kJ7uFDJMQhUwVU8kmQ+KgHgoF4n7Xl1mzKjCmXRoiMU=; b=JbH/wOiOtMEO6QbILVjVnxXS6RplaGQUBQScOwyDtfxa3rLnR1oO13j9Z/G31K3mb5 TLtawSTWsjQLJJk7iw1D2UoIW1SNGVsUVJCFS2f2veBNXLIwRicZ7c7UlgIH3xUca5hH /Hz/Cdgxj6nZpoaV1Ydwln5rTMY++Ox2b2GnaYHZyFqQQwJ2nDtPXd0pVbS4VKCnwePm HxXp5f9poM9zIheKUldG8Suuk2zd30HKZaH9aTXIVZUQDeIqMUrots9jeMGDMQ3kGUd7 Ydsh/Vjsraiv4yF3NF4btVWYFnB3mDXe0q5keGGE0/FW9yIdGpG7Vh+MPmgVzs4/tMaN h1XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=URetjbda; 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=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si503586oid.82.2020.02.27.03.31.41; Thu, 27 Feb 2020 03:31:54 -0800 (PST) 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=@synopsys.com header.s=mail header.b=URetjbda; 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=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728959AbgB0Lbc (ORCPT + 99 others); Thu, 27 Feb 2020 06:31:32 -0500 Received: from us03-smtprelay2.synopsys.com ([149.117.87.133]:40720 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728856AbgB0Lbb (ORCPT ); Thu, 27 Feb 2020 06:31:31 -0500 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 5B4D6C0AD1; Thu, 27 Feb 2020 11:31:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1582803090; bh=nnsAv9kQ8j3lGYt/imLE7LxPTTFBc+oOVMrkSeC4fMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=URetjbdaQJuKFWZwAWWsxk24JtycNe7lMt715a7o3mbnSwc7B0prMJMUMYx6bRO8N 3JMS6WkgBFd8HrhMN62qbuoBGZvtEkJ153KZbv/5r83GkH37mmFV42PFv+EZLMHvq7 YKc/NLbH8W42KDLTlJGtQozymUwYjaMX3jwr68dC7N0FPTcEeFe0uZlN/ND91Deodr 9x47ohEDpCwCrn5AlmXsJOJIdC5tXKVpmrxlOfnIKGXjnlH+SuBLVBcYxxXkaSJlaV K0EKjMwi1ST8KdL8cj+X9mdzf48YhzxIRFBTOXwETSNj3REybPbhUlxvnrczm5yBC/ XuNHZg1UEc7Iw== Received: from de02.synopsys.com (germany.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 817A5A005C; Thu, 27 Feb 2020 11:31:26 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id 6FBB83E9E7; Thu, 27 Feb 2020 12:31:26 +0100 (CET) From: Vitor Soares To: pgaj@cadence.com, bbrezillon@kernel.org, linux-i3c@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Boris Brezillon , Vitor Soares Subject: [PATCH v2 3/4] i3c: Generate aliases for i3c modules Date: Thu, 27 Feb 2020 12:31:08 +0100 Message-Id: <79687073b915182e06fccfb18adcedfd0fadbc99.1582796652.git.vitor.soares@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Boris Brezillon This part was missing, thus preventing user space from loading modules automatically when MODALIAS uevents are received. Signed-off-by: Boris Brezillon Signed-off-by: Vitor Soares --- scripts/mod/devicetable-offsets.c | 7 +++++++ scripts/mod/file2alias.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index 054405b..d3c237b 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c @@ -145,6 +145,13 @@ int main(void) DEVID(i2c_device_id); DEVID_FIELD(i2c_device_id, name); + DEVID(i3c_device_id); + DEVID_FIELD(i3c_device_id, match_flags); + DEVID_FIELD(i3c_device_id, dcr); + DEVID_FIELD(i3c_device_id, manuf_id); + DEVID_FIELD(i3c_device_id, part_id); + DEVID_FIELD(i3c_device_id, extra_info); + DEVID(spi_device_id); DEVID_FIELD(spi_device_id, name); diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index c91eba7..f81cbe0 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -919,6 +919,24 @@ static int do_i2c_entry(const char *filename, void *symval, return 1; } +static int do_i3c_entry(const char *filename, void *symval, + char *alias) +{ + DEF_FIELD(symval, i3c_device_id, match_flags); + DEF_FIELD(symval, i3c_device_id, dcr); + DEF_FIELD(symval, i3c_device_id, manuf_id); + DEF_FIELD(symval, i3c_device_id, part_id); + DEF_FIELD(symval, i3c_device_id, extra_info); + + strcpy(alias, "i3c:"); + ADD(alias, "dcr", match_flags & I3C_MATCH_DCR, dcr); + ADD(alias, "manuf", match_flags & I3C_MATCH_MANUF, manuf_id); + ADD(alias, "part", match_flags & I3C_MATCH_PART, part_id); + ADD(alias, "ext", match_flags & I3C_MATCH_EXTRA_INFO, extra_info); + + return 1; +} + /* Looks like: spi:S */ static int do_spi_entry(const char *filename, void *symval, char *alias) @@ -1386,6 +1404,7 @@ static const struct devtable devtable[] = { {"vmbus", SIZE_hv_vmbus_device_id, do_vmbus_entry}, {"rpmsg", SIZE_rpmsg_device_id, do_rpmsg_entry}, {"i2c", SIZE_i2c_device_id, do_i2c_entry}, + {"i3c", SIZE_i3c_device_id, do_i3c_entry}, {"spi", SIZE_spi_device_id, do_spi_entry}, {"dmi", SIZE_dmi_system_id, do_dmi_entry}, {"platform", SIZE_platform_device_id, do_platform_entry}, -- 2.7.4