From patchwork Thu Sep 3 11:44:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11753425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 765E2722 for ; Thu, 3 Sep 2020 11:46:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80DD0206EB for ; Thu, 3 Sep 2020 11:46:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="eQQSAFk0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="nwWZs5xu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80DD0206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ADB5718D5; Thu, 3 Sep 2020 13:45:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ADB5718D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599133575; bh=X9kU0LEJm1P4PY/yoSWd8AzDqFeRBLYLY94wkbU9bAI=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=eQQSAFk0SALjvQDsr2RiswwFgfj+BObgLIQy1snGFp4q9Xx4L5SJGIv0G9JzSU1FB dH1lTcd9dt7qrHnXZChf6CesCcIrVotae9bHTHbf2ksDUrhVektjcyjY7cM6DeGbVn nK47Nf4CiXcBztP62zwN41pSYmhI0g0gUNLnA8fQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E2D48F8021D; Thu, 3 Sep 2020 13:45:30 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id BEFABF8025F; Thu, 3 Sep 2020 13:45:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 91733F801DA for ; Thu, 3 Sep 2020 13:45:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91733F801DA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="nwWZs5xu" Received: from localhost.localdomain (unknown [122.171.179.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C7EF220709; Thu, 3 Sep 2020 11:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599133518; bh=X9kU0LEJm1P4PY/yoSWd8AzDqFeRBLYLY94wkbU9bAI=; h=From:To:Cc:Subject:Date:From; b=nwWZs5xud/NZDk+yzGss4gX9AfQ0B3NyQivPQlEdQ0ootmZd5l2xFD8/6Ixy5wG6a VnPJ0Z/7loWe6pQf4fY3bXzJAvKs2TpCEb2b75iOUMFcATnlncsAvUZt7Rd83q6JpV yyatyM6bqMW6VVucEoQ+a+6BbgiDvHdtqcNQlJMo= From: Vinod Koul To: alsa-devel@alsa-project.org Subject: [PATCH v2 0/9] soundwire: use FIELD_{GET|PREP} in subsystem Date: Thu, 3 Sep 2020 17:14:55 +0530 Message-Id: <20200903114504.1202143-1-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Cc: Srinivas Kandagatla , Sanyog Kale , Bard Liao , Pierre-Louis Bossart , Vinod Koul X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Use the FIELD_{GET|PREP} in soundwire subsytem and remove the local SDW_REG_SHIFT(). This makes code IMO look much neater Tested this on db845c board Changes in v2: - fold in fixes provided by Bard and Pierre - Use GENMAS_ULL for addr - rebase to next and fold in new intel change Vinod Koul (9): soundwire: define and use addr bit masks soundwire: bus: use FIELD_GET() soundwire: slave: use SDW_DISCO_LINK_ID() soundwire: stream: use FIELD_{GET|PREP} soundwire: qcom : use FIELD_{GET|PREP} soundwire: cadence: use FIELD_{GET|PREP} soundwire: intel: use FIELD_{GET|PREP} soundwire: intel_init: use FIELD_{GET|PREP} soundwire: remove SDW_REG_SHIFT() drivers/soundwire/bus.c | 6 +-- drivers/soundwire/cadence_master.c | 61 +++++++++++-------------- drivers/soundwire/intel.c | 52 ++++++++------------- drivers/soundwire/intel_init.c | 2 +- drivers/soundwire/qcom.c | 22 +++------ drivers/soundwire/slave.c | 2 +- drivers/soundwire/stream.c | 13 ++---- include/linux/soundwire/sdw.h | 21 ++++++--- include/linux/soundwire/sdw_registers.h | 7 --- 9 files changed, 75 insertions(+), 111 deletions(-) Tested-by: Bard Liao