[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5567260D.6000301@collabora.co.uk>
Date: Thu, 28 May 2015 16:28:29 +0200
From: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To: Lee Jones <lee.jones@...aro.org>
CC: Samuel Ortiz <sameo@...ux.intel.com>,
Olof Johansson <olof@...om.net>,
Doug Anderson <dianders@...omium.org>,
Bill Richardson <wfrichar@...omium.org>,
Simon Glass <sjg@...gle.com>,
Gwendal Grignou <gwendal@...gle.com>,
Stephen Barber <smbarber@...omium.org>,
Filipe Brandenburger <filbranden@...gle.com>,
Todd Broch <tbroch@...omium.org>,
Alexandru M Stan <amstan@...omium.org>,
Heiko Stuebner <heiko@...ech.de>,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Gwendal Grignou <gwendal@...omium.org>
Subject: Re: [PATCH v3 6/7] mfd: cros_ec: Support multiple EC in a system
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
--
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