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

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
* 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";
};
# 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>;
};
};
...@@ -12485,6 +12485,13 @@ F: drivers/iio/gyro/fxas21002c_core.c ...@@ -12485,6 +12485,13 @@ F: drivers/iio/gyro/fxas21002c_core.c
F: drivers/iio/gyro/fxas21002c_i2c.c F: drivers/iio/gyro/fxas21002c_i2c.c
F: drivers/iio/gyro/fxas21002c_spi.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 NXP SGTL5000 DRIVER
M: Fabio Estevam <festevam@gmail.com> M: Fabio Estevam <festevam@gmail.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
......
...@@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = { ...@@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = {
.pm = &axp288_extcon_pm_ops, .pm = &axp288_extcon_pm_ops,
}, },
}; };
module_platform_driver(axp288_extcon_driver);
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_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>"); MODULE_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
......
...@@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev) ...@@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
max14577_extcon_cable); max14577_extcon_cable);
if (IS_ERR(info->edev)) { if (IS_ERR(info->edev)) {
dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); 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); ret = devm_extcon_dev_register(&pdev->dev, info->edev);
......
...@@ -1157,7 +1157,7 @@ static int max77693_muic_probe(struct platform_device *pdev) ...@@ -1157,7 +1157,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
max77693_extcon_cable); max77693_extcon_cable);
if (IS_ERR(info->edev)) { if (IS_ERR(info->edev)) {
dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); 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); ret = devm_extcon_dev_register(&pdev->dev, info->edev);
......
...@@ -845,7 +845,7 @@ static int max77843_muic_probe(struct platform_device *pdev) ...@@ -845,7 +845,7 @@ static int max77843_muic_probe(struct platform_device *pdev)
max77843_extcon_cable); max77843_extcon_cable);
if (IS_ERR(info->edev)) { if (IS_ERR(info->edev)) {
dev_err(&pdev->dev, "Failed to allocate memory for extcon\n"); dev_err(&pdev->dev, "Failed to allocate memory for extcon\n");
ret = -ENODEV; ret = PTR_ERR(info->edev);
goto err_muic_irq; goto err_muic_irq;
} }
......
...@@ -674,7 +674,7 @@ static int max8997_muic_probe(struct platform_device *pdev) ...@@ -674,7 +674,7 @@ static int max8997_muic_probe(struct platform_device *pdev)
info->edev = devm_extcon_dev_allocate(&pdev->dev, max8997_extcon_cable); info->edev = devm_extcon_dev_allocate(&pdev->dev, max8997_extcon_cable);
if (IS_ERR(info->edev)) { if (IS_ERR(info->edev)) {
dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
ret = -ENOMEM; ret = PTR_ERR(info->edev);
goto err_irq; goto err_irq;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* /*
* Palmas USB transceiver driver * Palmas USB transceiver driver
* *
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com
* Author: Graeme Gregory <gg@slimlogic.co.uk> * Author: Graeme Gregory <gg@slimlogic.co.uk>
* Author: Kishon Vijay Abraham I <kishon@ti.com> * Author: Kishon Vijay Abraham I <kishon@ti.com>
* Based on twl6030_usb.c * Based on twl6030_usb.c
...@@ -205,21 +205,15 @@ static int palmas_usb_probe(struct platform_device *pdev) ...@@ -205,21 +205,15 @@ static int palmas_usb_probe(struct platform_device *pdev)
palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id", palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id",
GPIOD_IN); GPIOD_IN);
if (PTR_ERR(palmas_usb->id_gpiod) == -EPROBE_DEFER) { if (IS_ERR(palmas_usb->id_gpiod))
return -EPROBE_DEFER; return dev_err_probe(&pdev->dev, PTR_ERR(palmas_usb->id_gpiod),
} else if (IS_ERR(palmas_usb->id_gpiod)) { "failed to get id gpio\n");
dev_err(&pdev->dev, "failed to get id gpio\n");
return PTR_ERR(palmas_usb->id_gpiod);
}
palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus", palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus",
GPIOD_IN); GPIOD_IN);
if (PTR_ERR(palmas_usb->vbus_gpiod) == -EPROBE_DEFER) { if (IS_ERR(palmas_usb->vbus_gpiod))
return -EPROBE_DEFER; return dev_err_probe(&pdev->dev, PTR_ERR(palmas_usb->vbus_gpiod),
} else if (IS_ERR(palmas_usb->vbus_gpiod)) { "failed to get id gpio\n");
dev_err(&pdev->dev, "failed to get vbus gpio\n");
return PTR_ERR(palmas_usb->vbus_gpiod);
}
if (palmas_usb->enable_id_detection && palmas_usb->id_gpiod) { if (palmas_usb->enable_id_detection && palmas_usb->id_gpiod) {
palmas_usb->enable_id_detection = false; palmas_usb->enable_id_detection = false;
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* drivers/extcon/extcon-usb-gpio.c - USB GPIO extcon driver * drivers/extcon/extcon-usb-gpio.c - USB GPIO extcon driver
* *
* Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com
* Author: Roger Quadros <rogerq@ti.com> * Author: Roger Quadros <rogerq@ti.com>
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment