From: Lee Jones <lee.jones@linaro.org>
To: Marek Vasut <marex@denx.de>
Cc: "Harald Geyer" <harald@ccbib.org>,
"Ksenija Stanojević" <ksenija.stanojevic@gmail.com>,
linux-kernel@vger.kernel.org,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org,
"Jonathan Cameron" <jic23@kernel.org>,
"Hartmut Knaack" <knaack.h@gmx.de>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org,
"Stefan Wahren" <stefan.wahren@i2se.com>,
"Fabio Estevam" <fabio.estevam@freescale.com>
Subject: Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD
Date: Thu, 4 Aug 2016 09:31:36 +0100 [thread overview]
Message-ID: <20160804083136.GE5243@dell> (raw)
In-Reply-To: <5bddd461-90e3-3116-8d18-fae51bf39310@denx.de>
On Thu, 14 Jul 2016, Marek Vasut wrote:
> On 07/13/2016 02:49 PM, Lee Jones wrote:
> > On Fri, 01 Jul 2016, Harald Geyer wrote:
> >
> > > Hi Ksenija!
> > >
> > > Ksenija Stanojević writes:
> > > > On Tue, Jun 28, 2016 at 6:28 PM, Lee Jones <lee.jones@linaro.org> wrote:
> > > > > > +static int mxs_lradc_add_device(struct platform_device *pdev,
> > > > > > + struct mxs_lradc *lradc, char *name, int i)
> > > > > > +{
> > > > > > + struct mfd_cell *cell;
> > > > > > +
> > > > > > + cell = &lradc->cells[i];
> > > > > > + cell->name = name;
> > > > > > + cell->platform_data = lradc;
> > > > > > + cell->pdata_size = sizeof(*lradc);
> > > > > > +
> > > > > > + return devm_mfd_add_devices(&pdev->dev, -1, cell, 1, NULL, 0, NULL);
> > > > > > +}
> > > > >
> > > > > Please don't roll your own API.
> > > > >
> > > > > Use 'struct mfd_cell' like everyone else does.
> > > >
> > > > It has been suggested in previous reviews to use separate function to
> > > > register mfd device, and to make mfd_cell allocate dynamically because
> > > > struc mxs-lradc is allocated dynamically.
> > > > But I can revrse changes and make mfd_cells allocate staticaly
> > > > wthout separate function.
> > >
> > > I think making mfd_cells members of struct mxs-lradc will address all
> > > review comments.
> >
> > No, please don't do that either.
> >
> It'd be nice if you explained in detail why not. Otherwise this is just
> empty splat.
I already said what needs to be done.
"Use struct mfd_cell", in it's pure/static form. Don't include it in
any device data struct.
"like everyone else does", look at other driver to see how they do
it.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2016-08-04 8:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 12:07 [PATCH v3 0/4] mxs-lradc: Split driver into MFD Ksenija Stanojevic
[not found] ` <cover.1466769907.git.ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-24 12:09 ` [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Ksenija Stanojevic
[not found] ` <370a02584386944b465deff5ccc48c8919b23dba.1466769907.git.ksenija.stanojevic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-24 21:15 ` Stefan Wahren
2016-06-28 16:28 ` Lee Jones
2016-07-01 11:47 ` Ksenija Stanojević
2016-07-01 13:10 ` Harald Geyer
[not found] ` <E1bIyD4-0000Jw-2c-rvrRdOlaWMmli2aaYNgTVBW+3FKk/ZpWT2auq/jSWdo@public.gmane.org>
2016-07-13 12:49 ` Lee Jones
2016-07-14 15:38 ` Marek Vasut
2016-08-02 16:35 ` Stefan Wahren
2016-08-02 17:08 ` Ksenija Stanojević
[not found] ` <CAL7P5jJEYUQihe4pynerRUNgVAQzymYbUZEO9BrVdb+-syok-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-03 16:32 ` Ksenija Stanojević
[not found] ` <CAL7P5jKG=b0P9T10RX9p0EXR7epTOfKqbMT6nYZkDhnqiAz_jA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-03 16:35 ` Fabio Estevam
[not found] ` <CAOMZO5BSUice=2Zioeu9Zrfi5ixhszO9hF1vmFW5FiPKWqkb9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-03 16:45 ` Ksenija Stanojević
2016-08-03 19:13 ` Marek Vasut
[not found] ` <d1c121ee-a467-1642-ca75-a9fae90bbfc1-ynQEQJNshbs@public.gmane.org>
2016-08-03 19:34 ` Ksenija Stanojević
[not found] ` <CAL7P5jJxpPUwR+Kf4-9oZ+jbtr_pgFwpAzxtKX-5ojerTL5Mfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-03 19:39 ` Marek Vasut
2016-08-03 19:45 ` Ksenija Stanojević
2016-08-03 19:57 ` Marek Vasut
2016-08-03 20:20 ` Ksenija Stanojević
2016-08-04 8:31 ` Lee Jones [this message]
2016-06-24 12:10 ` [PATCH v3 2/4] iio: adc: mxs-lradc: Add support for adc driver Ksenija Stanojevic
2016-06-24 21:17 ` Stefan Wahren
2016-06-24 12:11 ` [PATCH v3 3/4] input: touchscreen: mxs-lradc: Add support for touchscreen Ksenija Stanojevic
2016-06-24 12:12 ` [PATCH v3 4/4] iio: adc: mxs-lradc: Remove driver Ksenija Stanojevic
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=20160804083136.GE5243@dell \
--to=lee.jones@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=harald@ccbib.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=ksenija.stanojevic@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=pmeerw@pmeerw.net \
--cc=stefan.wahren@i2se.com \
/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;
as well as URLs for NNTP newsgroup(s).