lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] extcon: palmas: Added a new compatible type *ti,palmas-usb-vid*
On Thu, Oct 10, 2013 at 08:32:57AM +0100, Kishon Vijay Abraham I wrote:
> The Palmas device contains only a USB VBUS-ID detector, so added a
> compatible type *ti,palmas-usb-vid*. Didn't remove the existing compatible
> types for backward compatibility.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> Changes from v4:
> * added compatible property "ti,twl6035-usb-vid"
>
> Changes from v3:
> * Fixed commit log message (VID to VBUS-ID).
> * Fixed the Documentation to tell "ti,twl6035-usb" and "ti,palmas-usb" is
> deprecated
> Changes from [1]:
> * Since the old compatible values will be in 3.11 kernel, we shouldn't remove
> the old compatible values. So retain the old compatible values.
>
> [1] -> http://www.spinics.net/lists/linux-omap/msg95843.html
>
> Documentation/devicetree/bindings/extcon/extcon-palmas.txt | 4 +++-
> drivers/extcon/extcon-palmas.c | 2 ++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt b/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
> index 7dab6a8..ce2100f 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
> +++ b/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
> @@ -2,7 +2,9 @@ EXTCON FOR PALMAS/TWL CHIPS
>
> PALMAS USB COMPARATOR
> Required Properties:
> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
> + - compatible : Should be "ti,palmas-usb-vid" or "ti,twl6035-usb-vid".
> + "ti,twl6035-usb" and "ti,palmas-usb" is deprecated and is kept
> + for backward compatibility.

How about having these one per line, with a description:

- compatible: should contain one of:
* "ti,palmas-usb-vid" for palmas systems.
* "ti,twl6035-usb-vid" for twl6035 systems.
* "ti,palmas-usb" (DEPRECATED - use "ti,palmas-usb-vid").
* "ti,twl6035-usb" (DEPRECATED - use "ti,twl6035-usb-vid").

That makes it easier to add to in future, and hopefully makes things a
bit clearer.

I don't think we need to state it's kept for backwards compatiblity.
The set of strings Linux understands is a Linux detail rather than a dt
detail.

>
> Optional Properties:
> - ti,wakeup : To enable the wakeup comparator in probe
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index 6c91976..6e83e9a 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -269,7 +269,9 @@ static const struct dev_pm_ops palmas_pm_ops = {
>
> static struct of_device_id of_palmas_match_tbl[] = {
> { .compatible = "ti,palmas-usb", },
> + { .compatible = "ti,palmas-usb-vid", },
> { .compatible = "ti,twl6035-usb", },
> + { .compatible = "ti,twl6035-usb-vid", },

It might be worth a /* DEPRECATED */ note on the old strings.

Otherwise, the looks sensible to me.

Thanks,
Mark.


\
 
 \ /
  Last update: 2013-10-10 12:01    [W:0.362 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site