From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Date: Mon, 31 Jul 2017 18:01:57 +0530 Message-ID: <20170731123157.GJ3053@localhost> References: <1499343623-5964-1-git-send-email-pierre-yves.mordret@st.com> <1499343623-5964-3-git-send-email-pierre-yves.mordret@st.com> <20170722065133.GT3053@localhost> <2b916330-9b65-f4d5-817f-79b66cc236b3@st.com> <20170726052930.GF3053@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Pierre Yves MORDRET , Peter Ujfalusi Cc: Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre TORGUE , Russell King , Dan Williams , M'boumba Cedric Madianga , Fabrice GASNIER , Herbert Xu , Fabien DESSENNE , Amelie DELAUNAY , "dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org On Wed, Jul 26, 2017 at 07:38:02AM +0000, Pierre Yves MORDRET wrote: > >>>> + > >>>> +#ifndef __DMA_STM32_DMAMUX_H > >>>> +#define __DMA_STM32_DMAMUX_H > >>>> + > >>>> +#if defined(CONFIG_STM32_DMAMUX) > >>>> +int stm32_dmamux_set_config(struct device *dev, void *route_data, u32 chan_id); > >>> > >>> Why do we need a custom API in this case? > >>> > >> > >> This API is called by DMA when a slave is requested by client. DMA can work > >> without DMAMUX this API has been put in place to configure DMAMUX whether client > >> is requesting a DMAMUX Channel instead of a DMA one. > > > > You mean the dmaengine driver right? > > > > Yes. The API is mainly called by "device_config" through out STM32 DMA Driver > when a router is in place for client. > Please refer to Patch 4/5 on this set. Okay am thinking on why this can't be generic..? An optional router config callback? -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html