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]
Message-ID: <3ea3334e-96f5-6ce0-1402-6b9baf192db3@ti.com>
Date:	Tue, 2 Aug 2016 10:27:54 +0300
From:	Roger Quadros <rogerq@...com>
To:	Chanwoo Choi <cw00.choi@...sung.com>,
	<linux-kernel@...r.kernel.org>
CC:	<myungjoo.ham@...sung.com>, <zyw@...k-chips.com>,
	<groeck@...omium.org>, <chanwoo@...nel.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Subject: Re: [PATCH v3 1/6] extcon: Add the extcon_type to gather each
 connector into five category

Hi,

On 02/08/16 04:58, Chanwoo Choi wrote:
> This patch adds the new extcon type to group the each connecotr
> into following five category. This type would be used to handle
> the connectors as a group unit instead of a connector unit.
> - EXTCON_TYPE_USB  : USB connector
> - EXTCON_TYPE_CHG  : Charger connector
> - EXTCON_TYPE_JACK : Jack connector
> - EXTCON_TYPE_DISP : Display connector
> - EXTCON_TYPE_MISC : Miscellaneous connector
> 
> Also, each external connector is possible to belong to one more extcon type.
> In caes of EXTCON_CHG_USB_SDP, it have the EXTCON_TYPE_CHG and EXTCON_TYPE_USB.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
> Tested-by: Chris Zhong <zyw@...k-chips.com>
> Tested-by: Guenter Roeck <groeck@...omium.org>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@...sung.com>
> Reviewed-by: Guenter Roeck <groeck@...omium.org>
> ---
>  drivers/extcon/extcon.c | 159 +++++++++++++++++++++++++++++++++++++++---------
>  include/linux/extcon.h  |   9 +++
>  2 files changed, 139 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 9a266e5c7e10..129afc87313e 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -38,43 +38,144 @@
>  #define SUPPORTED_CABLE_MAX	32
>  #define CABLE_NAME_MAX		30
>  
> -static const char *extcon_name[] =  {
> -	[EXTCON_NONE]			= "NONE",
> +struct __extcon_info {
> +	unsigned int type;
> +	unsigned int id;
> +	const char *name;
> +
> +} extcon_info[] = {
> +	[EXTCON_NONE] = {
> +		.type = EXTCON_TYPE_MISC,
> +		.id = EXTCON_NONE,
> +		.name = "NONE",
> +	},
>  
>  	/* USB external connector */
> -	[EXTCON_USB]			= "USB",
> -	[EXTCON_USB_HOST]		= "USB-HOST",
> +	[EXTCON_USB] = {
> +		.type = EXTCON_TYPE_USB,
> +		.id = EXTCON_USB,
> +		.name = "USB",
> +	},
> +	[EXTCON_USB_HOST] = {
> +		.type = EXTCON_TYPE_USB,
> +		.id = EXTCON_USB,
> +		.name = "USB_HOST",
> +	},

EXTCON_USB_HOST should now be redundant as we can get all the
necessary information via EXTCON_USB.

>  
>  	/* Charging external connector */


<snip>

cheers,
-roger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ