Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7081771imm; Tue, 24 Jul 2018 08:06:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcmC3q1yb/CfH3dfSXoeWiU0JZlBeL/rkRwduCZOb8tIW5wwsp013OHzyZYY1kePuS3zM5b X-Received: by 2002:a62:3545:: with SMTP id c66-v6mr18070032pfa.63.1532444810732; Tue, 24 Jul 2018 08:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532444810; cv=none; d=google.com; s=arc-20160816; b=nFzagq913pxJuEx5QewMYwGaRDyy9/ahKsdF3xN+BW/A4uE+AC8XixoiLP6SEWBpeL lSdij5LW4a260o61S+x6JSE4d+A8yTaaSSFVLU5PMyMMEdMyKWmALrW1yQuK3MnHRqa3 TF5t1GG8iuIrDAFiC2oBAQ6HK+Nkb9InhcHbETOEq9BKKrQn+ObKhF+iwvkbnG+ym4aO PirefWM1Mv6LptsHIZ9C3+fnUxnPBmA/I4qYqWBXb0cMAFCbPPI3FwOCkuRQQzruyhXJ QTwENIRkPVSm4M+pDNeNxYIWgSrrKhsvhzoh/DaiE9YCSKziwpFsjrNs9NCyNH3MqfIu saOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:arc-authentication-results; bh=IqocOiyKOEeKG29E9sBB05Z8CWIQGYK6CZPqTO3/t4I=; b=eNrbIeR6rZ0FZnVFW/V2xqYKKfMZ+LbPdg5pdWtBLxBbhBuaI+HWWbFdjCMcRaup3I +8gB+9GfWB1G16RDE0h5/0VCSKL5WCey9y8GVbUavPdQHOraZA3P/GUxWDHv+voKbxA3 nZwxjeXImTWemmwa5MlQfYH46Mr/XRc3ONrtPz/jk1y0uPqCER+qMOjyrVazQrsVfppT h+D/bqKCB9qPIyPqAWKm9/gNdzqIarQO/0rwcvT6yflc72Ra2HxS7PVnUu5NCNVHaqda XTjfiiJUbJmVkxTABbSr55GWJYa9qZFN42/H+Fbjad/mF+D7sqbI5fdhaAV/R8OI/8WF Otdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=ltOr6WCF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be5-v6si11428063plb.67.2018.07.24.08.06.36; Tue, 24 Jul 2018 08:06:50 -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; dkim=pass header.i=@crapouillou.net header.s=mail header.b=ltOr6WCF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388429AbeGXQL5 (ORCPT + 99 others); Tue, 24 Jul 2018 12:11:57 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:58588 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388172AbeGXQL4 (ORCPT ); Tue, 24 Jul 2018 12:11:56 -0400 Date: Tue, 24 Jul 2018 17:04:55 +0200 From: Paul Cercueil Subject: Re: [PATCH v3 07/18] dmaengine: dma-jz4780: Add support for the JZ4770 SoC To: Vinod Cc: Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , Zubair Lutfullah Kakakhel , Mathieu Malaterre , Daniel Silsby , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org Message-Id: <1532444695.2610.1@smtp.crapouillou.net> In-Reply-To: <20180724133229.GG3661@vkoul-mobl> References: <20180721110643.19624-1-paul@crapouillou.net> <20180721110643.19624-8-paul@crapouillou.net> <20180724133229.GG3661@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1532444700; bh=IqocOiyKOEeKG29E9sBB05Z8CWIQGYK6CZPqTO3/t4I=; h=Date:From:Subject:To:Cc:Message-Id:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ltOr6WCF6u59Oi0NYPZO06a64uetxdOmtCL4mJC5SfsBkAjSmDttrar4dEsI/A6DTS0cEgAw5RGKEcO3Jp5A866FWwwpnD2oV8X5f7XkJgVuH2YRs1dTiihw+ovasviWJfw7FBmS6uevVUiPm+rtuFoHpxydB3eoRAtRR2Mu9VQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vinod, Le mar. 24 juil. 2018 =E0 15:32, Vinod a =E9crit : > On 21-07-18, 13:06, Paul Cercueil wrote: >> +static inline void jz4780_dma_chan_enable(struct jz4780_dma_dev=20 >> *jzdma, >> + unsigned int chn) >=20 > right justified and aligned with preceding please. While adding new > code to a existing driver it is a good idea to conform to existing=20 > style OK. >> +{ >> + if (jzdma->version =3D=3D ID_JZ4770) >> + jz4780_dma_ctrl_writel(jzdma, JZ_DMA_REG_DCKES, BIT(chn)); >> +} >> + >> +static inline void jz4780_dma_chan_disable(struct jz4780_dma_dev=20 >> *jzdma, >> + unsigned int chn) >> +{ >> + if (jzdma->version =3D=3D ID_JZ4770) >> + jz4780_dma_ctrl_writel(jzdma, JZ_DMA_REG_DCKEC, BIT(chn)); >=20 > so if another version has this feature we would do: > if (jzdma->version =3D=3D ID_JZ4770) || > if (jzdma->version =3D=3D ID_JZXXXX)) >=20 > and so on.. why not add a value, clk_enable in the description and use > that. For each controller it is set to true or false I agree with what you said in your other answers. However here I still need to check the "version", because on JZ4725B=20 and JZ4770+ the way to start/stop each DMA channel's clock is different, so I can't=20 use a boolean. > -- > ~Vinod Thanks, -Paul =