[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <546DDAE9.7010602@collabora.co.uk>
Date: Thu, 20 Nov 2014 13:13:29 +0100
From: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To: Lee Jones <lee.jones@...aro.org>
CC: Doug Anderson <dianders@...omium.org>,
Bill Richardson <wfrichar@...omium.org>,
Olof Johansson <olof@...om.net>, Simon Glass <sjg@...gle.com>,
Gwendal Grignou <gwendal@...gle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists