Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1462986 > unrolled thread
| Started by | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| First post | 2016-08-15 18:50 +0200 |
| Last post | 2016-08-16 14:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Jonathan Cameron <jic23@kernel.org> - 2016-08-15 18:50 +0200
Re: [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Lee Jones <lee.jones@linaro.org> - 2016-08-16 14:50 +0200
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-08-15 18:50 +0200 |
| Subject | Re: [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD |
| Message-ID | <s6tfj-7Z5-5@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-08-16 14:50 +0200 |
| Message-ID | <s6LYB-37F-9@gated-at.bofh.it> |
| In reply to | #1462986 |
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@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?
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web