Re: [PATCH v8 1/6] Extcon (external connector): import Android'sswitch class and modify.

From: Mark Brown
Date: Thu Apr 19 2012 - 07:38:22 EST


On Thu, Apr 19, 2012 at 11:41:33AM +0900, MyungJoo Ham wrote:
> External connector class (extcon) is based on and an extension of
> Android kernel's switch class located at linux/drivers/switch/.

Reviewed-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

> +comment "Extcon Class Configuration"
> +
> +config EXTCON_ANDROID_COMPATIBLE
> + bool "Class name uses 'switch' to be compatible with Android kernel"
> + depends on ANDROID
> + help
> + The class name of extcon device drivers are set 'switch' in order
> + to be compatible with Android kernel switch framework. With this
> + option enabled, Android userspace platform may use extcon device
> + drivers as if they are switch device drivers.

Though I think this is out of date now? Not a big deal and could be
fixed up later.

> +#if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH)
> + switch_class = class_compat_register("switch");
> + if (WARN(!switch_class, "cannot allocate"))
> + return -ENOMEM;
> +#endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */

This does the above but differently.

Attachment: signature.asc
Description: Digital signature