linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Alexander Stein
	<alexander.stein-93q1YBGzJSMe9JSWTWOYM3xStJ4P+DSV@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ksenija Stanojevic
	<ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	knaack.h-Mmb7MZpHnFY@public.gmane.org,
	lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org,
	pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org,
	marex-ynQEQJNshbs@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	harald-95f8Dae0BrPYtjvyW6yDsg@public.gmane.org,
	stefan.wahren-eS4NqCHxEME@public.gmane.org,
	fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org
Subject: Re: [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD
Date: Tue, 16 Aug 2016 13:47:06 +0100	[thread overview]
Message-ID: <20160816124706.GJ25844@dell> (raw)
In-Reply-To: <22e16c7d-4ad7-6432-11e7-30b6b6194573-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On Mon, 15 Aug 2016, Jonathan Cameron wrote:

> On 05/08/16 08:02, Lee Jones wrote:
> > On Thu, 04 Aug 2016, Alexander Stein wrote:
> > 
> >> On Thursday 04 August 2016 15:28:18, Ksenija Stanojevic wrote:
> >>> Add core files for mxs-lradc MFD driver.
> >>>
> >>> Note:  this patch won't compile in iio/testing without this patch:
> >>> a8f447be8056 ("mfd: Add resource managed APIs for mfd_add_devices")
> >>>
> >>> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>> ---
> >>> [...]
> >>> +static int mxs_lradc_probe(struct platform_device *pdev)
> >>> +{
> >>> +	const struct of_device_id *of_id;
> >>> +	struct device *dev = &pdev->dev;
> >>> +	struct device_node *node = dev->of_node;
> >>> +	struct mxs_lradc *lradc;
> >>> +	struct resource *iores;
> >>> +	struct mfd_cell *cells = NULL;
> >>> +	int ret = 0;
> >>> +	u32 ts_wires = 0;
> >>> +
> >>> +	lradc = devm_kzalloc(&pdev->dev, sizeof(*lradc), GFP_KERNEL);
> >>> +	if (!lradc)
> >>> +		return -ENOMEM;
> >>> +
> >>> +	of_id = of_match_device(mxs_lradc_dt_ids, &pdev->dev);
> >>> +	lradc->soc = (enum mxs_lradc_id)of_id->data;
> >>> +
> >>> +	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >>> +	lradc->base = devm_ioremap_resource(dev, iores);
> >>
> >> Out of couriosity: Is it common to pass already ioremapped addresses to (MFD 
> >> cell) platform drivers? I would have expected, and done myself, that ioremap 
> >> is done in the driver itself, same as the IRQ.
> > 
> > Yes, this is exactly what should happen.
> > 
> Lee, you've confused me with this answer.  Yes, it is common or Yes it
> should have been done the way Alexander suggested?

The remapping and IRQ obtainment should be done in the leaf driver.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2016-08-16 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 13:26 [PATCH v4 0/4] mxs-lradc: Split driver into MFD Ksenija Stanojevic
     [not found] ` <cover.1470316956.git.ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-04 13:28   ` [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Ksenija Stanojevic
2016-08-04 16:10     ` Alexander Stein
2016-08-05  7:02       ` Lee Jones
2016-08-15 16:46         ` Jonathan Cameron
     [not found]           ` <22e16c7d-4ad7-6432-11e7-30b6b6194573-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-08-16 12:47             ` Lee Jones [this message]
2016-08-04 13:32   ` [PATCH v4 4/4] iio: adc: mxs-lradc: Remove driver Ksenija Stanojevic
2016-08-04 13:29 ` [PATCH v4 2/4] iio: adc: mxs-lradc: Add support for adc driver Ksenija Stanojevic
     [not found]   ` <7757038d1aecd5b17de4298e6b2592782130c330.1470316956.git.ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-15 16:58     ` Jonathan Cameron
2016-08-04 13:30 ` [PATCH v4 3/4] input: touchscreen: mxs-lradc: Add support for touchscreen Ksenija Stanojevic

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=20160816124706.GJ25844@dell \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=alexander.stein-93q1YBGzJSMe9JSWTWOYM3xStJ4P+DSV@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=harald-95f8Dae0BrPYtjvyW6yDsg@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
    --cc=ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marex-ynQEQJNshbs@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=stefan.wahren-eS4NqCHxEME@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).