[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150429154350.GS1534@lahna.fi.intel.com>
Date: Wed, 29 Apr 2015 18:43:50 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Lee Jones <lee.jones@...aro.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists