All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-i2c@vger.kernel.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH v1 2/3] i2c: imx: probe dma only only on i.MX50 and later.
Date: Fri, 19 Oct 2018 11:21:45 +0200	[thread overview]
Message-ID: <20181019092145.6zihrnduyypzo5x2@pengutronix.de> (raw)
In-Reply-To: <20181019090100.6vcergf6txgxt7fo@pengutronix.de>

On Fri, Oct 19, 2018 at 11:01:00AM +0200, Oleksij Rempel wrote:
> On Fri, Oct 19, 2018 at 09:12:43AM +0200, Uwe Kleine-König wrote:
> > Hello Oleksij,
> > 
> > On Thu, Oct 18, 2018 at 01:26:14PM +0200, Oleksij Rempel wrote:
> > > The DMA support for I2C was introduced on i.MX50. So,
> > > avoid of DMA probing on not supported versions.
> > 
> > What is the obvious downside of trying to use DMA on i.MX21? If the
> > purpose is just to suppress the message
> > 
> > 	can't request DMA tx channel
> > 
> > , that goes away with patch 3, too.
> > 
> > Note that if we agree that i.MX50 (and later) isn't compatible to
> > i.MX21, all device trees should be fixed accordingly. IMHO the
> > difference "There is a DMA engine connected only on some
> > implementations" doesn't give enough incentive to claim that i.MX21 and
> > i.MX50 must not share the compatible.
> 
> I don't see any sense to do allocation and add extra probes just to find
> what we already know from compatible.

I think it's perfectly fine to only notice that there is no DMA support
when trying to set it up. It has slight runtime overhead, yes, but being
able to handle imx21 and imx50 in the same way is a nice advantage that
I don't want to throw away easily.

If you care about the allocation, you can do do the calls to
dma_request_chan first and assign to local variables before the
allocation of *dma.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 2/3] i2c: imx: probe dma only only on i.MX50 and later.
Date: Fri, 19 Oct 2018 11:21:45 +0200	[thread overview]
Message-ID: <20181019092145.6zihrnduyypzo5x2@pengutronix.de> (raw)
In-Reply-To: <20181019090100.6vcergf6txgxt7fo@pengutronix.de>

On Fri, Oct 19, 2018 at 11:01:00AM +0200, Oleksij Rempel wrote:
> On Fri, Oct 19, 2018 at 09:12:43AM +0200, Uwe Kleine-K?nig wrote:
> > Hello Oleksij,
> > 
> > On Thu, Oct 18, 2018 at 01:26:14PM +0200, Oleksij Rempel wrote:
> > > The DMA support for I2C was introduced on i.MX50. So,
> > > avoid of DMA probing on not supported versions.
> > 
> > What is the obvious downside of trying to use DMA on i.MX21? If the
> > purpose is just to suppress the message
> > 
> > 	can't request DMA tx channel
> > 
> > , that goes away with patch 3, too.
> > 
> > Note that if we agree that i.MX50 (and later) isn't compatible to
> > i.MX21, all device trees should be fixed accordingly. IMHO the
> > difference "There is a DMA engine connected only on some
> > implementations" doesn't give enough incentive to claim that i.MX21 and
> > i.MX50 must not share the compatible.
> 
> I don't see any sense to do allocation and add extra probes just to find
> what we already know from compatible.

I think it's perfectly fine to only notice that there is no DMA support
when trying to set it up. It has slight runtime overhead, yes, but being
able to handle imx21 and imx50 in the same way is a nice advantage that
I don't want to throw away easily.

If you care about the allocation, you can do do the calls to
dma_request_chan first and assign to local variables before the
allocation of *dma.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2018-10-19  9:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 11:26 [PATCH v1 0/3] i2c: imx: DMA related fixes Oleksij Rempel
2018-10-18 11:26 ` Oleksij Rempel
2018-10-18 11:26 ` [PATCH v1 1/3] ARM: dts: imx6sll: fix typo for fsl,imx6sll-i2c node Oleksij Rempel
2018-10-18 11:26   ` Oleksij Rempel
2018-10-18 18:43   ` Uwe Kleine-König
2018-10-18 18:43     ` Uwe Kleine-König
2018-10-31  7:50   ` Shawn Guo
2018-10-31  7:50     ` Shawn Guo
2018-10-18 11:26 ` [PATCH v1 2/3] i2c: imx: probe dma only only on i.MX50 and later Oleksij Rempel
2018-10-18 11:26   ` Oleksij Rempel
2018-10-19  7:12   ` Uwe Kleine-König
2018-10-19  7:12     ` Uwe Kleine-König
2018-10-19  9:01     ` Oleksij Rempel
2018-10-19  9:01       ` Oleksij Rempel
2018-10-19  9:21       ` Uwe Kleine-König [this message]
2018-10-19  9:21         ` Uwe Kleine-König
2018-10-19 10:17         ` Oleksij Rempel
2018-10-19 10:17           ` Oleksij Rempel
2018-10-18 11:26 ` [PATCH v1 3/3] i2c: imx: don't print error if DMA is not configured Oleksij Rempel
2018-10-18 11:26   ` Oleksij Rempel
2018-10-28 22:11   ` Wolfram Sang
2018-10-28 22:11     ` Wolfram Sang
2018-10-29  8:07     ` Oleksij Rempel
2018-10-29  8:07       ` Oleksij Rempel
2018-10-29  8:54       ` Wolfram Sang
2018-10-29  8:54         ` Wolfram Sang
2018-11-03 20:59         ` Uwe Kleine-König
2018-11-03 20:59           ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181019092145.6zihrnduyypzo5x2@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=o.rempel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.