From patchwork Fri Mar 26 06:39:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 409475 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1165350jai; Thu, 25 Mar 2021 23:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb74n7lwFL4sXAl20zUm21NOMBN+X1yd2RjfGzJQqNPE8WdWtu+/Bn05BGjPvH8k/rjTuz X-Received: by 2002:a17:906:4146:: with SMTP id l6mr13928046ejk.295.1616740952761; Thu, 25 Mar 2021 23:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616740952; cv=none; d=google.com; s=arc-20160816; b=MIaqIu9ryXFNnnMSH6Y8elocPFqNWP8RAViHAC4MzdrifDbFfIOqypsWSUCwWF2AEc hZ4Msv/8BQMKiD3wGFaNaybb7HxxsGHlPi/Vg7QQLApeHKq1QjyME1t41bUWgMStvgkx jA7HP+ge/Xz3wtgsSThazHjrLztFqlbecwnx02/SWbXc8X2xLg9HNd3WiWpM1RG5P3tC 1kxHo2hpCIeRI79FK1nO7W7gr0lxvtykGiL6hznm5X71h7CwSb74X2JNHpC81PetH1Hc vqah1Na8IR34afz+i2w9sY/oXZS/56AjSLYMScUlFKy3LPCGPgt6c2jiWkPiVEasgdCx exQw== 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=P8VaQolGFCOR51eNrv/jk6ZLBrbbZ7X7Ltpf1LoAnjQ=; b=bwmg1UxQmTo5mKR+lvO/UfWqAvmS/xUIeVEO8Ea/ZzmM6qYwlKQA7BRDOhVItGxRb5 kVgBUC2hVsq9jgIMZa+Ghu7KHOo5y3haAdMYGCd0meTKbNM4GLcWljM5UABPBPkRCQoO Er3d4hqm3POSx3KWlAAAbp2t4gOtnZERgXyYBeyFc7A95RWjy/N/AfxPSfomfD7QOMka 7iLttNEWlYUYDMq/R43NpGID7CrfTnG0LFv/ObOVMAHXESezVauZYfub2+7j27a3A/kY MXrbsrJVkpIzBDPmP6wq8KxcfI5z9Q2QxjLIgWZ/OhAudDJk1+DJtD7wFTpwbKK194aB zxqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="r/SymDir"; 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 p11si5754958ejg.105.2021.03.25.23.42.32; Thu, 25 Mar 2021 23:42:32 -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="r/SymDir"; 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 S230238AbhCZGmA (ORCPT + 6 others); Fri, 26 Mar 2021 02:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbhCZGlZ (ORCPT ); Fri, 26 Mar 2021 02:41:25 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC522C0613B0 for ; Thu, 25 Mar 2021 23:41:24 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id h13so5062120eds.5 for ; Thu, 25 Mar 2021 23:41:24 -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=P8VaQolGFCOR51eNrv/jk6ZLBrbbZ7X7Ltpf1LoAnjQ=; b=r/SymDirP7YsfplabAthL2rjNIEsp2UpQhJ6IQeQAt3/I84Eynq5qj3dKhWsBQR25L EBBsBag5vV+/5jRLbAvlnNuKJfLDGFuctI6aeFt8PvZSCh6r1xcAO2czt/JbOeomouuc aW0dptOiPwQYDJiYCZkgHXSdkJpNqoGgQxnldzOvvj0NGKKnn0Qg1Po74+7FMe5YbLCv tNCDYWEdxvXieEB0EVWMuDx/nh11yG+8tnj58Q639qX0mSHLMcVe4XYVLMQ52Uob4PuR rrJS+hycvoLfGbgY6Gr4k/vE3013BDdBejvCU0kPC2go8TstO2TooFkSAiHnmL5aRvw1 5Lig== 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=P8VaQolGFCOR51eNrv/jk6ZLBrbbZ7X7Ltpf1LoAnjQ=; b=i3S/1aC4g8y89QUoi6zXmSJ3+g2R/ttLehQmDDsCz//XWEOoXn0KeSGxom/QQtCvBN p/mRrD9GjrJCIxOw7Tf5jbg9ipW4tFhgy3I9MTH1Q3MhHt9j/QEEX0MTVAvvgmS+qS5b AtD102may9FvdsuJgFPrJOU1ttK6Y1HwVhw2XxsJS70DmYO5pHjmS2sY9TX4UYRv1YSV 6eqQYXKrzbiKfcOURq+FRTeP5s6ciCN0w0Xihykmt/RuslSV1WAlahhf2vmWWJ0A5bQs N0P/UyP2SyZBktwGszp1iG4/e6cqcIRsIgKOcv25JunO6ETyWBqIlBl3ZGAyvP0TwUM+ 0jgA== X-Gm-Message-State: AOAM530ESxaPI71p44HivW5Py/A1XoE907opvXSYN/Mi8rlZHU2L9H6c SRtS/xi3thqBDg5VU8XoH7n4rw== X-Received: by 2002:a05:6402:2695:: with SMTP id w21mr13146872edd.99.1616740883626; Thu, 25 Mar 2021 23:41:23 -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 ci22sm125325ejc.54.2021.03.25.23.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 23:41:23 -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 v5 7/9] soundwire: export sdw_compare_devid, sdw_extract_slave_id and sdw_slave_add Date: Fri, 26 Mar 2021 06:39:42 +0000 Message-Id: <20210326063944.31683-8-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210326063944.31683-1-srinivas.kandagatla@linaro.org> References: <20210326063944.31683-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 46885429928a..6d7708964735 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 180f38bd003b..92850e150d36 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 2f52d6609076..f9003ba056ba 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -1011,5 +1011,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 */