summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/g_ffs.c
AgeCommit message (Collapse)Author
2011-07-01usb: gadget: add max_speed to usb_composite_driverTatyana Brokhman
This field is used by the Gadget drivers to specify the maximum speed they support, meaning: the maximum speed they can provide descriptors for. The driver speed will be set in consideration of this value. [ balbi@ti.com : dropped the ifdeffery ] Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-17usb: gadget: g_fs: Fix compilation warningMichal Nazarewicz
This commit fixes warning in f_fs.c introduced by "usb: gadget: f_fs: remove custom printk() wrappers": In file included from drivers/usb/gadget/g_ffs.c:64: drivers/usb/gadget/f_fs.c:30:1: warning: "pr_fmt" redefined Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16usb: gadget: FunctionFS: fix typos and coding styleMichal Nazarewicz
This commit changes FunctionFS as to make it more compliant with coding style as well as fixes several typos. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22usb gadget: don't save bind callback in struct usb_configurationUwe Kleine-König
The bind function is most of the time only called at init time so there is no need to save a pointer to it in the configuration structure. This fixes many section mismatches reported by modpost. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [m.nazarewicz@samsung.com: updated for -next] Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22usb gadget: don't save bind callback in struct usb_composite_driverMichal Nazarewicz
The bind function is most of the time only called at init time so there is no need to save a pointer to it in the composite driver structure. This fixes many section mismatches reported by modpost. Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22USB: gadget: functionfs: code cleanupMichal Nazarewicz
This patch removes some of the string registration from the FunctionFS Gadget as composite layer can handle the iManufacturer and iProduct for us. It also removes some of the module parameters which were redundant as well as changes the name of others to better much the module parameter of the composite layer. Other then that, it also fixes formatting of multiline comments to match the coding style. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22USB: gadget: g_ffs: fixed vendor and product IDMichal Nazarewicz
This patch fixes the vendor and product ID the gadget uses by replacing the temporary IDs that were used during development (which should never get into mainline) with proper IDs. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-10USB: gadget: g_fs: code cleanupMichal Nazarewicz
This commit cleans the g_fs gadget hopefully making it more readable. This is achieved by usage of the usb_string_ids_tab() function for batch string IDs registration as well as generalising configuration so that a single routine is used to add each configuration and bind interfaces. As an effect, the code is shorter and has fewer #ifdefs. Moreover, in some circumstances previous code #defined CONFIG_USB_FUNCTIONFS_GENERIC macro to prevent a situation where gadget with no configurations is built. This code removes the #define form source code and achieves the same effect using select in Kconfig. This patch also changes wording and names of the Kconfig options. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-10USB: gadget: f_fs: functionfs_add() renamed to functionfs_bind_config()Michal Nazarewicz
FunctionFS had a bit unique name for function used to add it to USB configuration. Renamed as to match naming convention of other functions. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: gadget: g_fs: possible invalid pointer reference bug fixedMichal Nazarewicz
During __gfs_do_config() some invalid pointers may be left in usb_configuration::interfaces array from previous calls to the __gfs_do_config() for the same configuration. This will always happen if an user space function which has a fewer then the last user space function registers itself. Composite's set_config() function that a pointer after the last interface in usb_configuration::interface is NULL unless the array is full. This patch makes the __gfs_do_config() make sure that if the usb_configuration::interface is not full then a pointer after the last interface is NULL. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: g_ffs: the FunctionFS gadget driverMichal Nazarewicz
The Function Filesystem (FunctioFS) lets one create USB composite functions in user space in the same way as GadgetFS lets one create USB gadgets in user space. This allows creation of composite gadgets such that some of the functions are implemented in kernel space (for instance Ethernet, serial or mass storage) and other are implemented in user space. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>