From patchwork Tue Mar 30 14:47:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 411745 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4527299jai; Tue, 30 Mar 2021 07:48:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ43nkI88QJCLhyWb5T4xnDs9WWUDZg3ok3+HX4taHwWMZJjmowylTJS3HHe5VousCERSh X-Received: by 2002:a17:906:32da:: with SMTP id k26mr33640784ejk.483.1617115714207; Tue, 30 Mar 2021 07:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617115714; cv=none; d=google.com; s=arc-20160816; b=xHplJe18MLkkaq+bMaStxBL3WMWSiVWwAFTmWprznt+YRdaUfIZOp6tro5A6ILX7R3 zZ4ZYHOsjXAE1W0xmxEvlFH9gtwFIswgLhKk+Uk+wFk4WliZLzGBR6L4l9uO5FPfTz9Y uPCnReWNtJAg8MAJhDfyXejN5Z943/+zmgL7dyhetmwqYeI6gfdVPcpr45pxO26y1QcR SfQB5fDnVNthOJGGTu5iBdcoARj3e8hrSS+oazKFrMP1jZEvHTpWPHxOz4V1OSGkVf9u UGj/llq25Zsq2wB15QMXowX1TD0eVx+UZMx++xi3hSxEhq0o3IezShFngXqqFP727Jhi bc6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p958/KgSVdF5+9QpbHuTIEsCC6E24Ycmg43m5LKY0o4=; b=FPCNpyFoU53JoG1A4anGpBHRB/SgqafiYMOb74XCDCl8zigD+OQ+uG2uZ74nIGDeda UysVKZAvQ5GgIbxoeLAPMuePYLy50KEmQ5Qq/EF4WlHSoUmBARLYnNTIMgfhdhOn5YRm Ki0e+efLZyvHd+z05mDzUl8cDfe/asKIhHe+o9Q85ryhfJ3X8IDfJJ56YURRqV5AVyZG a0Ic11lEwBFr6RmdBf8eQrv7UNwetNJygHe1TM/SfIQaKMN/9VIWsbTXs0usLcopZxKe IEOE8T4ovWNrnJ1y8J+ddUoEaKKoAq5kqgBDUdjBhy8tpbU+vQ9W2NxRYCcAaci0ttKh ibNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TijfAYCV; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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. [23.128.96.18]) by mx.google.com with ESMTP id s5si15278409ejx.287.2021.03.30.07.48.34; Tue, 30 Mar 2021 07:48:34 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TijfAYCV; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S232014AbhC3OsA (ORCPT + 6 others); Tue, 30 Mar 2021 10:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232019AbhC3Ori (ORCPT ); Tue, 30 Mar 2021 10:47:38 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30029C061762 for ; Tue, 30 Mar 2021 07:47:38 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id bf3so18530275edb.6 for ; Tue, 30 Mar 2021 07:47:38 -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 :mime-version:content-transfer-encoding; bh=p958/KgSVdF5+9QpbHuTIEsCC6E24Ycmg43m5LKY0o4=; b=TijfAYCV9yntgSN/zpB4NqshxbZFEgPMvpo6bQnDNJenVWSFlXYCDW5B7GD/pPU1EZ e1PnMb1qRT3KM/JmPorV7rQQFFR10NzUOUjQk3FSITerXhbD+t98MYD791dndRthzCDK UxaMM5CyIjEphTUUWlydQDAv/oSzcbFw4+5IhCLrhFu14+gJB3I2Y3ScqiR5zsg1w9yt chPtx8zuQxg3U1TpWAiiKB1cQ04ito8ghvAe7ta274P9FXr2cXlV15x2t56CYdMOiWeJ OdSrh4cfNQdwONHa6IvIh05sQaOJu48JGQZpMPQKadVCQdJTUAz3fzF6Eyiec+Z78N92 QfGg== 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:mime-version:content-transfer-encoding; bh=p958/KgSVdF5+9QpbHuTIEsCC6E24Ycmg43m5LKY0o4=; b=Kzb2W00FX8918ZbZyi12qszPk7964jOh1BW/HG4jcAdpU5S/Ki13y3VVJ1hrkxq3qT oeUh5sLw6jD/Q152Bztmvl2FwQfwx983zkQeXj7+eXZjh7NtEReVmikjhSu54TiSFgSB U0OMAE9mxypY5Uc3N3tDDqY7RRq2xysafI/9Ms/OWiGXemKXSQyfYPmwYOue4NTO1Seg sLNFn7eB7WDm285R4z8FcDxjbC/FS7haqHJN8OAbChq9j5C6CvrlhKx+2GwsRBMfU/k7 5+But40EahUuCSmAkHSPc161oLftoCZoAxEkmfGtwJBeeShwue5oXHhCwBAQ43bZYDTw /I9g== X-Gm-Message-State: AOAM532klRCsb4Nu6QYEOo0ZAeOwzQe1aRb0m7/v5hM6TtkKOVfVioDf DYmHvXMIx92d32i0l+1YImnnsw== X-Received: by 2002:a50:e80c:: with SMTP id e12mr34395379edn.229.1617115656985; Tue, 30 Mar 2021 07:47:36 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id n16sm11520383edr.42.2021.03.30.07.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 07:47:36 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, robh@kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla , kernel test robot Subject: [PATCH v6 7/9] soundwire: export sdw_compare_devid, sdw_extract_slave_id and sdw_slave_add Date: Tue, 30 Mar 2021 15:47:17 +0100 Message-Id: <20210330144719.13284-8-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210330144719.13284-1-srinivas.kandagatla@linaro.org> References: <20210330144719.13284-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Exporting these three functions makes sense as it can be used by other controllers like Qualcomm during auto-enumeration! Reported-by: kernel test robot Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/bus.c | 4 +++- drivers/soundwire/slave.c | 1 + include/linux/soundwire/sdw.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) -- 2.21.0 diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 9bd83c91a873..a9e0aa72654d 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -603,7 +603,7 @@ static struct sdw_slave *sdw_get_slave(struct sdw_bus *bus, int i) return NULL; } -static int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id) +int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id) { if (slave->id.mfg_id != id.mfg_id || slave->id.part_id != id.part_id || @@ -614,6 +614,7 @@ static int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id) return 0; } +EXPORT_SYMBOL(sdw_compare_devid); /* called with bus_lock held */ static int sdw_get_device_num(struct sdw_slave *slave) @@ -698,6 +699,7 @@ void sdw_extract_slave_id(struct sdw_bus *bus, "SDW Slave class_id 0x%02x, mfg_id 0x%04x, part_id 0x%04x, unique_id 0x%x, version 0x%x\n", id->class_id, id->mfg_id, id->part_id, id->unique_id, id->sdw_version); } +EXPORT_SYMBOL(sdw_extract_slave_id); static int sdw_program_device_num(struct sdw_bus *bus) { diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index 112b21967c7a..0eed38a79c6d 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -88,6 +88,7 @@ int sdw_slave_add(struct sdw_bus *bus, return ret; } +EXPORT_SYMBOL(sdw_slave_add); #if IS_ENABLED(CONFIG_ACPI) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 350436db6ddb..5ff9a8f37e91 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -1039,5 +1039,7 @@ int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value); int sdw_read_no_pm(struct sdw_slave *slave, u32 addr); int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val); int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, u8 *val); +int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id); +void sdw_extract_slave_id(struct sdw_bus *bus, u64 addr, struct sdw_slave_id *id); #endif /* __SOUNDWIRE_H */