Re: [PATCH V2 1/2] usb: typec: Support sprd_pmic_typec driver

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

 



On Mon, Dec 11, 2023 at 1:42 AM Xinhu Wu <xinhu.wu@xxxxxxxxxx> wrote:
>
> Add Unisoc PMIC typec driver.The Unisoc PMIC typec driver handles the
> role and orientation detection, and notifies client drivers using
> extcon mechanism.
>
> Signed-off-by: Xinhu Wu <xinhu.wu@xxxxxxxxxx>
> ---
>  drivers/usb/typec/Kconfig           |  11 +
>  drivers/usb/typec/Makefile          |   1 +
>  drivers/usb/typec/sprd_pmic_typec.c | 587 ++++++++++++++++++++++++++++
>  3 files changed, 599 insertions(+)
>  create mode 100644 drivers/usb/typec/sprd_pmic_typec.c
>
> diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
> index 2f80c2792dbd..47b4468315aa 100644
> --- a/drivers/usb/typec/Kconfig
> +++ b/drivers/usb/typec/Kconfig
> @@ -110,6 +110,17 @@ config TYPEC_WUSB3801
>           If you choose to build this driver as a dynamically linked module, the
>           module will be called wusb3801.ko.
>
> +config TYPEC_SPRD_PMIC
> +       tristate "SPRD Serials PMICs Typec Controller"
> +       help
> +         Say Y or M here if your system has a SPRD PMIC Type-C port controller.
> +
> +         If you choose to build this driver as a dynamically linked module, the
> +         module will be called sprd_pmic_typec.ko.
> +         SPRD_PMIC_TYPEC notify usb, phy, charger, and analog audio to proceed
> +         with work
> +
> +
>  source "drivers/usb/typec/mux/Kconfig"
>
>  source "drivers/usb/typec/altmodes/Kconfig"
> diff --git a/drivers/usb/typec/Makefile b/drivers/usb/typec/Makefile
> index 7a368fea61bc..81818c2fa890 100644
> --- a/drivers/usb/typec/Makefile
> +++ b/drivers/usb/typec/Makefile
> @@ -11,4 +11,5 @@ obj-$(CONFIG_TYPEC_HD3SS3220) += hd3ss3220.o
>  obj-$(CONFIG_TYPEC_STUSB160X)  += stusb160x.o
>  obj-$(CONFIG_TYPEC_RT1719)     += rt1719.o
>  obj-$(CONFIG_TYPEC_WUSB3801)   += wusb3801.o
> +obj-$(CONFIG_TYPEC_SPRD_PMIC)  += sprd_pmic_typec.o
>  obj-$(CONFIG_TYPEC)            += mux/
> diff --git a/drivers/usb/typec/sprd_pmic_typec.c b/drivers/usb/typec/sprd_pmic_typec.c
> new file mode 100644
> index 000000000000..536f340d8b65
> --- /dev/null
> +++ b/drivers/usb/typec/sprd_pmic_typec.c
> @@ -0,0 +1,587 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Driver for Spreadtrum PMIC USB Type-C
> + *
> + * Copyright (C) 2023 Unisoc Inc.
> + */
> +#include <linux/extcon.h>
> +#include <linux/extcon-provider.h>
> +#include <linux/interrupt.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/nvmem-consumer.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>

You probably don't need this header and the implicit includes it makes
are dropped now in linux-next. Please check what you actually need and
make them explicit.

Rob





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux