public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>
Subject: Re: [PATCH v1 3/3] mfd: Add support for Intel Sunrisepoint LPSS devices
Date: Wed, 29 Apr 2015 18:43:50 +0300	[thread overview]
Message-ID: <20150429154350.GS1534@lahna.fi.intel.com> (raw)
In-Reply-To: <20150429150619.GW9169@x1>

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.

  reply	other threads:[~2015-04-29 15:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 11:59 [PATCH v1 0/3] mfd: introduce a driver for LPSS devices on SPT Andy Shevchenko
2015-03-31 11:59 ` [PATCH v1 1/3] PM / QoS: Make it possible to expose device latency tolerance to userspace Andy Shevchenko
2015-03-31 11:59 ` [PATCH v1 2/3] ACPI / PM: Attach ACPI power domain only once Andy Shevchenko
2015-03-31 11:59 ` [PATCH v1 3/3] mfd: Add support for Intel Sunrisepoint LPSS devices Andy Shevchenko
2015-04-28 13:32   ` Lee Jones
2015-04-28 13:48     ` Mika Westerberg
2015-04-28 17:57       ` Lee Jones
2015-04-29  6:42         ` Jarkko Nikula
2015-04-29  9:08         ` Mika Westerberg
2015-04-29  8:23   ` Lee Jones
2015-04-29 13:58     ` Andy Shevchenko
2015-04-29 15:06       ` Lee Jones
2015-04-29 15:43         ` Mika Westerberg [this message]
2015-05-25 15:18         ` Andy Shevchenko

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=20150429154350.GS1534@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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