All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Opensource [Steve Twiss]" <stwiss.opensource@diasemi.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Grant Likely <grant.likely@linaro.org>,
	Mark Brown <broonie@linaro.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	DT <devicetree@vger.kernel.org>,
	"David Dajun Chen" <david.chen@diasemi.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"Pawel Moll" <pawel.moll@arm.com>,
	Support Opensource <Support.Opensource@diasemi.com>
Subject: RE: [PATCH V2 1/2] mfd: da9063: Add device tree support
Date: Tue, 20 Jan 2015 13:23:23 +0000	[thread overview]
Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7D0B52DA5@SW-EX-MBX02.diasemi.com> (raw)
In-Reply-To: <20150120104544.GS5767@x1>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1505 bytes --]


On 20 January 2015 10:46 Lee Jones wrote:

[...]

> >  static const struct regmap_range da9063_ad_readable_ranges[] = {
> >  	{
> >  		.range_min = DA9063_REG_PAGE_CON,
> > @@ -203,6 +206,13 @@ static struct regmap_config da9063_regmap_config
> = {
> >  	.cache_type = REGCACHE_RBTREE,
> >  };
> >
> > +static const struct of_device_id da9063_dt_ids[] = {
> > +	{ .compatible = "dlg,da9063-ad", },
> > +	{ .compatible = "dlg,da9063-bb", },
> > +	{ .compatible = "dlg,da9063-ca", },
> 
> I'm still a bit bemused as to why these require their own compatible
> strings?  They are never matched (of_match_device()) on and it appears
> they can be dynamically told apart by poking.
> 

Yes: like you said. Why bother with a 2-letter variant code in the DT if the
driver's behaviour is automatic?

It was a design style decision on my side. I was being explicit in my definitions 
and I added the 2-letter code to handle (potential) differences in the way
platform data can be handled in the driver. There is nothing right now, I was just
considering the future and the ABI.

However, I've talked myself round this argument several times -- I guess the
explicit compatibility letters in the devices tree are jarring against the automatic
detection inside the driver.

I will remove the 2-letter extensions from the next submission.

Regards,
Steve


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

WARNING: multiple messages have this Message-ID (diff)
From: "Opensource [Steve Twiss]" <stwiss.opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
To: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	DT <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	David Dajun Chen
	<david.chen-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Support Opensource
	<Support.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
Subject: RE: [PATCH V2 1/2] mfd: da9063: Add device tree support
Date: Tue, 20 Jan 2015 13:23:23 +0000	[thread overview]
Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7D0B52DA5@SW-EX-MBX02.diasemi.com> (raw)
In-Reply-To: <20150120104544.GS5767@x1>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1520 bytes --]


On 20 January 2015 10:46 Lee Jones wrote:

[...]

> >  static const struct regmap_range da9063_ad_readable_ranges[] = {
> >  	{
> >  		.range_min = DA9063_REG_PAGE_CON,
> > @@ -203,6 +206,13 @@ static struct regmap_config da9063_regmap_config
> = {
> >  	.cache_type = REGCACHE_RBTREE,
> >  };
> >
> > +static const struct of_device_id da9063_dt_ids[] = {
> > +	{ .compatible = "dlg,da9063-ad", },
> > +	{ .compatible = "dlg,da9063-bb", },
> > +	{ .compatible = "dlg,da9063-ca", },
> 
> I'm still a bit bemused as to why these require their own compatible
> strings?  They are never matched (of_match_device()) on and it appears
> they can be dynamically told apart by poking.
> 

Yes: like you said. Why bother with a 2-letter variant code in the DT if the
driver's behaviour is automatic?

It was a design style decision on my side. I was being explicit in my definitions 
and I added the 2-letter code to handle (potential) differences in the way
platform data can be handled in the driver. There is nothing right now, I was just
considering the future and the ABI.

However, I've talked myself round this argument several times -- I guess the
explicit compatibility letters in the devices tree are jarring against the automatic
detection inside the driver.

I will remove the 2-letter extensions from the next submission.

Regards,
Steve


N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·zøœzÚÞz)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢j.ïÛ°\½½MŽúgjÌæa×\x02››–' ™©Þ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾\a«‘êçzZ+ƒùšŽŠÝ¢j"ú!¶i

  reply	other threads:[~2015-01-20 13:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 16:29 [PATCH V2 0/2] Add device tree support for DA9063 Opensource [Steve Twiss]
2015-01-19 16:29 ` [PATCH V2 1/2] mfd: da9063: Add device tree support Steve Twiss
2015-01-19 16:29   ` Steve Twiss
2015-01-20 10:45   ` Lee Jones
2015-01-20 10:45     ` Lee Jones
2015-01-20 13:23     ` Opensource [Steve Twiss] [this message]
2015-01-20 13:23       ` Opensource [Steve Twiss]
2015-01-19 16:29 ` [PATCH V2 2/2] devicetree: Add bindings for DA9063 Steve Twiss
2015-01-19 16:29   ` Steve Twiss
2015-01-20 10:42   ` Lee Jones
2015-01-20 10:42     ` Lee Jones
2015-01-20 10:41 ` [PATCH V2 0/2] Add device tree support " Lee Jones

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=6ED8E3B22081A4459DAC7699F3695FB7D0B52DA5@SW-EX-MBX02.diasemi.com \
    --to=stwiss.opensource@diasemi.com \
    --cc=Support.Opensource@diasemi.com \
    --cc=broonie@linaro.org \
    --cc=david.chen@diasemi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sameo@linux.intel.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 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.