Commit d3a9ff51 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'extcon-next-for-5.10-v2' of...

Merge tag 'extcon-next-for-5.10-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:

Detailed description for this pull request:

1. Update extcon driver with minor updates:
- Covert the devicetree binding format from txt to yaml and edit
  the bidning document for extcon-ptn5150.c.

- Clean-up the code of extcon-ptn5150.c without any behavior changes.

- Replace HTTP links with HTTPS ones on extcon-palmas.c and extcon-usb-gpio.c.

- Return the proper error code on extcon-max14577/max77693/max77843.c.

- Simplify with dev_err_probe() on extcon-palmas.c.

- Use module_platform_driver to simplify the code on extcon-axp288.c.

2. Update MAINTAINERS
- Add Krzysztof Kozlowski as maintainer of NXP PTN5150A CC/extcon driver
to provide review, feedback and testing.

* tag 'extcon-next-for-5.10-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: (25 commits)
  extcon: axp288: Use module_platform_driver to simplify the code
  extcon: ptn5150: Do not print error during probe if nothing is attached
  extcon: ptn5150: Use defines for registers
  extcon: palmas: Simplify with dev_err_probe()
  extcon: max8997: Return error code of extcon_dev_allocate()
  extcon: max77843: Return error code of extcon_dev_allocate()
  extcon: max77693: Return error code of extcon_dev_allocate()
  extcon: max14577: Return error code of extcon_dev_allocate()
  extcon: ptn5150: Set the VBUS and POLARITY property capability
  extcon: ptn5150: Switch to GENMASK() and BIT() macros
  extcon: ptn5150: Deduplicate parts of dev_err_probe()
  extcon: Replace HTTP links with HTTPS ones
  MAINTAINERS: Add entry for NXP PTN5150A CC driver
  extcon: ptn5150: Convert to .probe_new
  extcon: ptn5150: Convert to module_i2c_driver
  extcon: ptn5150: Reduce the amount of logs on deferred probe
  extcon: ptn5150: Make 'vbus-gpios' optional
  extcon: ptn5150: Check current USB mode when probing
  extcon: ptn5150: Lower the noisiness of probe
  extcon: ptn5150: Simplify getting vbus-gpios with flags
  ...
parents d8ccb6d8 dbc88807
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
* PTN5150 CC (Configuration Channel) Logic device

PTN5150 is a small thin low power CC logic chip supporting the USB Type-C
connector application with CC control logic detection and indication functions.
It is interfaced to the host controller using an I2C interface.

Required properties:
- compatible: should be "nxp,ptn5150"
- reg: specifies the I2C slave address of the device
- int-gpio: should contain a phandle and GPIO specifier for the GPIO pin
	connected to the PTN5150's INTB pin.
- vbus-gpio: should contain a phandle and GPIO specifier for the GPIO pin which
	is used to control VBUS.
- pinctrl-names : a pinctrl state named "default" must be defined.
- pinctrl-0 : phandle referencing pin configuration of interrupt and vbus
	control.

Example:
	ptn5150@1d {
		compatible = "nxp,ptn5150";
		reg = <0x1d>;
		int-gpio = <&msmgpio 78 GPIO_ACTIVE_HIGH>;
		vbus-gpio = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&ptn5150_default>;
		status = "okay";
	};
+60 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: PTN5150 CC (Configuration Channel) Logic device

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

description: |
  PTN5150 is a small thin low power CC logic chip supporting the USB Type-C
  connector application with CC control logic detection and indication
  functions.  It is interfaced to the host controller using an I2C interface.

properties:
  compatible:
    const: nxp,ptn5150

  int-gpios:
    deprecated: true
    description:
      GPIO pin (input) connected to the PTN5150's INTB pin.
      Use "interrupts" instead.

  interrupts:
    maxItems: 1

  reg:
    maxItems: 1

  vbus-gpios:
    description:
      GPIO pin (output) used to control VBUS. If skipped, no such control
      takes place.

required:
  - compatible
  - interrupts
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        ptn5150@1d {
            compatible = "nxp,ptn5150";
            reg = <0x1d>;
            interrupt-parent = <&msmgpio>;
            interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
            vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
        };
    };
+7 −0
Original line number Diff line number Diff line
@@ -12485,6 +12485,13 @@ F: drivers/iio/gyro/fxas21002c_core.c
F:	drivers/iio/gyro/fxas21002c_i2c.c
F:	drivers/iio/gyro/fxas21002c_spi.c
NXP PTN5150A CC LOGIC AND EXTCON DRIVER
M:	Krzysztof Kozlowski <krzk@kernel.org>
L:	linux-kernel@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
F:	drivers/extcon/extcon-ptn5150.c
NXP SGTL5000 DRIVER
M:	Fabio Estevam <festevam@gmail.com>
L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
+1 −12
Original line number Diff line number Diff line
@@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = {
		.pm = &axp288_extcon_pm_ops,
	},
};

static int __init axp288_extcon_init(void)
{
	return platform_driver_register(&axp288_extcon_driver);
}
module_init(axp288_extcon_init);

static void __exit axp288_extcon_exit(void)
{
	platform_driver_unregister(&axp288_extcon_driver);
}
module_exit(axp288_extcon_exit);
module_platform_driver(axp288_extcon_driver);

MODULE_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
+1 −1
Original line number Diff line number Diff line
@@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
					      max14577_extcon_cable);
	if (IS_ERR(info->edev)) {
		dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
		return -ENOMEM;
		return PTR_ERR(info->edev);
	}

	ret = devm_extcon_dev_register(&pdev->dev, info->edev);
Loading