From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Vadim Pasternak <vadimp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: "lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
<j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
"rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org"
<rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
"linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org"
<jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
Subject: Re: [patch v1 1/2] mfd: Add Mellanox regmap core driver
Date: Wed, 26 Jul 2017 20:25:09 +0200 [thread overview]
Message-ID: <20170726182509.GA29978@amd> (raw)
In-Reply-To: <AM4PR05MB3330F7C7913391C906CB2069A2B90-n5Jp0YuYvM1LPiJj6BpYmdqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]
Hi!
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/mfd/mellanox,mlxreg-core
> > > @@ -0,0 +1,347 @@
> > > +Mellanox programmable device control.
> > > +-------------------------------------
> > > +This binding defines the device control interface over I2C bus for
> > > +Mellanox BMC based switches.
> >
> > You'll need to cc dt maintainers here.
>
> Hi Pavel,
>
> Thank you very much for review.
>
> I have in to: Rob Herring and in c: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Aha, sorry, did not notice that.
> Should it be separate mail, or it's OK?
They prefer separate mails, yes.
> > > + for (i = 0; i < priv->item[grp->type]->count; i++, id++, data++) {
> > > + priv->mlxreg_core_attr[id] =
> > > + &priv-
> > >mlxreg_core_dev_attr[id].dev_attr.attr;
> > > + if (grp->use_grp_name)
> > > + priv->mlxreg_core_attr[id]->name =
> > > + devm_kasprintf(priv->dev, GFP_KERNEL,
> > > + "%s%u", grp->name, id %
> > > + priv->item[grp->type]-
> > >count
> > > + + 1);
> > > + else
> > > + priv->mlxreg_core_attr[id]->name =
> > > + devm_kasprintf(priv->dev, GFP_KERNEL,
> > > + data->label);
> >
> > Is it really neccessary to dynamically generate it? Static table could be
> > simpler...
>
> But I don't know how many groups and attributes can be defined for particular device.
> On the system I am working on know I have four programmable device with different purposes and different set of attributes.
>
I guess that's good reason. But if you could make that code simpler /
easier to follow, it would be nice.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-07-26 18:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 16:51 [patch v1 0/2] Introduce support for mlxreg mfd core and I2C drivers Vadim Pasternak
2017-07-25 16:51 ` [patch v1 1/2] mfd: Add Mellanox regmap core driver Vadim Pasternak
[not found] ` <1501001499-21971-2-git-send-email-vadimp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-07-26 11:18 ` Pavel Machek
2017-07-26 11:28 ` Jiri Pirko
2017-07-26 11:42 ` Pavel Machek
2017-07-26 17:18 ` Vadim Pasternak
[not found] ` <AM4PR05MB3330F7C7913391C906CB2069A2B90-n5Jp0YuYvM1LPiJj6BpYmdqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-07-26 18:25 ` Pavel Machek [this message]
2017-07-25 16:51 ` [patch v1 2/2] mfd: Add Mellanox regmap I2C driver Vadim Pasternak
[not found] ` <1501001499-21971-3-git-send-email-vadimp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-07-26 11:19 ` Pavel Machek
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=20170726182509.GA29978@amd \
--to=pavel-+zi9xunit7i@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org \
--cc=vadimp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.