public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kim, Milo" <milo.kim@ti.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Felipe Balbi <balbi@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Tony Lindgren <tony@atomide.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 0/4] of: introduce of_dev_get_platdata()
Date: Tue, 1 Sep 2015 10:23:56 +0900	[thread overview]
Message-ID: <55E4FE2C.4040409@ti.com> (raw)
In-Reply-To: <CAL_JsqKH2_w2E9zAA=aJ3q+p4zr88Q6KMS1U-sWdw3JUndUnEA@mail.gmail.com>

Hi Rob,

On 8/28/2015 9:59 PM, Rob Herring wrote:
> On Fri, Aug 28, 2015 at 4:12 AM, Milo Kim<milo.kim@ti.com>  wrote:
>> >New function, 'of_dev_get_platdata()'
>> >  - provides unified handling of getting device platform data
>> >  - supports DT and non-DT(legacy) cases
>> >  - removes duplicated code from each driver
>> >  - keeps driver specific code simple in each driver
> This works in cases where DT data and platform_data are aligned. In
> many cases they are not. A common binding problem is people blindly
> copying platform_data fields to DT properties for things that are not
> h/w properties. I worry that this would encourage this behavior.

OK, got your point. Thanks.

>
> We already have a generalized method for retrieving properties
> independent of DT or ACPI. There's no reason this couldn't be extended
> to retrieve properties out of platform_data using the same interface.
>
> Also, perhaps in some drivers we can remove platform_data now if all
> users are converted to DT.

This work requires two steps.
1) remove platform data configuration from board-*.c
2) if all host/platform support only the DT, then move device platform 
data structure in a header to each driver space.

However, I'm concerning about some use case.
After this cleanup, drivers may not work properly in some platforms 
which do not support the DT. There is no way to configure HW properties.
Drivers should run on any kind of hosts(processors) so I'm thinking 
about the compatibility/dependency issue. Am I missing something?

Milo

      reply	other threads:[~2015-09-01  1:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28  9:12 [RFC 0/4] of: introduce of_dev_get_platdata() Milo Kim
2015-08-28  9:12 ` [RFC 1/4] of: add of_dev_get_platdata() Milo Kim
2015-08-28  9:12   ` [RFC 2/4] input: touchscree: mms114: use of_dev_get_platdata() Milo Kim
2015-08-28  9:12     ` [RFC 3/4] mfd: tps65910: " Milo Kim
2015-08-28  9:12       ` [RFC 4/4] usb: musb: " Milo Kim
2015-08-28 12:59 ` [RFC 0/4] of: introduce of_dev_get_platdata() Rob Herring
2015-09-01  1:23   ` Kim, Milo [this message]

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=55E4FE2C.4040409@ti.com \
    --to=milo.kim@ti.com \
    --cc=balbi@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robherring2@gmail.com \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.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