Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11445214ybi; Thu, 25 Jul 2019 16:44:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyftmnyqznInAyc0vWdYdkjH0ykPqmfxHoHHrG8s8ZxlRQZQIWYJ62rUsnQPJOZM3P3S0kw X-Received: by 2002:aa7:8108:: with SMTP id b8mr19526176pfi.197.1564098259930; Thu, 25 Jul 2019 16:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564098259; cv=none; d=google.com; s=arc-20160816; b=XFRju4C8sf6tBFfx/eK8Wa2WayIFDOpgkM2CTvCArCLrpg0FKqD94JObaQQBEkt3tc y06xij7N3kAkH8WjiCH2CAloDiQg9VsJ6PQfUJf2qnt2na3ZeQAXjVWsQN7XAwU3+KA8 UyK6+VIIdR7YlyHNvG8F5qtQZKFQpcs5UKFfZlVtjin3cgjKmPq4cRkTIdEchXccnkTv y/V+IIOh13R2h7jebkHyrRIb/BOVPeXRhdw//stZMmE+in5QgOEHp2muOZnD2AxeeROf gWZ6phO2gFkdwFkCe6tYXSf3LK6RRhAdT1WEmYqwYdSwT1ltdKNvK5YGRy9HIBunqM5r H38g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AeXoask0aVQ977lgL+Fbgz9/wyLVA8tuU1GZXgyL9uk=; b=VF4wELtY1EUJmyMMxtuBphHR5eTMYsuT+/D1MGTilxGFdibggEpxlOEpuvh2hr8r7d JSWSchSRKEIy9f9PLpbtn487NHDEV9Dmv25PSlOJV9SYTL+0H1muikblEM1Yd+MhrZRA X+HGTKydcoptMIzGB3ZlyH8OK2ftXWUC9yTUVaCelEwtn0PvDjVzFY3rwRfz7vCMlepI PtV1+BYghNeF5lUoF3jqRzJZ4DeD8pNYI5Yftnjg5e0EYrCqLsQoQC+rgfrzzBPmac2Q NpoRCxHhhAAeedG/2Qe2dtkfX067ju8JErQ82q4zJxvMn5c55WXHOpdMqYhfparD5e/L hrRg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si17396656pff.103.2019.07.25.16.44.05; Thu, 25 Jul 2019 16:44:19 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727418AbfGYXlf (ORCPT + 99 others); Thu, 25 Jul 2019 19:41:35 -0400 Received: from mga06.intel.com ([134.134.136.31]:51808 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727365AbfGYXl3 (ORCPT ); Thu, 25 Jul 2019 19:41:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 16:41:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="369874735" Received: from amrutaku-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.230.75]) by fmsmga006.fm.intel.com with ESMTP; 25 Jul 2019 16:41:27 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Pierre-Louis Bossart , Sanyog Kale Subject: [RFC PATCH 19/40] soundwire: bus: improve dynamic debug comments for enumeration Date: Thu, 25 Jul 2019 18:40:11 -0500 Message-Id: <20190725234032.21152-20-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org update comments to provide better understanding of enumeration flows. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index bca378806d00..2354675ef104 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -483,7 +483,8 @@ static int sdw_assign_device_num(struct sdw_slave *slave) ret = sdw_write(slave, SDW_SCP_DEVNUMBER, dev_num); if (ret < 0) { - dev_err(&slave->dev, "Program device_num failed: %d\n", ret); + dev_err(&slave->dev, "Program device_num %d failed: %d\n", + dev_num, ret); return ret; } @@ -540,6 +541,7 @@ static int sdw_program_device_num(struct sdw_bus *bus) do { ret = sdw_transfer(bus, &msg); if (ret == -ENODATA) { /* end of device id reads */ + dev_dbg(bus->dev, "No more devices to enumerate\n"); ret = 0; break; } @@ -982,6 +984,7 @@ int sdw_handle_slave_status(struct sdw_bus *bus, int i, ret = 0; if (status[0] == SDW_SLAVE_ATTACHED) { + dev_err(bus->dev, "Slave attached, programming device number\n"); ret = sdw_program_device_num(bus); if (ret) dev_err(bus->dev, "Slave attach failed: %d\n", ret); -- 2.20.1