From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752368AbbJEPiA (ORCPT ); Mon, 5 Oct 2015 11:38:00 -0400 Received: from mga03.intel.com ([134.134.136.65]:50861 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbbJEPh6 (ORCPT ); Mon, 5 Oct 2015 11:37:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,639,1437462000"; d="scan'208";a="819774211" Date: Mon, 5 Oct 2015 16:37:47 +0100 From: Vinod Koul To: Shawn Lin Cc: Heiko Stuebner , Jaroslav Kysela , Takashi Iwai , Mark Brown , Doug Anderson , Olof Johansson , Sonny Rao , Addy Ke , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-spi@vger.kernel.org Subject: Re: [PATCH v5 06/10] dmaengine: add API for getting dma controller's quirk Message-ID: <20151005153746.GG13501@vkoul-mobl.iind.intel.com> References: <1442187923-5736-1-git-send-email-shawn.lin@rock-chips.com> <1442188139-6017-1-git-send-email-shawn.lin@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442188139-6017-1-git-send-email-shawn.lin@rock-chips.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14, 2015 at 07:48:59AM +0800, Shawn Lin wrote: > Add dmaengine_get_quirks API for peripheral devices to query > quirks if they need it to make special workaround due to broken > dma controller design. > > Signed-off-by: Shawn Lin > --- > > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > Changes in v1: None > > include/linux/dmaengine.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h > index e2f5eb4..5174ca4 100644 > --- a/include/linux/dmaengine.h > +++ b/include/linux/dmaengine.h > @@ -704,6 +704,7 @@ struct dma_device { > > int (*device_config)(struct dma_chan *chan, > struct dma_slave_config *config); > + int (*device_get_quirks)(struct dma_chan *chan); And why do we want to expose this to users? THis doesnt seem right! A quirk may exists but should be handled inside the controller driver and do appropriate action. You don't tell users or expect them to handle these -- ~Vinod