linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lee Jones <lee.jones@linaro.org>,
	Alexander Stein <alexander.stein@systec-electronic.com>
Cc: linux-kernel@vger.kernel.org,
	Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
	dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	marex@denx.de, linux-iio@vger.kernel.org, harald@ccbib.org,
	stefan.wahren@i2se.com, fabio.estevam@freescale.com
Subject: Re: [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD
Date: Mon, 15 Aug 2016 17:46:06 +0100	[thread overview]
Message-ID: <22e16c7d-4ad7-6432-11e7-30b6b6194573@kernel.org> (raw)
In-Reply-To: <20160805070224.GH5243@dell>

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@gmail.com>
>>> ---
>>> [...]
>>> +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?

Jonathan

  reply	other threads:[~2016-08-15 16:46 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
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
     [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 [this message]
     [not found]           ` <22e16c7d-4ad7-6432-11e7-30b6b6194573-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-08-16 12:47             ` Lee Jones
2016-08-04 13:32   ` [PATCH v4 4/4] iio: adc: mxs-lradc: Remove driver 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=22e16c7d-4ad7-6432-11e7-30b6b6194573@kernel.org \
    --to=jic23@kernel.org \
    --cc=alexander.stein@systec-electronic.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabio.estevam@freescale.com \
    --cc=harald@ccbib.org \
    --cc=knaack.h@gmx.de \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=pmeerw@pmeerw.net \
    --cc=stefan.wahren@i2se.com \
    /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).