Re: [PATCH] usb: musb: USB Test Mode control from sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 30-03-2011 16:18, Keshava Munegowda wrote:

This patch enables USB Test Mode control
from a new "testmode" file in sysfs:
    - write "-1" to this file to get some help
    - write another value to select a test mode
    - read this file to get current TM register value

This control can be used in USB Host or Device mode.
This will be very useful in case of host mode.

Signed-off-by: Gérald Baëza<gerald.baeza@xxxxxxxxxxxxxx>
Signed-off-by: Praveena Nadahally<praveen.nadahally@xxxxxxxxxxxxxx>
Acked-by: Linus Walleij<linus.walleij@xxxxxxxxxxxxxx>
[...]

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 630ae7f..291b185 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1812,12 +1812,58 @@ static DEVICE_ATTR(srp, 0644, NULL,
musb_srp_store);

   #endif /* CONFIG_USB_GADGET_MUSB_HDRC */

+static ssize_t
+musb_testmode_store(struct device *dev, struct device_attribute *attr,
+		const char *buf, size_t n)
+{
+	struct musb	*musb = dev_to_musb(dev);
				^ space here

   You mean before/after '='?

+	struct usb_hcd  *hcd = musb_to_hcd(musb);
				^ space here

+	unsigned long	val;
+	int		status;

Tabify all the declarations here!

     To me, they already look tabified. What do you mean?

It's OK if it is already tabified,
But above lines, I don’t I am seeing variables musb , hcd , val and status
are
Starting at different text columns.

   They are in the same column for me.

I was suggesting all these variables starting at same columns. Some thing like this:

+	struct musb		*musb = dev_to_musb(dev);
+	struct usb_hcd	*hcd = musb_to_hcd(musb);
+	unsigned long	val;
+	int			status;

   Your fragment contrarywise doesn't have them in the same column. :-)

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux