Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1465107

[PATCH 07/13] scpi: ignore init_versions failure if reported not supported

From Neil Armstrong <narmstrong@baylibre.com>
Newsgroups linux.kernel
Subject [PATCH 07/13] scpi: ignore init_versions failure if reported not supported
Date 2016-08-18 12:20 +0200
Message-ID <s7sAz-6Nh-55@gated-at.bofh.it> (permalink)
References <s7sAx-6Nh-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In Amlogic GXBB Legacy SCPI, the LEGACY_SCPI_CMD_SCPI_CAPABILITIES report
as SCPI_ERR_SUPPORT, so do not fail if this command is not supported.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/firmware/arm_scpi.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 3fe39fe..d3be4c5 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -1111,12 +1111,13 @@ err:
 		ret = scpi_info->ops->init_versions(scpi_info);
 	else
 	ret = scpi_init_versions(scpi_info);
-	if (ret) {
+	if (ret && ret != -EOPNOTSUPP) {
 		dev_err(dev, "incorrect or no SCP firmware found\n");
 		scpi_remove(pdev);
 		return ret;
 	}
 
+	if (ret != -EOPNOTSUPP) {
 	_dev_info(dev, "SCP Protocol %d.%d Firmware %d.%d.%d version\n",
 		  PROTOCOL_REV_MAJOR(scpi_info->protocol_version),
 		  PROTOCOL_REV_MINOR(scpi_info->protocol_version),
@@ -1124,15 +1125,16 @@ err:
 		  FW_REV_MINOR(scpi_info->firmware_version),
 		  FW_REV_PATCH(scpi_info->firmware_version));
 
+		ret = sysfs_create_groups(&dev->kobj, versions_groups);
+		if (ret)
+			dev_err(dev, "unable to create sysfs version group\n");
+	}
+
 	if (scpi_info->ops && scpi_info->ops->scpi_ops)
 		scpi_info->scpi_ops = scpi_info->ops->scpi_ops;
 	else
 		scpi_info->scpi_ops = &scpi_ops;
 
-	ret = sysfs_create_groups(&dev->kobj, versions_groups);
-	if (ret)
-		dev_err(dev, "unable to create sysfs version group\n");
-
 	return of_platform_populate(dev->of_node, NULL, NULL, dev);
 }
 
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] scpi: Add support for legacy SCPI protocol Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
  [PATCH 06/13] scpi: add priv_scpi_ops and fill legacy structure Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
    Re: [PATCH 06/13] scpi: add priv_scpi_ops and fill legacy structure Sudeep Holla <sudeep.holla@arm.com> - 2016-08-19 18:50 +0200
      Re: [PATCH 06/13] scpi: add priv_scpi_ops and fill legacy structure Neil Armstrong <narmstrong@baylibre.com> - 2016-08-23 10:30 +0200
        Re: [PATCH 06/13] scpi: add priv_scpi_ops and fill legacy structure Sudeep Holla <sudeep.holla@arm.com> - 2016-08-23 17:00 +0200
  [PATCH 04/13] scpi: Add legacy SCP functions calling legacy_scpi_send_message Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
    Re: [PATCH 04/13] scpi: Add legacy SCP functions calling  legacy_scpi_send_message Sudeep Holla <sudeep.holla@arm.com> - 2016-08-19 18:30 +0200
      Re: [PATCH 04/13] scpi: Add legacy SCP functions calling  legacy_scpi_send_message Neil Armstrong <narmstrong@baylibre.com> - 2016-08-23 10:20 +0200
        Re: [PATCH 04/13] scpi: Add legacy SCP functions calling  legacy_scpi_send_message Sudeep Holla <sudeep.holla@arm.com> - 2016-08-23 16:50 +0200
  [PATCH 09/13] scpi: implement rockchip support via the vendor_msg mechanism Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
  [PATCH 01/13] scpi: Add vendor_send_message to enable access to vendor commands Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
    Re: [PATCH 01/13] scpi: Add vendor_send_message to enable access to  vendor commands Sudeep Holla <sudeep.holla@arm.com> - 2016-08-19 03:30 +0200
      Re: [PATCH 01/13] scpi: Add vendor_send_message to enable access to  vendor commands Neil Armstrong <narmstrong@baylibre.com> - 2016-08-19 10:10 +0200
        Re: [PATCH 01/13] scpi: Add vendor_send_message to enable access to  vendor commands Sudeep Holla <sudeep.holla@arm.com> - 2016-08-19 12:40 +0200
  [PATCH 11/13] dt-bindings: Add support for Amlogic GXBB SCPI Interface Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
    Re: [PATCH 11/13] dt-bindings: Add support for Amlogic GXBB SCPI  Interface Rob Herring <robh@kernel.org> - 2016-08-19 15:50 +0200
  [PATCH 08/13] scpi: add a vendor_msg mechanism in case the mailbox message differs Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
    Re: [PATCH 08/13] scpi: add a vendor_msg mechanism in case the  mailbox message differs Sudeep Holla <sudeep.holla@arm.com> - 2016-08-19 18:50 +0200
  [PATCH 07/13] scpi: ignore init_versions failure if reported not supported Neil Armstrong <narmstrong@baylibre.com> - 2016-08-18 12:20 +0200
    Re: [PATCH 07/13] scpi: ignore init_versions failure if reported not  supported Sudeep Holla <sudeep.holla@arm.com> - 2016-08-19 18:50 +0200
      Re: [PATCH 07/13] scpi: ignore init_versions failure if reported not  supported Neil Armstrong <narmstrong@baylibre.com> - 2016-08-23 10:30 +0200
        Re: [PATCH 07/13] scpi: ignore init_versions failure if reported not  supported Sudeep Holla <sudeep.holla@arm.com> - 2016-08-23 17:00 +0200
          Re: [PATCH 07/13] scpi: ignore init_versions failure if reported not  supported Sudeep Holla <sudeep.holla@arm.com> - 2016-08-23 17:10 +0200
          Re: [PATCH 07/13] scpi: ignore init_versions failure if reported not  supported Neil Armstrong <narmstrong@baylibre.com> - 2016-08-23 17:10 +0200

csiph-web