From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Sun, 4 Oct 2015 20:16:06 +0800 Subject: [U-Boot] [PATCH] spi: ignore set speed and mode if not available In-Reply-To: References: <1442907681-14489-1-git-send-email-thomas@wytron.com.tw> Message-ID: <56111886.20600@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 10/03/2015 10:28 PM, Simon Glass wrote: > Hi Thomas, > > On 22 September 2015 at 08:41, Thomas Chou wrote: >> Some cores, such as Altera SPI and QuadSPI, can not change >> speed and mode at runtime. Ignore the operation which is >> not available. >> >> Signed-off-by: Thomas Chou >> --- >> drivers/spi/spi-uclass.c | 6 +----- >> 1 file changed, 1 insertion(+), 5 deletions(-) > > This looks OK, but can you please update the method documentation for > set_speed() and set_mode() to indicate that they are optional in the > case where the hardware does not support it. > >> >> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c >> index d666272..5298073 100644 >> --- a/drivers/spi/spi-uclass.c >> +++ b/drivers/spi/spi-uclass.c >> @@ -21,13 +21,11 @@ DECLARE_GLOBAL_DATA_PTR; >> static int spi_set_speed_mode(struct udevice *bus, int speed, int mode) > > Please add a comment to this function indicated that missing > set_speed() and set_mode() methods are OK. Thanks a lot for your review. The comments will be added. Best regards, Thomas Chou