Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1387964imm; Sat, 4 Aug 2018 02:23:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpccrDruZT5JKx8mLEBQOFcysniHyVGaakHKd8Es6Ap/EHlgrhxlc+LWDWg7faF1ZEcK+PaX X-Received: by 2002:a62:1157:: with SMTP id z84-v6mr8405863pfi.66.1533374623254; Sat, 04 Aug 2018 02:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533374623; cv=none; d=google.com; s=arc-20160816; b=BpoBqrmnUJpurndiL9OZpNaF5rImqWARvYurb+T4dZFdvrTroK/m4KMhsX5ur5SLvY Ry6lZtdifSmu6KYNlbJQadIyf6m+QbM61p5pRrKMSLXCJBwqoQTrdpbjdJcZl0ypLAU8 p6nCZCDpGuR4snzvC3DdL/NjhvaA1/1W4xJeCmy+CVjNDjqvXhgQn0V1o5DD5m4k3GFy BwAhVXlDCzVknX5srMPKOE4U6hxMpdK8uZcNCTDEKzkDAb7DTchrz7mpGXiyomtiX1Pq nVR7/QRmt71iW6ffQPeVgJVcjMhvKHMJQcYWKX1CcHtfaNZ+pGeDgW9xUofZODb6rtVc SpZQ== 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=rLTL4GAA9J+EJe3+etHrXZuGJOFlqoGpx6OHEgD8+JU=; b=fCaTcJ2QZjPHqktBOGJoD19pkPDTMV74IECmWu1U0C5FfiTOXCOq1Jfda696xUVGnD ccreQHDvludRO/OMWENBabVzY9rQysmJh8bufJi0j/XTLBfxEuQFn5p9Uq5aA4hdsW2Q U5txKFZnZcekZaOTRDaeuaEfhfOZAxn40sULDwCIhhDVi6IuTLt7w6R6EuZpNET7ctYQ CDzT98UdK4eE1XvtFBfujpoF6U1RkI9D6zoLLwmzFS/GG2Ry6otTO0OrFIlorB1imZZv jhvQ0LIshrYiwtVa2k+KokoNybnm0P9mrNtDHMq91N/STJ0whfquRiVP6jP8Cq/dS3VS FkuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=Zzdz1b2s; 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 v66-v6si1359695pfb.368.2018.08.04.02.23.28; Sat, 04 Aug 2018 02:23:43 -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=Zzdz1b2s; 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 S1732271AbeHDLDY (ORCPT + 99 others); Sat, 4 Aug 2018 07:03:24 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:57206 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbeHDLDY (ORCPT ); Sat, 4 Aug 2018 07:03:24 -0400 Date: Sat, 04 Aug 2018 11:02:57 +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: <1533373377.10806.0@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=1533373403; bh=rLTL4GAA9J+EJe3+etHrXZuGJOFlqoGpx6OHEgD8+JU=; h=Date:From:Subject:To:Cc:Message-Id:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Zzdz1b2srda1Tw7UfWZ47QhJBhgpCHIe1QgMv+vJvzqRbPXo/U2x6wQceZliPiiuoiXrLO3jlQq6DU1FhM90hPb2GgWgnFsFQsXKXBIikVlOpSSfC7wQ8rMKateBdGT5UKF4uqhLafeANR1QpNZIkj9xkRE9PvdMomO8Ruh5Ync= 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 Well that's exactly what I did, this is the style used in the DMA=20 driver, so I tried to conform to it. >> +{ >> + 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 >=20 > -- > ~Vinod =