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


Groups > linux.kernel > #1445890

[PATCH v3 3/3] spi: core: allow creating devices without spi-max-frequency

From Michal Suchanek <hramrach@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 3/3] spi: core: allow creating devices without spi-max-frequency
Date 2016-07-19 00:40 +0200
Message-ID <rWpmF-3Qw-19@gated-at.bofh.it> (permalink)
References <rWpmF-3Qw-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Since the previous patch allows creating SPI slaves without specifying
what device the CS connects to make spi-max-frequency also optional.

The spi-max-frequency is device-specific and the driver can set it
anyway.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
---
 drivers/spi/spi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index f0de2ec..08e65e4 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1554,11 +1554,11 @@ of_register_spi_device(struct spi_master *master, struct device_node *nc)
 	/* Device speed */
 	rc = of_property_read_u32(nc, "spi-max-frequency", &value);
 	if (rc) {
-		dev_err(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
+		dev_warn(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
 			nc->full_name, rc);
-		goto err_out;
+	} else {
+		spi->max_speed_hz = value;
 	}
-	spi->max_speed_hz = value;
 
 	/* Store a pointer to the node in the device structure */
 	of_node_get(nc);
-- 
2.8.1

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


Thread

[PATCH v3 0/3] Spidev usability patchset update Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200
  [PATCH v3 2/3] spi: of: allow instantiating slaves without a driver Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200
    Re: [PATCH v3 2/3] spi: of: allow instantiating slaves without a  driver Mark Brown <broonie@kernel.org> - 2016-07-19 01:10 +0200
      Re: [PATCH v3 2/3] spi: of: allow instantiating slaves without a driver Michal Suchanek <hramrach@gmail.com> - 2016-07-19 10:40 +0200
        Re: [PATCH v3 2/3] spi: of: allow instantiating slaves without a  driver Mark Brown <broonie@kernel.org> - 2016-07-19 13:00 +0200
  [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200
    Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi  slaves. Mark Brown <broonie@kernel.org> - 2016-07-19 01:10 +0200
      Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 13:20 +0200
        Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi  slaves. Mark Brown <broonie@kernel.org> - 2016-07-19 14:50 +0200
          Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 17:40 +0200
            Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi  slaves. Mark Brown <broonie@kernel.org> - 2016-07-19 19:30 +0200
              Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves. Michal Suchanek <hramrach@gmail.com> - 2016-07-19 20:40 +0200
    Re: [lkp] [PATCH v3 1/3] spi: spidev: create spidev device for all  spi slaves. Fengguang Wu <fengguang.wu@intel.com> - 2016-07-20 09:20 +0200
  [PATCH v3 3/3] spi: core: allow creating devices without spi-max-frequency Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:40 +0200

csiph-web