lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 3/3] mfd: Add support for Intel Sunrisepoint LPSS devices
On Wed, Apr 29, 2015 at 04:06:19PM +0100, Lee Jones wrote:
> > >> +static const struct mfd_cell intel_lpss_uart_devs[] = {
> > >> + {
> > >> + .name = "dw_dmac",
> > >> + .num_resources = ARRAY_SIZE(intel_lpss_idma_resources),
> > >> + .resources = intel_lpss_idma_resources,
> > >> + .platform_data = (void *)&intel_lpss_idma_pdata,
> > >> + .pdata_size = sizeof(intel_lpss_idma_pdata),
> > >> + },
> > >> + {
> > >> + .name = "dw-apb-uart",
> > >> + .num_resources = ARRAY_SIZE(intel_lpss_dev_resources),
> > >> + .resources = intel_lpss_dev_resources,
> > >> + },
> > >> +};
> > >> +
> > >> +static const struct mfd_cell intel_lpss_spi_devs[] = {
> > >> + {
> > >> + .name = "dw_dmac",
> > >> + .num_resources = ARRAY_SIZE(intel_lpss_idma_resources),
> > >> + .resources = intel_lpss_idma_resources,
> > >> + .platform_data = (void *)&intel_lpss_idma_pdata,
> > >> + .pdata_size = sizeof(intel_lpss_idma_pdata),
> > >> + },
> > >> + {
> > >> + .name = "pxa2xx-spi",
> > >> + .num_resources = ARRAY_SIZE(intel_lpss_dev_resources),
> > >> + .resources = intel_lpss_dev_resources,
> > >> + },
> > >> +};
> > >> +
> > >> +static DEFINE_IDA(intel_lpss_devid_ida);
> > >
> > > What's wrong with using PLATFORM_DEVID_AUTO?
> >
> > We have to provide right clocks.
> > Is it possible to use AUTO and be sure that right clocks will go to
> > corresponding consumers?
>
> I guess Mike will have to help us with that, as I've never seen it
> done this way before.
>
> I guess you need to create a clock driver and register it properly as
> a platform device.

The reason why we generate the id here is that we need a way to provide
a clock with correct name to host controller and DMA drivers, and that
needs to be done before those two platform devices get created.

Moreover this makes it easy to match right DMA to right host controller
from sysfs as they are always look like:

intel-lpss.X +-> host-controller.X
|
+-> DMA.X

X is the id we generate in the MFD driver.


\
 
 \ /
  Last update: 2015-04-29 18:21    [W:0.225 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site