On Thu, Jul 29, 2021 at 5:47 AM Viresh Kumar viresh.kumar@linaro.org wrote:
On 28-07-21, 14:56, Linus Walleij wrote:
overall this looks good, with the minor nits pointed out: Reviewed-by: Linus Walleij linus.walleij@linaro.org
Thanks.
On Wed, Jul 28, 2021 at 1:11 PM Viresh Kumar viresh.kumar@linaro.org wrote:
+\subsubsection{requestq Operation: Get Direction}\label{sec:Device Types / GPIO Device / requestq Operation / Get Direction}
+The driver sends this message to request the device to return a line's +configured direction.
+\begin{tabularx}{\textwidth}{ |l||X|X|X| } +\hline +\textbf{Request} & \field{type} & \field{gpio} & \field{value} \ +\hline +& \field{VIRTIO_GPIO_MSG_GET_DIRECTION} & line number & 0 \ +\hline +\end{tabularx}
+\begin{tabularx}{\textwidth}{ |l||X|X|X| } +\hline +\textbf{Response} & \field{status} & \field{value[N]} & \field{Where N is} \ +\hline
- & \field{VIRTIO_GPIO_STATUS_*} & \field{VIRTIO_GPIO_DIRECTION_*} & 1 \
+\hline +\end{tabularx}
Is it clearly defined which value of VIRTIO_GPIO_DIRECTION_[IN|OUT] mean "input" and which value means "output"? Else add some text clarifying this.
+/* GPIO Direction types */ +#define VIRTIO_GPIO_DIRECTION_NONE 0x00 +#define VIRTIO_GPIO_DIRECTION_OUT 0x01 +#define VIRTIO_GPIO_DIRECTION_IN 0x02
Not sure if you missed this.
Were you looking for this or some text saying "VIRTIO_GPIO_DIRECTION_IN means direction-input", which looked self explanatory to me at least, though I can surely add it anyway.
I just mean that the #define for the directions is elsewhere so maybe the actual numeric value should be mentioned here as well.
Nevermind, it's such a small nit.
Yours, Linus Walleij