linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: cw00.choi@samsung.com
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	gg@slimlogic.co.uk, Kishon Vijay Abraham I <kishon@ti.com>,
	jaewon02.kim@samsung.com, Roger Quadros <rogerq@ti.com>,
	"Pallala, Ramakrishna" <ramakrishna.pallala@intel.com>,
	Felipe Balbi <balbi@ti.com>, Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 1/2] extcon: Use the unique id for external connector instead of string
Date: Sun, 17 May 2015 18:09:32 +0900	[thread overview]
Message-ID: <CAJKOXPc98vmAK4j-8W7nDvH6XE6+GFqQy_nVcUAttA6FfSCG5Q@mail.gmail.com> (raw)
In-Reply-To: <CAGTfZH0ZHJGMM1OwEQXrA5NdJhK-iWdzxwFBDx+q62H3rdFsog@mail.gmail.com>

--george.cherian@ti.com
Mail bounces.

2015-05-17 16:53 GMT+09:00 Chanwoo Choi <cwchoi00@gmail.com>:
> Hi Krzysztof,
>
> On Sun, May 17, 2015 at 4:10 PM, Krzysztof Kozlowski
>>> @@ -32,36 +35,43 @@
>>>  #include <linux/slab.h>
>>>  #include <linux/sysfs.h>
>>>
>>> -/*
>>> - * extcon_cable_name suggests the standard cable names for commonly used
>>> - * cable types.
>>> - *
>>> - * However, please do not use extcon_cable_name directly for extcon_dev
>>> - * struct's supported_cable pointer unless your device really supports
>>> - * every single port-type of the following cable names. Please choose cable
>>> - * names that are actually used in your extcon device.
>>> - */
>>> -const char extcon_cable_name[][CABLE_NAME_MAX + 1] = {
>>> +#define SUPPORTED_CABLE_MAX    32
>>
>> Why only 32 cables are supported? I mean what is the reason behind the
>> hard limit?
>
> Current extcon core use the 32bit variable to identify the supported
> external connectors of each extcon device. But, the number of
> supported connectors should be updated. I have the plan about it.

I get it, it is related to 'state' variable which is u32 now.

>
>>
>>> +#define CABLE_NAME_MAX         30
>>> +
>>> +static const char *extcon_name[] =  {
>>> +       [EXTCON_NONE]           = "NONE",
>>> +
>>> +       /* USB external connector */
>>>         [EXTCON_USB]            = "USB",
>>> -       [EXTCON_USB_HOST]       = "USB-Host",
>>> +       [EXTCON_USB_HOST]       = "USB-HOST",
>>> +
>>> +       /* Charger external connector */
>>>         [EXTCON_TA]             = "TA",
>>> -       [EXTCON_FAST_CHARGER]   = "Fast-charger",
>>> -       [EXTCON_SLOW_CHARGER]   = "Slow-charger",
>>> -       [EXTCON_CHARGE_DOWNSTREAM]      = "Charge-downstream",
>>> +       [EXTCON_FAST_CHARGER]   = "FAST-CHARGER",
>>> +       [EXTCON_SLOW_CHARGER]   = "SLOW-CHARGER",
>>> +       [EXTCON_CHARGE_DOWNSTREAM] = "CHARGE-DOWNSTREAM",
>>> +
>>> +       /* Audio/Video external connector */
>>> +       [EXTCON_LINE_IN]        = "LINE-IN",
>>> +       [EXTCON_LINE_OUT]       = "LINE-OUT",
>>> +       [EXTCON_MICROPHONE]     = "MICROPHONE",
>>> +       [EXTCON_HEADPHONE]      = "HEADPHONE",
>>> +
>>>         [EXTCON_HDMI]           = "HDMI",
>>>         [EXTCON_MHL]            = "MHL",
>>>         [EXTCON_DVI]            = "DVI",
>>>         [EXTCON_VGA]            = "VGA",
>>> -       [EXTCON_DOCK]           = "Dock",
>>> -       [EXTCON_LINE_IN]        = "Line-in",
>>> -       [EXTCON_LINE_OUT]       = "Line-out",
>>> -       [EXTCON_MIC_IN]         = "Microphone",
>>> -       [EXTCON_HEADPHONE_OUT]  = "Headphone",
>>> -       [EXTCON_SPDIF_IN]       = "SPDIF-in",
>>> -       [EXTCON_SPDIF_OUT]      = "SPDIF-out",
>>> -       [EXTCON_VIDEO_IN]       = "Video-in",
>>> -       [EXTCON_VIDEO_OUT]      = "Video-out",
>>> -       [EXTCON_MECHANICAL]     = "Mechanical",
>>> +       [EXTCON_SPDIF_IN]       = "SPDIF-IN",
>>> +       [EXTCON_SPDIF_OUT]      = "SPDIF-OUT",
>>> +       [EXTCON_VIDEO_IN]       = "VIDEO-IN",
>>> +       [EXTCON_VIDEO_OUT]      = "VIDEO-OUT",
>>> +
>>> +       /* Etc external connector */
>>> +       [EXTCON_DOCK]           = "DOCK",
>>> +       [EXTCON_JIG]            = "JIG",
>>> +       [EXTCON_MECHANICAL]     = "MECHANICAL",
>>> +
>>> +       NULL,
>>>  };
>>
>> This change does not look related to the topic. Can you split it to
>> separate patch?
>
> Do you mean about changing the name of external connectors from small
> letter to capital letter?

Yes. This should be separate commit.


Best regards,
Krzysztof

  reply	other threads:[~2015-05-17  9:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 14:31 [PATCH 0/2] extcon: Use the unique id for each cable and update the extcon notifier Chanwoo Choi
2015-05-15 14:31 ` [PATCH 1/2] extcon: Use the unique id for external connector instead of string Chanwoo Choi
2015-05-15 14:49   ` Roger Quadros
2015-05-15 15:16   ` Charles Keepax
2015-05-15 15:57   ` Pallala, Ramakrishna
2015-05-17  7:10   ` Krzysztof Kozlowski
2015-05-17  7:53     ` Chanwoo Choi
2015-05-17  9:09       ` Krzysztof Kozlowski [this message]
2015-05-19 12:28       ` Chanwoo Choi
2015-05-20  3:24         ` Krzysztof Kozlowski
2015-05-20  3:48           ` Chanwoo Choi
2015-05-15 14:31 ` [PATCH 2/2] extcon: Update the prototype of extcon_register_notifier() with enum extcon Chanwoo Choi
2015-05-17  7:41   ` Krzysztof Kozlowski
2015-05-17  7:58     ` Chanwoo Choi

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=CAJKOXPc98vmAK4j-8W7nDvH6XE6+GFqQy_nVcUAttA6FfSCG5Q@mail.gmail.com \
    --to=k.kozlowski@samsung.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=balbi@ti.com \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=cw00.choi@samsung.com \
    --cc=gg@slimlogic.co.uk \
    --cc=jaewon02.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=ramakrishna.pallala@intel.com \
    --cc=rogerq@ti.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;
as well as URLs for NNTP newsgroup(s).