Re: [PATCH] extcon: Redefine the unique id of supported external connectors without 'enum extcon' type

From: Chanwoo Choi
Date: Fri Jun 12 2015 - 01:04:13 EST


Dear Greg,

On 06/12/2015 01:29 PM, Greg KH wrote:
> On Fri, Jun 12, 2015 at 11:10:06AM +0900, Chanwoo Choi wrote:
>> This patch just redefine the unique id of supported external connectors without
>> 'enum extcon' type. Because unique id would be used on devictree file(*.dts) to
>> indicate the specific external connectors like key number of input framework.
>> So, I have the plan to move this definitions to following header file which
>> includes the unique id of supported external connectors.
>> - include/dt-bindings/extcon/extcon.h
>
> Do we have other such fields in dt-bindings that are not enumerated
> types?

I think that 'integer' type is more appropriate than enumerated type
in header file of includ/dt-bindings/ as following:

- Previous defintions
enum extcon {
/* USB external connector */
EXTCON_USB = 0x1,
EXTCON_USB_HOST = 0x2,
......
};

- New definitions without specific 'enum extcon' type.
#define EXTCON_USB 1
#define EXTCON_USB_HOST 2
......

>
> What's wrong with keeping this as-is and not changing to an integer?
>
>> Fixes: 2a9de9c0f08d ("extcon: Use the unique id for external connector instead of string")
>
> How is this a bugfix?

It is my mistake. This patch is not bug fix.

Best Regards,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/