Re: [PATCH v2] platform/x86/intel_cht_int33fe: Split code to microUSB and TypeC variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 09, 2019 at 12:55:59AM +0300, Yauhen Kharuzhy wrote:
> Existing intel_cht_int33fe ACPI pseudo-device driver assumes that
> hardware has TypeC connector and register related devices described as
> I2C connections in the _CRS resource.
> 
> There at least one hardware (Lenovo Yoga Book YB1-91L/F) with microUSB
> connector exists. It has INT33FE device in the DSDT table but there are
> only two I2C connection described: PMIC and BQ27452 battery fuel gauge.
> 
> Splitting existing INT33FE driver allow to maintain code for microUSB
> variant separately and make it simpler.
> 
> Signed-off-by: Yauhen Kharuzhy <jekhor@xxxxxxxxx>
> ---
>  drivers/platform/x86/Kconfig                  |  24 +++-
>  drivers/platform/x86/Makefile                 |   5 +-
>  .../platform/x86/intel_cht_int33fe_common.c   |  93 ++++++++++++++++
>  .../platform/x86/intel_cht_int33fe_common.h   |  23 ++++
>  drivers/platform/x86/intel_cht_int33fe_musb.c | 105 ++++++++++++++++++
>  ...ht_int33fe.c => intel_cht_int33fe_typec.c} |  26 +----
>  6 files changed, 249 insertions(+), 27 deletions(-)
>  create mode 100644 drivers/platform/x86/intel_cht_int33fe_common.c
>  create mode 100644 drivers/platform/x86/intel_cht_int33fe_common.h
>  create mode 100644 drivers/platform/x86/intel_cht_int33fe_musb.c
>  rename drivers/platform/x86/{intel_cht_int33fe.c => intel_cht_int33fe_typec.c} (94%)
> 
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 1b67bb578f9f..a34c5615d6ef 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -920,15 +920,15 @@ config ACPI_CMPC
>  	  keys as input device, backlight device, tablet and accelerometer
>  	  devices.
>  
> -config INTEL_CHT_INT33FE
> -	tristate "Intel Cherry Trail ACPI INT33FE Driver"
> +config INTEL_CHT_INT33FE_TYPEC
> +	tristate "Intel Cherry Trail ACPI INT33FE Driver (typeC connector)"
>  	depends on X86 && ACPI && I2C && REGULATOR
>  	depends on CHARGER_BQ24190=y || (CHARGER_BQ24190=m && m)
>  	depends on USB_ROLES_INTEL_XHCI=y || (USB_ROLES_INTEL_XHCI=m && m)
>  	depends on TYPEC_MUX_PI3USB30532=y || (TYPEC_MUX_PI3USB30532=m && m)
> -	---help---
> +	help
>  	  This driver add support for the INT33FE ACPI device found on
> -	  some Intel Cherry Trail devices.
> +	  some Intel Cherry Trail devices with USB TypeC connector.
>  
>  	  The INT33FE ACPI device has a CRS table with I2cSerialBusV2
>  	  resources for 3 devices: Maxim MAX17047 Fuel Gauge Controller,
> @@ -939,6 +939,22 @@ config INTEL_CHT_INT33FE
>  	  If you enable this driver it is advised to also select
>  	  CONFIG_TYPEC_FUSB302=m and CONFIG_BATTERY_MAX17042=m.
>  
> +config INTEL_CHT_INT33FE_MUSB
> +	tristate "Intel Cherry Trail ACPI INT33FE Driver (mUSB connector)"

Please don't use the term MUSB, musb, mUSB or microUSB. A collogue of
mine noticed this thread, and was a bit confused about the use of the
those terms here, and to be honest, so was I. MUSB is USB controller
from Mentor Graphics. This is the driver for it: drivers/usb/musb/

"micro-AB" and "uAB" are much more clear here. For the config option,
how about simply INTEL_CHT_INT33FE_UAB

thanks,

-- 
heikki



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux