Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbbFYLQR (ORCPT ); Thu, 25 Jun 2015 07:16:17 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:65363 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbbFYLQL (ORCPT ); Thu, 25 Jun 2015 07:16:11 -0400 From: Arnd Bergmann To: Vinod Koul Cc: Peter Ujfalusi , Geert Uytterhoeven , Tony Lindgren , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dan Williams , dmaengine@vger.kernel.org, "linux-serial@vger.kernel.org" , "linux-omap@vger.kernel.org" , Linux MMC List , linux-crypto@vger.kernel.org, linux-spi , Linux Media Mailing List , ALSA Development Mailing List Subject: Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason() Date: Thu, 25 Jun 2015 13:15:57 +0200 Message-ID: <4970019.av0JOFIyTW@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150624162401.GP19530@localhost> References: <1432646768-12532-1-git-send-email-peter.ujfalusi@ti.com> <5587F1F4.1060905@ti.com> <20150624162401.GP19530@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Ql5bV0XRvqMwk1NubBoPkW+JvFnwVEsB0lvdOL7gZVdjPtYSH3J KZdDJwRrt9oMv8ezRrek4+dF+t2EAq3BOz3DJ8CPV5Z2MwDgIC9EhAAZ+7dLBcyefgiNnjJ IUWcpP98gUe4DyFHeCTbRT0aktKJVs1m4hOqcXplKspmf9WO40KPUg3uFwhU4ax2mGI/IE0 F3L2L2tWSQUfDCZ02E5PA== X-UI-Out-Filterresults: notjunk:1;V01:K0:hoE2ZWKF1YU=:+W4g2qCNaj5zAKoaUKZK6G Dc8UrRCPRuIO0N+DvmJb8jnjFjLED78BH8n/bx2SqkBlnLOnOjk6Piut+x9UdBlKriYN4Gi+G ApMebryPoJDxsSHAiCF1/LV2HUsjmc0j8zR7Mz/a8/qBAWRnOZDG3lRvoLYIU2pZEss9wXo3U jFrTCmK2lft/zKwrA7L+Ao3+QVLdvQgwLCzY8gEb8Pm7SPwdNPb8XtrRfriLDu1TW48ags/YI bY25WMRoUpbxi59tgNGdikwV1vPQA+MCset7brW8BoZt8cevIy7yTjGv4U4wZqG1+/TCedsLd Q9Zu7mprTDUgxRkHQ91dyvCM17OPahHQWFokifzQ6WKQBe+09l3c7kvxzPGTHS9LFg51/Xbrp SdZXWsXFnfz9t0EBvemnqf3niguaqW51+RvTe86AUuwkxJN71kkcPubfJoCgNLOmekVlQBcY6 OOCt/T0pzgkKog9rL3wAT8PFvi9WkHVM9wDo7UedkDl5C2WHFjR+fpWCzWdvL//YphIGak9f3 IAfovylEboSi+45ltRHEvxEMXjpdwHRb5lblfcSeivQAsBgXFmCwH5DA0xXucxC7PRAGlfCsN D+yL3tqDhbHNg/IbaqNGkK30R3DIss6y2DYFrGrRZdCLAZJDZ6G5Av+0amo0ZlZaJSQtXEvxv ZlOEptCnYgfRBgKtWMFRw3vRw6DuobMIgMicIvj3zr77CDA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1753 Lines: 38 On Wednesday 24 June 2015 21:54:01 Vinod Koul wrote: > > It would be nice to find another name for the > > dma_request_slave_channel_compat() so with the new name we could have chance > > to rearrange the parameters: (dev, name, mask, fn, fn_param) > > > > We would end up with the following APIs, all returning with error code on failure: > > dma_request_slave_channel(dev, name); > > dma_request_channel_legacy(mask, fn, fn_param); > > dma_request_slave_channel_compat(mask, fn, fn_param, dev, name); > > dma_request_any_channel(mask); > This is good idea but still we end up with 4 APIs. Why not just converge to > two API, one legacy + memcpy + filer fn and one untimate API for slave? > > Internally we may have 4 APIs for cleaner handling... > Not sure if it's realistic, but I think it would be nice to have a way for converting the current slave drivers that use the mask/filter/param API to the dev/name based API. We should be able to do this by registering a lookup table from platform code that translates one to the other, like we do with the clkdev lookup to find a device clock based on a local identifier. The main downside of this is that it's a lot of work if we want to completely remove dma_request_channel() for slave drivers, but it could be done more gradually. Another upside is that we could come up with a mechanism to avoid the link-time dependency on the filter-function that causes problems when that filter is defined in a loadable module for the dmaengine driver. Arnd -- 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/