Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp48039imw; Wed, 13 Jul 2022 18:52:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uowRcCGc9zjulHqBlIzw0GTyzG9ONIyx7rmWBd6QFOxDR/y6rLaloYvZCmg7JeV/lvhLRS X-Received: by 2002:a17:907:3e13:b0:726:eebc:3461 with SMTP id hp19-20020a1709073e1300b00726eebc3461mr6228705ejc.528.1657763530535; Wed, 13 Jul 2022 18:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657763530; cv=none; d=google.com; s=arc-20160816; b=EyGkWAMCm8mPvCcOjP8HEaOjiKUNgtb2gDSYA2loHleuj+EyJEuPKSbWsjmkyA/2fS qwA74P7MQ0bu+yfL3oAvl+Tly8Iemrqbj5QIdA9a+GdydPgW9eU8DGnCpJ15gDNq3+ZJ eUXOwkylRJi80Tu3ZVb3u+FqbhagGxVMQ4Ftt6rCfWnfTddW9yfdQvKgBoiD2KXdq3jS 7YUOvQE1SvLkwsCLzTaECKmmPHWTFQoYjx+tfJrPduvKevnzr+J1Pxl3TF8F3Oi6TpSU rIqmyO5YcvWWrmTcgL5aSNCksyIsYookEUAaJsxDzEn/pvqH5qDdPFkKCHrxLIbFXXZ7 BKcg== 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=07mpPUgc5M3lVmqXLMUhgdqbbrFnt83QFAnhX6eQgGg=; b=FLgb2EqjskQ6ThVQQgzGC5h7xPY06VEey+BDY0TsK0jvkc6NDMThaA/B0A/DIXaClr WuALJeuTTJH8O05Z7xdCp0ocjbCyDDH5qHTdS/Wrywb02OTvbliDFur7O7AAQBRtvSXz IbH3ajvu93Rd9RTkmYOFoVyGLbfSRcDH60As2ayGR0LEF9dtaI2R3qffdhjj0oYRA7dY fctVoe1klrFcHwxSvlpxgq5WNWJ0FdH/MTryz1Mm0l5UJNZ9eeu/1Jna09XOB3efhL5u w2/DvPCLCEPnWR+Y5TgLok1w1bfkJxHrCA/iKL03ILcsjBRlzEPUDkCKU9xO3koXJTkh jrag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YL5PGyvM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne35-20020a1709077ba300b006febfa8bf0asi442923ejc.509.2022.07.13.18.51.44; Wed, 13 Jul 2022 18:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YL5PGyvM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231543AbiGNBKy (ORCPT + 99 others); Wed, 13 Jul 2022 21:10:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231510AbiGNBKx (ORCPT ); Wed, 13 Jul 2022 21:10:53 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 098B120194 for ; Wed, 13 Jul 2022 18:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657761053; x=1689297053; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XgIzkdg1w/45yFVa+8wnGc4HfPgO64m5VVNu5kFaai4=; b=YL5PGyvMA8tr2cQt6O9JGJ6fbLiTGMi/LinDdAuv0xeIoVnv2S2c3KRl 3lGqqez9VKoYENPVKbXX0uqVOk7v/XHR/ZdxSECPjSknSRj9qTASSlQQo Xai7YzTR3rg3HEtUgq1QZ+z2tzmKfEWhMYWuEIjoOvMlPa9Ib4Pk4lheS nCriZeP1KWU2sU9/7C5Q6i2sU0cJYvyd795uebtSh+hcUsYOHEB1GNBmC lTEESEliJqGe+FLXsT54b+/3aW1AVWaDL8JZdDjaO7EiBGFiIBmBoUoCU akfEora4su+OrXwhsGOAtQ7fImi4R1+LGjnyFPomfgcwhNYBD3Um5MaDY g==; X-IronPort-AV: E=McAfee;i="6400,9594,10407"; a="282937912" X-IronPort-AV: E=Sophos;i="5.92,269,1650956400"; d="scan'208";a="282937912" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 18:10:52 -0700 X-IronPort-AV: E=Sophos;i="5.92,269,1650956400"; d="scan'208";a="593192510" Received: from bard-ubuntu.sh.intel.com ([10.239.185.57]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 18:10:49 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com Subject: [PATCH 1/4] soundwire: add read_ping_status helper definition in manager ops Date: Thu, 14 Jul 2022 09:10:40 +0800 Message-Id: <20220714011043.46059-2-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220714011043.46059-1-yung-chuan.liao@linux.intel.com> References: <20220714011043.46059-1-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart The existing manager ops provide callbacks to transfer read/write commands, but don't allow for direct access to PING status register. This is accessible in all existing IP, and would help diagnose timeouts or resume issues by reporting the 'true' status instead of the internal status reported by the IP. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index a2b31d25ea27..a85cf829bb77 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -839,6 +839,8 @@ struct sdw_defer { * @set_bus_conf: Set the bus configuration * @pre_bank_switch: Callback for pre bank switch * @post_bank_switch: Callback for post bank switch + * @read_ping_status: Read status from PING frames, reported with two bits per Device. + * Bits 31:24 are reserved. */ struct sdw_master_ops { int (*read_prop)(struct sdw_bus *bus); @@ -855,6 +857,7 @@ struct sdw_master_ops { struct sdw_bus_params *params); int (*pre_bank_switch)(struct sdw_bus *bus); int (*post_bank_switch)(struct sdw_bus *bus); + u32 (*read_ping_status)(struct sdw_bus *bus); }; -- 2.25.1