lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 17 May 2015 18:09:32 +0900
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	cw00.choi@...sung.com
Cc:	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
	gg@...mlogic.co.uk, Kishon Vijay Abraham I <kishon@...com>,
	jaewon02.kim@...sung.com, Roger Quadros <rogerq@...com>,
	"Pallala, Ramakrishna" <ramakrishna.pallala@...el.com>,
	Felipe Balbi <balbi@...com>,
	Aaro Koskinen <aaro.koskinen@....fi>
Subject: Re: [PATCH 1/2] extcon: Use the unique id for external connector
 instead of string

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

2015-05-17 16:53 GMT+09:00 Chanwoo Choi <cwchoi00@...il.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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ