Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933153AbbKROl5 (ORCPT ); Wed, 18 Nov 2015 09:41:57 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:51103 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933086AbbKROlx (ORCPT ); Wed, 18 Nov 2015 09:41:53 -0500 Subject: Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason() To: Arnd Bergmann References: <1432646768-12532-1-git-send-email-peter.ujfalusi@ti.com> <20150624162401.GP19530@localhost> <564C8966.9080406@ti.com> <6347063.Gd6coh6hX8@wuerfel> CC: Vinod Koul , Geert Uytterhoeven , Tony Lindgren , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dan Williams , , "linux-serial@vger.kernel.org" , "linux-omap@vger.kernel.org" , Linux MMC List , , linux-spi , Linux Media Mailing List , ALSA Development Mailing List From: Peter Ujfalusi X-Enigmail-Draft-Status: N1110 Message-ID: <564C8E1F.8010501@ti.com> Date: Wed, 18 Nov 2015 16:41:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <6347063.Gd6coh6hX8@wuerfel> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1819 Lines: 38 On 11/18/2015 04:29 PM, Arnd Bergmann wrote: > On Wednesday 18 November 2015 16:21:26 Peter Ujfalusi wrote: >> 2. non slave channel requests, where only the functionality matters, like >> memcpy, interleaved, memset, etc. >> We could have a simple: >> dma_request_channel(mask); >> >> But looking at the drivers using dmaengine legacy dma_request_channel() API: >> Some sets DMA_INTERRUPT or DMA_PRIVATE or DMA_SG along with DMA_SLAVE: >> drivers/misc/carma/carma-fpga.c DMA_INTERRUPT|DMA_SLAVE|DMA_SG >> drivers/misc/carma/carma-fpga-program.c DMA_MEMCPY|DMA_SLAVE|DMA_SG >> drivers/media/platform/soc_camera/mx3_camera.c DMA_SLAVE|DMA_PRIVATE >> sound/soc/intel/common/sst-firmware.c DMA_SLAVE|DMA_MEMCPY >> >> as examples. >> Not sure how valid are these... > > It's usually not much harder to separate out the legacy case from > the normal dma_request_slave_channel_reason(), so those drivers don't > really need to use the unified compat API. The current dma_request_slave_channel()/_reason() is not the 'legacy' API. Currently there is no way to get the reason why the dma channel request fails when using the _compat() version of the API, which is used by drivers which can be used in DT or in legacy mode as well. Sure, they all could have local if(){}else{} for handling this, but it is not a nice thing. As it was discussed instead of adding the _reason() version for the _compat call, we should simplify the dmaengine API for getting the channel and at the same time we will have ERR_PTR returned instead of NULL. -- P?ter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/