From 5d8cbf7176a427cd904eaa6efdaf6960d717b0de Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 28 Jun 2019 09:20:37 -0300 Subject: [PATCH 1/3] docs: extcon: convert it to ReST and move to ACPI dir The intel-int3496.txt file is a documentation for an ACPI driver. There's no reason to keep it on a separate directory. So, instead of keeping it on some random location, move it to a sub-directory inside the ACPI documentation dir, renaming it to .rst. Signed-off-by: Mauro Carvalho Chehab Acked-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki --- .../acpi/extcon-intel-int3496.rst} | 14 ++++++++++---- Documentation/firmware-guide/acpi/index.rst | 1 + MAINTAINERS | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) rename Documentation/{extcon/intel-int3496.txt => firmware-guide/acpi/extcon-intel-int3496.rst} (66%) diff --git a/Documentation/extcon/intel-int3496.txt b/Documentation/firmware-guide/acpi/extcon-intel-int3496.rst similarity index 66% rename from Documentation/extcon/intel-int3496.txt rename to Documentation/firmware-guide/acpi/extcon-intel-int3496.rst index 8155dbc7fad3..5137ca834b54 100644 --- a/Documentation/extcon/intel-int3496.txt +++ b/Documentation/firmware-guide/acpi/extcon-intel-int3496.rst @@ -1,5 +1,6 @@ +===================================================== Intel INT3496 ACPI device extcon driver documentation ------------------------------------------------------ +===================================================== The Intel INT3496 ACPI device extcon driver is a driver for ACPI devices with an acpi-id of INT3496, such as found for example on @@ -13,15 +14,20 @@ between an USB host and an USB peripheral controller. The ACPI devices exposes this functionality by returning an array with up to 3 gpio descriptors from its ACPI _CRS (Current Resource Settings) call: -Index 0: The input gpio for the id-pin, this is always present and valid -Index 1: The output gpio for enabling Vbus output from the device to the otg +======= ===================================================================== +Index 0 The input gpio for the id-pin, this is always present and valid +Index 1 The output gpio for enabling Vbus output from the device to the otg port, write 1 to enable the Vbus output (this gpio descriptor may be absent or invalid) -Index 2: The output gpio for muxing of the data pins between the USB host and +Index 2 The output gpio for muxing of the data pins between the USB host and the USB peripheral controller, write 1 to mux to the peripheral controller +======= ===================================================================== There is a mapping between indices and GPIO connection IDs as follows + + ======= ======= id index 0 vbus index 1 mux index 2 + ======= ======= diff --git a/Documentation/firmware-guide/acpi/index.rst b/Documentation/firmware-guide/acpi/index.rst index ae609eec4679..90c90d42d9ad 100644 --- a/Documentation/firmware-guide/acpi/index.rst +++ b/Documentation/firmware-guide/acpi/index.rst @@ -24,3 +24,4 @@ ACPI Support acpi-lid lpit video_extension + extcon-intel-int3496 diff --git a/MAINTAINERS b/MAINTAINERS index a6954776a37e..bf9ba7c59ce8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -321,7 +321,7 @@ F: drivers/pnp/pnpacpi/ F: include/linux/acpi.h F: include/linux/fwnode.h F: include/acpi/ -F: Documentation/acpi/ +F: Documentation/firmware-guide/acpi/ F: Documentation/ABI/testing/sysfs-bus-acpi F: Documentation/ABI/testing/configfs-acpi F: drivers/pci/*acpi* @@ -4862,7 +4862,7 @@ S: Maintained F: Documentation/ F: scripts/kernel-doc X: Documentation/ABI/ -X: Documentation/acpi/ +X: Documentation/firmware-guide/acpi/ X: Documentation/devicetree/ X: Documentation/i2c/ X: Documentation/media/ @@ -6032,7 +6032,7 @@ S: Maintained F: drivers/extcon/ F: include/linux/extcon/ F: include/linux/extcon.h -F: Documentation/extcon/ +F: Documentation/firmware-guide/acpi/extcon-intel-int3496.rst F: Documentation/devicetree/bindings/extcon/ EXYNOS DP DRIVER From b244883ca89c88fc250ba440937a3f1b28b258ff Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 2 Jul 2019 14:10:29 +0100 Subject: [PATCH 2/3] ACPI: APD: remove redundant assignment to pointer clk The pointer clk is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_apd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index ff47317d8ef1..7cd0c9ac71ea 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -57,7 +57,7 @@ struct apd_private_data { static int acpi_apd_setup(struct apd_private_data *pdata) { const struct apd_device_desc *dev_desc = pdata->dev_desc; - struct clk *clk = ERR_PTR(-ENODEV); + struct clk *clk; if (dev_desc->fixed_clk_rate) { clk = clk_register_fixed_rate(&pdata->adev->dev, From 371b86897d0125738cdb9dc76d16f12bcabdef9d Mon Sep 17 00:00:00 2001 From: Liguang Zhang Date: Tue, 25 Jun 2019 13:15:28 +0800 Subject: [PATCH 3/3] ACPI / APEI: Remove needless __ghes_check_estatus() calls Function __ghes_check_estatus() is always called after __ghes_peek_estatus(), but it is already called in __ghes_peek_estatus(). So we should remove some needless __ghes_check_estatus() calls. Signed-off-by: Liguang Zhang Reviewed-by: James Morse Signed-off-by: Rafael J. Wysocki --- drivers/acpi/apei/ghes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 993940d582f5..a66e00fe31fe 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -345,7 +345,7 @@ static int __ghes_peek_estatus(struct ghes *ghes, return -ENOENT; } - return __ghes_check_estatus(ghes, estatus); + return 0; } static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus,