Skip to contentSkip to conversation

staging: fbtft: add docs for fbtft_write_spi()

PATCH In review Zachary Mayhew 2 participants 5 messages Sep 20, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fbtft: add docs for fbtft_write_spi()

Subject: [PATCH] staging: fbtft: add docs for fbtft_write_spi()

This patch adds documentation for fbtft_write_spi() to make its calling context clear and explain what it does.

---
 drivers/staging/fbtft/fbtft-io.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/staging/fbtft/fbtft-io.c +13 -0
index de1904a443c2..985d7cf8c774 100644
@@ -5,6 +5,19 @@
 #include <linux/spi/spi.h>
 #include "fbtft.h"
 
+/**
+ * fbtft_write_spi() - write data to current spi
+ * @par: Driver data including driver &struct spi_device
+ * @buf: Buffer to write to spi
+ * @len: Length of the buffer
+ * Context: can sleep
+ *
+ * Builds an &struct spi_transfer and &struct spi_message object based on the
+ * given @buf and @len.  These are then used in a call to spi_sync() which will
+ * write to the spi.
+ *
+ * Return: zero on success or else a negative error code
+ */
 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len)
 {
 	struct spi_transfer t = {
Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 1 line · Zachary Mayhew

Subject: [PATCH] staging: fbtft: add docs for fbtft_write_spi()

Odd, this shouldn't be in the body of the email :(

Quoted 37 lines

This patch adds documentation for fbtft_write_spi() to make its calling context clear and explain what it does.

---
 drivers/staging/fbtft/fbtft-io.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/staging/fbtft/fbtft-io.c +13 -0
index de1904a443c2..985d7cf8c774 100644
@@ -5,6 +5,19 @@
 #include <linux/spi/spi.h>
 #include "fbtft.h"
 
+/**
+ * fbtft_write_spi() - write data to current spi
+ * @par: Driver data including driver &struct spi_device
+ * @buf: Buffer to write to spi
+ * @len: Length of the buffer
+ * Context: can sleep
+ *
+ * Builds an &struct spi_transfer and &struct spi_message object based on the
+ * given @buf and @len.  These are then used in a call to spi_sync() which will
+ * write to the spi.
+ *
+ * Return: zero on success or else a negative error code
+ */
 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len)
 {
 	struct spi_transfer t = {
Signature · 1 line
2.33.0

Is this file being imported into the kernel doc tools? If so, great, if not, this isn't going to help out all that much, right?

thanks,

greg k-h

#2 lore raw
Quoted 37 lines · Greg KH
Quoted 1 line · Zachary Mayhew

Subject: [PATCH] staging: fbtft: add docs for fbtft_write_spi()

Odd, this shouldn't be in the body of the email :(

Quoted 32 lines

This patch adds documentation for fbtft_write_spi() to make its calling context clear and explain what it does.

---
 drivers/staging/fbtft/fbtft-io.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/staging/fbtft/fbtft-io.c +13 -0
index de1904a443c2..985d7cf8c774 100644
@@ -5,6 +5,19 @@
 #include <linux/spi/spi.h>
 #include "fbtft.h"
 
+/**
+ * fbtft_write_spi() - write data to current spi
+ * @par: Driver data including driver &struct spi_device
+ * @buf: Buffer to write to spi
+ * @len: Length of the buffer
+ * Context: can sleep
+ *
+ * Builds an &struct spi_transfer and &struct spi_message object based on the
+ * given @buf and @len.  These are then used in a call to spi_sync() which will
+ * write to the spi.
+ *
+ * Return: zero on success or else a negative error code
+ */
 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len)
 {
Quoted 8 lines
Quoted 5 lines
drivers/staging/fbtft/fbtft-io.c +0 -0
 	struct spi_transfer t = {
Signature · 1 line
2.33.0

Is this file being imported into the kernel doc tools? If so, great, if not, this isn't going to help out all that much, right?

It doesn't appear to be imported at this time, as such it may not be necessary.

Quoted 4 lines

thanks,

greg k-h

Thanks,
-Zachary Mayhew

maintainer
#3 lore raw
Quoted 47 lines · Zachary Mayhew
Quoted 37 lines · Greg KH
Quoted 1 line · Zachary Mayhew

Subject: [PATCH] staging: fbtft: add docs for fbtft_write_spi()

Odd, this shouldn't be in the body of the email :(

Quoted 32 lines

This patch adds documentation for fbtft_write_spi() to make its calling context clear and explain what it does.

---
 drivers/staging/fbtft/fbtft-io.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/staging/fbtft/fbtft-io.c +13 -0
index de1904a443c2..985d7cf8c774 100644
@@ -5,6 +5,19 @@
 #include <linux/spi/spi.h>
 #include "fbtft.h"
 
+/**
+ * fbtft_write_spi() - write data to current spi
+ * @par: Driver data including driver &struct spi_device
+ * @buf: Buffer to write to spi
+ * @len: Length of the buffer
+ * Context: can sleep
+ *
+ * Builds an &struct spi_transfer and &struct spi_message object based on the
+ * given @buf and @len.  These are then used in a call to spi_sync() which will
+ * write to the spi.
+ *
+ * Return: zero on success or else a negative error code
+ */
 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len)
 {
Quoted 8 lines
Quoted 5 lines
drivers/staging/fbtft/fbtft-io.c +0 -0
 	struct spi_transfer t = {
Signature · 1 line
2.33.0

Is this file being imported into the kernel doc tools? If so, great, if not, this isn't going to help out all that much, right?

Quoted 2 lines

It doesn't appear to be imported at this time, as such it may not be necessary.

So is this change needed?

thanks,

greg k-h

#4 lore raw
Quoted 48 lines · Greg KH
Quoted 47 lines · Zachary Mayhew
Quoted 45 lines · Greg KH
Quoted 1 line · Zachary Mayhew

Subject: [PATCH] staging: fbtft: add docs for fbtft_write_spi()

Odd, this shouldn't be in the body of the email :(

Quoted 37 lines

This patch adds documentation for fbtft_write_spi() to make its calling context clear and explain what it does.

---
 drivers/staging/fbtft/fbtft-io.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/staging/fbtft/fbtft-io.c +13 -0
index de1904a443c2..985d7cf8c774 100644
@@ -5,6 +5,19 @@
 #include <linux/spi/spi.h>
 #include "fbtft.h"
 
+/**
+ * fbtft_write_spi() - write data to current spi
+ * @par: Driver data including driver &struct spi_device
+ * @buf: Buffer to write to spi
+ * @len: Length of the buffer
+ * Context: can sleep
+ *
+ * Builds an &struct spi_transfer and &struct spi_message object based on the
+ * given @buf and @len.  These are then used in a call to spi_sync() which will
+ * write to the spi.
+ *
+ * Return: zero on success or else a negative error code
+ */
 int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len)
 {
 	struct spi_transfer t = {
Signature · 1 line
2.33.0

Is this file being imported into the kernel doc tools? If so, great, if not, this isn't going to help out all that much, right?

Quoted 4 lines
Quoted 2 lines

It doesn't appear to be imported at this time, as such it may not be necessary.

So is this change needed?

No it isn't. Sorry for the trouble :)

Quoted 4 lines

thanks,

greg k-h

Thanks
-Zachary Mayhew