On Thu, 21 Oct 2010 22:18:28 +0800 Pratyush ANAND <pratyush.anand@xxxxxx> wrote: > > > +static ssize_t pcie_gadget_show_help(struct device *dev, > > > + struct device_attribute *attr, char *buf) > > > +{ > > > + char text[] = "\t\tlink read->ltssm status\n \ > > > + link write->arg1 = UP to enable ltsmm DOWN to disable\n \ > > > + int_type read->type of supported interrupt\n \ > > > + int_type write->arg1 = interrupt type to be configured and\n \ > > > + can be INTA, MSI or NO_INT\n \ > > > + (select MSI only when you have programmed no_of_msi)\n \ > > > + no_of_msi read->zero if MSI is not enabled by host\n \ > > > + and positive value is the number of MSI vector granted\n \ > > > + no_of_msi write->arg1 = number of MSI vector needed\n \ > > > + inta write->arg1 = 1 to assert INTA and 0 to de-assert\n \ > > > + send_msi write->arg1 = MSI vector to be send\n \ > > > + vendor_id read->programmed vendor id (hex)\n\ > > > + vendor_id write->arg1 = vendor id(hex) to be programmed\n \ > > > + device_id read->programmed device id(hex)\n \ > > > + device_id write->arg1 = device id(hex) to be programmed\n \ > > > + bar0_size read->size of bar0 in hex\n \ > > > + bar0_size write->arg1= size of bar0 in hex\n \ > > > + (default bar0 size is 1000 (hex) bytes)\n \ > > > + bar0_address read->address of bar0 mapped area in hex\n \ > > > + bar0_address write->arg1 = address of bar0 mapped area in > > hex\n\ > > > + (default mapping of bar0 is SYSRAM1(E0800000)\n \ > > > + (always program bar size before bar address)\n \ > > > + (kernel might modify bar size and address to align)\n \ > > > + (read back bar size and address after writing to check)\n \ > > > + bar0_rw_offset read->offset of bar0 for which bar0_data \n \ > > > + will return value\n \ > > > + bar0_rw_offset write->arg1 = offset of bar0 for which\n \ > > > + bar0_data will write value\n \ > > > + bar0_data read->data at bar0_rw_offset\n \ > > > + bar0_data write->arg1 = data to be written at\n \ > > > + bar0_rw_offset\n"; > > > + > > > + int size = (sizeof(text) < PAGE_SIZE) ? sizeof(text) : PAGE_SIZE; > > > + > > > + return snprintf(buf, size, "%s", text); > > > +} > > > > What the heck is this?? > > > > This was just to provide help for different sysfs nodes. What could be the other > Way to do it? Should it be better to remove help node from here provide all the help > In a separate document? Yes, documenting it externally would be more typical. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html