lkml.org 
[lkml]   [2014]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] mfd: cros_ec: Add Chrome OS EC userspace device interface
Hello Lee,

On 11/20/2014 12:58 PM, Lee Jones wrote:
>> the printk.h header? to use the pr_* functions but I'll make sure that only
>> the needed headers are included.
>
> Right, I think don't think you should be using those on a platform device.
>

Yes, I'll use dev_err() instead.

>> I prefer macros if possible since they cost nothing and give you an indirection
>> level if you want to change it later. Any reason to not use a define directive?
>
> Exactly as you said, they add a layer of (pointless)
> indirection/complexity. You only use this name once, just change it
> where you use it if you wish to (but probably never will) adapt the
> name.
>

Fair enough, I'll remove it.

>
> I know how the device driver model works. I'm asking where the
> 'device' is registered from, not the 'driver' i.e. platform data, DT,
> ACPI?
>

Right, sorry for misunderstanding your question and the silly comment then.

$Subject adds a "cros-ec-dev" mfd cell to the cros ec mfd driver.
So the device is registered from DT when the cros ec device node is
matched (e.g: "google,cros-ec-spi" or "google,cros-ec-i2c") and the
cros ec mfd driver probe function calls mfd_add_devices().

Best regards,
Javier


\
 
 \ /
  Last update: 2014-11-20 13:41    [W:0.052 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site