Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3231390imm; Sun, 3 Jun 2018 23:11:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIM0zAB4OsW5quGUQj0IqvPoNQdclcSoxJlkHjmibnQ+VaIRQexC0T9AOcu8I0Q3bN9FTEG X-Received: by 2002:a62:581:: with SMTP id 123-v6mr20216523pff.38.1528092691959; Sun, 03 Jun 2018 23:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528092691; cv=none; d=google.com; s=arc-20160816; b=IMqPsXh+7HPvmWRBkKflCg4Z0g4iSWGexXNHXeOAw113Tv99UJSXUpG1x8vzngtN92 KvAhzgBicxM/Uk8j1OA2NJ/RgLSsEsRfJCEoQl11H5WjdEQlS6ebds+NVx7pwWvYwnVL ZutV32s8MEQ9AiBorqcIX2yf+SAZ8yiLantpENXDUzSgqzKpPk4I7eSDmiyi9Y3Vi1Dn uQaJKttnWNEWI/ga1FFtlQ+iOvrXCpqFVsJUZ2F0QrSGc+6mqxRNlxnifH8NfawfJFeD Wcb6/0ezH1ig31j4pQHtEpGM7DDmPij0PZ4L+GzwhFtsszcW4Y4crSFQMMABJLV9Wnxt 40nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=aIMlXcQoSnnUqD1dCg9e8cgGrrRBzpk9CAYMa1l4y2E=; b=hYK/jeTAjF9WYvx9kc2S0d+MuM+vfCbUas+C0Tt/VqOgiJD7J7L0AEqPKulVtam/HH IWjDXE9dpqrjVhFOkc5mYTUCaT2kYDHcHJ4YV6zCpvKcR+BuBIRc/RICIYEUtCerK/o1 bW98G2zoi39rU1f4JBtoQ3CGYyjOuMEWFgZa3L2wP169qcvWunfxHU2YWCAP3gQn08p3 UCu8oZAW6qcCbZlJcftDDfe6EeRbnXZzauMu3cLHvjjhkG0jj9U1YrdJHwbTM7k4Lx+V 7JBb8FujhvQovoxCQ1daEwZQRv63GV4ZjxUUQrzbEe6WdSwBOAVKtSj/oicIWRfhCOlO hQSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LVHR+ARl; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2-v6si43489433pff.184.2018.06.03.23.11.17; Sun, 03 Jun 2018 23:11:31 -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=@linaro.org header.s=google header.b=LVHR+ARl; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751838AbeFDGKJ (ORCPT + 99 others); Mon, 4 Jun 2018 02:10:09 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35917 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbeFDGKI (ORCPT ); Mon, 4 Jun 2018 02:10:08 -0400 Received: by mail-wm0-f66.google.com with SMTP id v131-v6so12381719wma.1 for ; Sun, 03 Jun 2018 23:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=aIMlXcQoSnnUqD1dCg9e8cgGrrRBzpk9CAYMa1l4y2E=; b=LVHR+ARlMi1Jv4PXPvJCh03t7B6VW6TpxvFa6j/p8wz0xfJTTay8EX2K92KPBy5IAO 8Km053oY6tqFs4S+56wm7a869dHcFjoib/K8d00Yht0yEuXsRBRAp5vyAvqT1uYRBUw/ fumMjWYwx+mJpD8xThtKWj0tn9oZtwvM8brJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=aIMlXcQoSnnUqD1dCg9e8cgGrrRBzpk9CAYMa1l4y2E=; b=uJM5ytdKgH99HmU0cZfAalHO33Kk29dC/wkdQk70wh4vc/6mcaQaOifCyU47hJfcdQ 5zuNTSwObJGGef8WFZVM2WpRSDNE4LzgwhYn+0Yj78f24OuSMB9YSg0TW5niY1op5fGA Z5I85OyoZcwOkyeWah+qctNs+kCIUabD2RrcbUiFn2UmVxKMh1E/OihqXDToVZC3iS04 ia70bu/oJqTIP6AUSG1ZT1d2I/eyj/Kg0mWJIJmxDN1espO9fwUx9fdWDD6NKGe3TxjX crbND4gKe5H6ChwHkX6K/JYPBpdAGnLwO2JbSWFEgPlvmsfAzFZeTjd4VfY9iZ4w7eo3 CiEw== X-Gm-Message-State: APt69E2ryGsHsjA+QmrPAizXSrsGjhrpFkbHgHAygV8q87areGzNtnE9 bHaNJuh6+COG5dahqCuTOG4EzQ== X-Received: by 2002:a1c:6dd3:: with SMTP id b80-v6mr7758438wmi.32.1528092606868; Sun, 03 Jun 2018 23:10:06 -0700 (PDT) Received: from dell ([2.31.167.234]) by smtp.gmail.com with ESMTPSA id f81-v6sm10862182wmh.32.2018.06.03.23.10.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Jun 2018 23:10:06 -0700 (PDT) Date: Mon, 4 Jun 2018 07:10:04 +0100 From: Lee Jones To: Fabrice Gasnier Cc: alexandre.torgue@st.com, thierry.reding@gmail.com, benjamin.gaignard@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, mcoquelin.stm32@gmail.com, benjamin.gaignard@st.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: Re: [RESEND PATCH v5 2/6] mfd: stm32-timers: add support for dmas Message-ID: <20180604061004.GA25455@dell> References: <1526456161-27865-1-git-send-email-fabrice.gasnier@st.com> <1526456161-27865-3-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1526456161-27865-3-git-send-email-fabrice.gasnier@st.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 May 2018, Fabrice Gasnier wrote: > STM32 Timers can support up to 7 DMA requests: > - 4 channels, update, compare and trigger. > Optionally request part, or all DMAs from stm32-timers MFD core. > > Also add routine to implement burst reads using DMA from timer registers. > This is exported. So, it can be used by child drivers, PWM capture > for instance (but not limited to). > > Signed-off-by: Fabrice Gasnier > Reviewed-by: Benjamin Gaignard > --- > Changes in v5: > - fix warning on dma_mapping_error() that doesn't return an error code. > - move stm32_timers_dma struct to header file as discussed with Lee. > This allows to remove alloc for this struct in stm32_timers_dma_probe. > > Changes in v4: > - Lee's comments: Add kerneldoc header, better format comments. > > Changes in v3: > - Basically Lee's comments: > - rather create a struct stm32_timers_dma, and place a reference to it > in existing ddata (instead of adding priv struct). > - rather use a struct device in exported routine prototype, and use > standard helpers instead of ddata. Get rid of to_stm32_timers_priv(). > - simplify error handling in probe (remove a goto) > - comment on devm_of_platform_*populate() usage. > > Changes in v2: > - Abstract DMA handling from child driver: move it to MFD core > - Add comments on optional dma support > --- > drivers/mfd/stm32-timers.c | 201 ++++++++++++++++++++++++++++++++++++++- > include/linux/mfd/stm32-timers.h | 46 +++++++++ > 2 files changed, 245 insertions(+), 2 deletions(-) For my own reference: Acked-for-MFD-by: Lee Jones -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog