public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	Olof Johansson <olof@lixom.net>,
	Doug Anderson <dianders@chromium.org>,
	Bill Richardson <wfrichar@chromium.org>,
	Simon Glass <sjg@google.com>,
	Gwendal Grignou <gwendal@google.com>,
	Stephen Barber <smbarber@chromium.org>,
	Filipe Brandenburger <filbranden@google.com>,
	Todd Broch <tbroch@chromium.org>,
	Alexandru M Stan <amstan@chromium.org>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Gwendal Grignou <gwendal@chromium.org>
Subject: Re: [PATCH v3 6/7] mfd: cros_ec: Support multiple EC in a system
Date: Thu, 28 May 2015 16:28:29 +0200	[thread overview]
Message-ID: <5567260D.6000301@collabora.co.uk> (raw)
In-Reply-To: <20150528142551.GU11677@x1>

Hello Lee,

[...]

On 05/28/2015 04:26 PM, Lee Jones wrote:
>> >>  
>> >> +	if (ec_dev->max_passthru) {
>> >> +		/*
>> >> +		 * Register a PD device as well on top of this device.
>> >> +		 * We make the following assumptions:
>> >> +		 * - behind an EC, we have a pd
>> >> +		 * - only one device added.
>> >> +		 * - the EC is responsive at init time (it is not true for a
>> >> +		 *   sensor hub.
>> >> +		 */
>> >> +		err = cros_ec_dev_register(ec_dev, dev_id++, 1);
>> > 
>> > I don't really like this devidx business.  Just keep it simple and
>> > define more than one mfd_cell structure.
>> 
>> I explained to you that this is done because the number of cells depends on
>> the system. I can have an array of mfd_cell structures and use the index to
>> register but I don't think that is easier to understand.
> 
> Keep it simple.  Create a static struct for each and:
> 
> mfd_add_devices(ec_cell)
> 
> if (ec_dev->max_passthru)
>    mfd_add_devices(ec_pd_cell)
>

Ok, will do.

Thanks a lot for your feedback.

Best regards,
Javier
 

  reply	other threads:[~2015-05-28 14:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 15:42 [PATCH v3 0/7] mfd: cros_ec: Add multi EC and proto v3 support Javier Martinez Canillas
2015-05-22 15:42 ` [PATCH v3 1/7] mfd: cros_ec: Use a zero-length array for command data Javier Martinez Canillas
2015-05-27  8:36   ` Lee Jones
2015-05-27  8:39     ` Javier Martinez Canillas
2015-05-22 15:42 ` [PATCH v3 2/7] mfd: cros_ec: rev cros_ec_commands.h Javier Martinez Canillas
2015-05-22 15:42 ` [PATCH v3 3/7] mfd: cros_ec: Move protocol helpers out of the MFD driver Javier Martinez Canillas
2015-05-27  8:38   ` Lee Jones
2015-05-22 15:42 ` [PATCH v3 4/7] mfd: cros_ec: add proto v3 skeleton Javier Martinez Canillas
2015-05-27  8:39   ` Lee Jones
2015-05-22 15:42 ` [PATCH v3 5/7] mfd: cros_ec: add bus-specific proto v3 code Javier Martinez Canillas
2015-05-27  8:53   ` Lee Jones
2015-05-27  9:06     ` Javier Martinez Canillas
2015-05-22 15:42 ` [PATCH v3 6/7] mfd: cros_ec: Support multiple EC in a system Javier Martinez Canillas
2015-05-27  9:11   ` Lee Jones
2015-05-28 14:00     ` Javier Martinez Canillas
2015-05-28 14:26       ` Lee Jones
2015-05-28 14:28         ` Javier Martinez Canillas [this message]
2015-05-22 15:42 ` [PATCH v3 7/7] mfd: cros_ec: spi: Add delay for asserting CS Javier Martinez Canillas
2015-05-27  9:14   ` Lee Jones
2015-05-22 19:28 ` [PATCH v3 0/7] mfd: cros_ec: Add multi EC and proto v3 support Heiko Stuebner

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=5567260D.6000301@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=amstan@chromium.org \
    --cc=dianders@chromium.org \
    --cc=filbranden@google.com \
    --cc=gwendal@chromium.org \
    --cc=gwendal@google.com \
    --cc=heiko@sntech.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sameo@linux.intel.com \
    --cc=sjg@google.com \
    --cc=smbarber@chromium.org \
    --cc=tbroch@chromium.org \
    --cc=wfrichar@chromium.org \
    /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