linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: linux-kernel@vger.kernel.org
Cc: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
	lee.jones@linaro.org, dmitry.torokhov@gmail.com,
	linux-input@vger.kernel.org, jic23@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: Thu, 04 Aug 2016 18:10:37 +0200	[thread overview]
Message-ID: <2721285.1CS7CJCgc7@ws-stein> (raw)
In-Reply-To: <0a60a10b249062d305237f04fdb9aea05b128b85.1470316956.git.ksenija.stanojevic@gmail.com>

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.

Best regards,
Alexander

  reply	other threads:[~2016-08-04 16:10 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 [this message]
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
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=2721285.1CS7CJCgc7@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabio.estevam@freescale.com \
    --cc=harald@ccbib.org \
    --cc=jic23@kernel.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).