Andrzej Pietrasiewicz [Wed, 3 Jul 2013 12:40:41 +0000 (14:40 +0200)]
usb/gadget: f_mass_storage: convert to new function interface with backward compatibility
Converting mass storage to the new function interface requires converting
the USB mass storage's function code and its users.
This patch converts the f_mass_storage.c to the new function interface.
The file is now compiled into a separate usb_f_mass_storage.ko module.
The old function interface is provided by means of a preprocessor conditional
directives. After all users are converted, the old interface can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Wed, 3 Jul 2013 12:39:20 +0000 (14:39 +0200)]
usb/gadget: f_mass_storage: use fsg_common_run_thread in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Wed, 3 Jul 2013 12:38:53 +0000 (14:38 +0200)]
usb/gadget: f_mass_storage: use fsg_common_set_inquiry_string in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Fri, 26 Jul 2013 11:56:33 +0000 (13:56 +0200)]
usb/gadget: f_mass_storage: use fsg_common_create_luns in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Fri, 21 Jun 2013 09:30:51 +0000 (11:30 +0200)]
usb/gadget: f_mass_storage: use fsg_common_set_cdev in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Fri, 21 Jun 2013 09:29:58 +0000 (11:29 +0200)]
usb/gadget: f_mass_storage: use fsg_common_set_ops/_private_data in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Thu, 18 Jul 2013 12:08:17 +0000 (14:08 +0200)]
usb/gadget: f_mass_storage: use fsg_common_set_nluns in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Thu, 18 Jul 2013 12:02:59 +0000 (14:02 +0200)]
usb/gadget: f_mass_storage: use fsg_common_set_num_buffers in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Thu, 18 Jul 2013 12:02:28 +0000 (14:02 +0200)]
usb/gadget: f_mass_storage: use fsg_common_setup in fsg_common_init
fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Mon, 29 Jul 2013 12:50:17 +0000 (14:50 +0200)]
usb/gadget: f_mass_storage: split fsg_common initialization into a number of functions
When configfs is in place, the things related to intialization
of struct fsg_common will be split over a number of places.
This patch adds several functions which together cover the former
intialization routine fsg_common_init.
When configfs is in place, the luns will not be represented in sysfs,
so there will be no struct device associated with a lun.
To prepare for this some debug macros need to be adjusted. Two new
fields are added to struct fsg_lun: name and name_pfx.
The "name" is for storing a string which is presented to the user
instead of the dev_name. The "name_pfx", if non-NULL, is prepended
to the "name" at printing time.
The name_pfx is for a future lun.0, which will be a default group in
mass_storage.<name>. By design at USB function configfs group's creation
time its name is not known (but instead set a bit later in
drivers/usb/gadget/configfs.c:function_make) and it is this name that
serves the purpose of the said name prefix. So instead of copying
a yet-unknown string a pointer to it is stored in struct fsg_lun.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Tue, 4 Jun 2013 08:58:57 +0000 (10:58 +0200)]
usb/gadget: f_mass_storage: use usb_gstrings_attach
Prepare for handling with configfs.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Fri, 26 Jul 2013 10:20:27 +0000 (12:20 +0200)]
usb/gadget: f_mass_storage: add a level of indirection for luns storage
This is needed to prepare for configfs integration.
So far the luns have been allocated during gadget's initialization, based
on the nluns module parameter's value; the exact number is known when the
gadget is initialized and that number of luns is allocated in one go; they
all will be used.
When configfs is in place, the luns will be created one-by-one by the user.
Once the user is satisfied with the number of luns, they activate the
gadget. The number of luns must be <= FSG_MAX_LUN (currently 8), but other
than that it is not known up front and the user need not use contiguous
numbering (apart from the default lun #0). On the other hand, the function
code uses lun numbers to identify them and the number needs to be used
as an index into an array.
Given the above, an array needs to be allocated, but it might happen that
7 out of its 8 elements will not be used. On my machine
sizeof(struct fsg_lun) == 462, so > 3k of memory is allocated but not used
in the worst case.
By adding another level of indirection (allocating an array of pointers
to struct fsg_lun and then allocating individual luns instead of an array
of struct fsg_luns) at most 7 pointers are wasted, which is much less.
This patch also changes some for/while loops to cope with the fact
that in the luns array some entries are potentially empty.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Thu, 6 Jun 2013 11:06:24 +0000 (13:06 +0200)]
usb/gadget: f_mass_storage: factor out a header file
In order to prepare for the new function interface the f_mass_storage.c
needs to be compiled as a module, and so a header file will be required.
This patch factors out some code to a new f_mass_storage.h.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Wed, 3 Jul 2013 12:59:48 +0000 (14:59 +0200)]
usb/gadget: create a utility module for mass_storage
Converting to configfs requires making the f_mass_storage.c a module.
But first we need to get rid of "#include "storage_common.c".
This patch makes storage_common.c a separately compiled file, which is
built as a utility module named u_ms.ko. After all mass storage users are
converted to the new function interface this module can be eliminated
by merging it with the mass storage function's module.
USB descriptors are exported so that they can be accessed from
f_mass_storage.
FSG_VENDOR_ID and FSG_PRODUCT_ID are moved to their only user.
Handling of CONFIG_USB_GADGET_DEBUG_FILES is moved to f_mass_storage.c.
The fsg_num_buffers static is moved to FSG_MODULE_PARAMETER users, so
instead of using a global variable the f_mass_storage introduces
fsg_num_buffers member in fsg_common (and fsg_config).
fsg_strings and fsg_stringtab are moved to f_mass_storage.c.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Fri, 21 Jun 2013 08:25:27 +0000 (10:25 +0200)]
usb/gadget: configfs: add a method to unregister the gadget
Add a method to unregister the gadget using its config_item.
There can be functions (e.g. mass storage), which in some circumstances
need the gadget stopped. Add a method of stopping the gadget.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Wed, 7 Aug 2013 11:58:20 +0000 (13:58 +0200)]
usb/gadget: configfs: keep a function if it is not successfully added
If usb_add_function() fails then the currently processed function
is already not in the list in struct config_usb_cfg, and neither is it
in the list in struct usb_configuration. At the err_purge_funcs label the
purge_config_funcs() is called, which iterates over all configurations,
and in each configuration it iterates over all _successfully_ added
functions, and moves them back from the list in struct usb_configuration
to the list in struct config_usb_cfg. BUT the function which has just
failed adding and caused the unwind process is not taken care of and
is effectively lost.
This patch modifies the configfs_composite_bind() function so that if
the usb_add_function() fails, then the currently processed function
is returned to the list in struct config_usb_cfg.
It would be tempting to delay the list_del() in question after
usb_add_function() invocation, but a struct list_head (&f->list) cannot be
stored in more than one list at the same time, so the list_del() must
be called before usb_add_function(). Hence, the solution is to list_add()
after usb_add_function() in case of error.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Thu, 1 Aug 2013 14:04:34 +0000 (16:04 +0200)]
usb/gadget: cdc2: fix conversion to new interface of f_ecm
This fixes commit
a38a275030086d95306555e544fc7c0e65ccd00e
(usb: gadget: cdc2: convert to new interface of f_ecm)
The invocation of usb_get_function_instance() is in cdc_bind()
and should not be repeated in cdc_do_config().
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Andrzej Pietrasiewicz [Fri, 26 Jul 2013 12:37:14 +0000 (14:37 +0200)]
usb: gadget: f_phonet: remove unused preprocessor conditional
The compatibility layer which the USBF_PHONET_INCLUDED was a part of
is no longer present - the USBF_PHONET_INCLUDED is not #defined by anyone
anymore, so the ifndef is always true. Removing it.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Fri, 26 Jul 2013 12:37:13 +0000 (14:37 +0200)]
usb: gadget: multi: fix error return code in cdc_do_config()
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Introduced by commit 59835a (usb: gadget: multi: use
function framework for ACM.)
Make rndis_do_config() consistent with cdc_do_config() in the way it
handles returning the PTR_ERR(f_acm_*).
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 25 Jul 2013 07:13:18 +0000 (09:13 +0200)]
usb: gadget: free opts struct on error recovery
Fix memory leaks introduced in commits:
40d133d7f542616cf9538508a372306e626a16e9
usb: gadget: f_ncm: convert to new function interface with backward compatibility
fee562a6450b7806f1fbbe1469a67b5395b5c10a
usb: gadget: f_ecm: convert to new function interface with backward compatibility
fcbdf12ebef73a6069e2a1aada1e546fb578a4aa
usb: gadget: f_phonet: convert to new function interface with backward compatibility
b29002a157940752dfed2c488b2011f63f007d71
usb: gadget: f_eem: convert to new function interface with backward compatibility
8cedba7c73af1369599b1111639cfeb66fe13aaa
usb: gadget: f_subset: convert to new function interface with backward compatibility
f466c6353819326873fa48a02c6f2d7c903240d6
usb: gadget: f_rndis: convert to new function interface with backward compatibility
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Wed, 24 Jul 2013 10:47:46 +0000 (12:47 +0200)]
usb: gadget: ether: put_usb_function on unbind
Fix bugs introduced in
9c62ce83e4258bacc459faf57bf2ed83cce6be08
usb: gadget: ether: convert to new interface of f_ecm
94b5573e97729f0e1496d23b69cbe2c6b24ec0c3
usb: gadget: ether: convert to new interface of f_eem
8af5232d6f48896b151898ccb2e9e155481bb785
usb: gadget: ether: convert to new interface of f_subset
9bd4a10e1bf881af0b0a7c117c7092b558447047
usb: gadget: ether: convert to new interface of f_rndis
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 9 Jul 2013 06:14:39 +0000 (08:14 +0200)]
usb: gadget: Kconfig: Fix configfs-based RNDIS function build
USB_CONFIGFS_RNDIS depends on USB_U_RNDIS. Select it.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Wei Yongjun [Tue, 18 Jun 2013 03:40:55 +0000 (11:40 +0800)]
usb: gadget: f_subset: fix missing unlock on error in geth_alloc()
Add the missing unlock before return from function geth_alloc()
in the error handling case.
Introduced by commit
02832e56f88a981474ee4c7c141f46fc1b4454f4.
(usb: gadget: f_subset: add configfs support)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Jun 2013 03:43:29 +0000 (11:43 +0800)]
usb: gadget: f_ncm: fix missing unlock on error in ncm_alloc()
Add the missing unlock before return from function ncm_alloc()
in the error handling case.
Introduced by commit
e730660378be92b83288b59b824ccdace5cd2652.
(usb: gadget: f_ncm: add configfs support)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 18 Jun 2013 04:21:21 +0000 (12:21 +0800)]
usb: gadget: f_ecm: fix missing unlock on error in ecm_alloc()
Add the missing unlock before return from function ecm_alloc()
in the error handling case.
Introduced by commit
da92801c647cdebfd45001fd6aaecb8f0be7f56b.
(usb: gadget: f_ecm: add configfs support)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrzej Pietrasiewicz [Thu, 13 Jun 2013 08:37:24 +0000 (10:37 +0200)]
usb/gadget: Kconfig: fix separate building of configfs-enabled functions
USB_CONFGFS_ZZZZ should appear under a tristate option in order to allow
selecting more than one function without building the legacy gadgets.
Now there are two problems:
1) they can't be selected at all, because they depend on USB_CONFIGFS,
and the patch which adds USB_CONFIGFS has not been merged.
2) they don't select USB_LIBCOMPOSITE (which they need but which is
selected by USB_CONFIGFS)
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrzej Pietrasiewicz [Tue, 4 Jun 2013 13:27:54 +0000 (15:27 +0200)]
usb: gadget: f_mass_storage: fix default product name
If cfg->product name is not set, a default name is chosen depending
on the common->luns->cdrom flag. If the flag is set the name should
be "File-CD Gadget", and if the flag is not set the name should be
"File-Stor Gadget".
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:16:01 +0000 (09:16 +0200)]
usb: gadget: f_rndis: add configfs support
f_rndis learns about configfs so we can, eventually,
remove in-kernel gadget drivers.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:16:00 +0000 (09:16 +0200)]
usb: gadget: f_rndis: use usb_gstrings_attach
use new usb_gstrings_attach interface
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:59 +0000 (09:15 +0200)]
usb: gadget: rndis: init & exit rndis at module load/unload
This is required in preparation for using usb_gstrings_attach.
The rndis initialization so far has been performed on the first
occurence of rndis_bind(), but the condition to check it (first
or not first) was "borrowed" from strings handling.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:58 +0000 (09:15 +0200)]
usb: gadget: ether: convert to new interface of f_rndis
use new interface so old one can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:57 +0000 (09:15 +0200)]
usb: gadget: f_rndis: convert to new function interface with backward compatibility
Converting rndis to the new function interface requires converting
the USB rndis' function code and its users.
This patch converts the f_rndis.c to the new function interface.
The file is now compiled into a separate usb_f_rndis.ko module.
The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:56 +0000 (09:15 +0200)]
usb: gadget: f_subset: add configfs support
f_subset learns about configfs so we can, eventually,
remove in-kernel gadget drivers.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:55 +0000 (09:15 +0200)]
usb: gadget: f_subset: use usb_gstrings_attach
use the new usb_gstrings_attach interface.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:54 +0000 (09:15 +0200)]
usb: gadget: ether: convert to new interface of f_subset
teach ethernet code about the new interface of f_subset so
the old one can eventually be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:53 +0000 (09:15 +0200)]
usb: gadget: f_subset: convert to new function interface with backward compatibility
Converting ecm subset to the new function interface requires converting
the USB subset's function code and its users.
This patch converts the f_subset.c to the new function interface.
The file is now compiled into a separate usb_f_subset.ko module.
The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:52 +0000 (09:15 +0200)]
usb: gadget: multi: Remove unused include
cleanup only, no functional changes.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:51 +0000 (09:15 +0200)]
usb: gadget: f_eem: add configfs support
f_eem learns about our configfs interface so we
can remove in-kernel gadget drivers in future.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:50 +0000 (09:15 +0200)]
usb: gadget: f_eem: use usb_gstrings_attach
use the new usb_gstrings_attach interface
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:49 +0000 (09:15 +0200)]
usb: gadget: f_eem: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:48 +0000 (09:15 +0200)]
usb: gadget: ether: convert to new interface of f_eem
use new interface so old one can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:47 +0000 (09:15 +0200)]
usb: gadget: f_eem: convert to new function interface with backward compatibility
Converting eem to the new function interface requires converting
the USB eem's function code and its users.
This patch converts the f_eem.c to the new function interface.
The file is now compiled into a separate usb_f_eem.ko module.
The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:46 +0000 (09:15 +0200)]
usb: gadget: ether: convert to new interface of f_ecm
moving to new interface so we can remove the older one.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Tue, 28 May 2013 07:15:45 +0000 (09:15 +0200)]
usb: gadget: u_ether: allow getting binary-form host address
helper function to copy MAC address to proper place.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:15 +0000 (10:51 +0200)]
usb: gadget: f_phonet: add configfs support
f_phonet learns about configfs so we can remove
in-kernel gadget drivers.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:14 +0000 (10:51 +0200)]
usb: gadget: nokia: convert to new interface of f_ecm
this will let us deprecate (and remove) the old interface.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:13 +0000 (10:51 +0200)]
usb: gadget: f_phonet: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:12 +0000 (10:51 +0200)]
usb: gadget: nokia: convert to new interface of f_phonet
use the new interface which will allow us to deprecate the
legacy way of binding functions.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:11 +0000 (10:51 +0200)]
usb: gadget: f_phonet: convert to new function interface with backward compatibility
Converting f_phonet to the new function interface requires converting
the f_phonet's function code and its users.
This patch converts the f_phonet.c to the new function interface.
The file is now compiled into a separate usb_f_phonet.ko module.
The old function interface is provided by means of preprocessor
conditional directives. After all users are converted, the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:10 +0000 (10:51 +0200)]
usb: gadget: phonet: move global dev variable to its user
cleanup patch only in preparation for configfs.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:09 +0000 (10:51 +0200)]
usb: gadget: f_obex: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:08 +0000 (10:51 +0200)]
usb: gadget: nokia: convert to new interface of f_obex
preparation to use configfs-based approach on g_nokia.ko
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:51:07 +0000 (10:51 +0200)]
usb: gadget: f_obex: use usb_gstrings_attach
use the new usb_gstrings_attach interface
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:32:06 +0000 (10:32 +0200)]
usb: gadget: f_ecm: add configfs support
f_ecm learns about our new configfs-based binding.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:32:05 +0000 (10:32 +0200)]
usb: gadget: f_ecm: use usb_gstrings_attach
use the new usb_gstrings_attach interface.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:32:04 +0000 (10:32 +0200)]
usb: gadget: cdc2: convert to new interface of f_ecm
f_ecm has been converted to new configfs infrastructure,
fixing cdc2 gadget driver.
[ balbi@ti.com : fixed a bunch of errors when adding ECM function ]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:32:03 +0000 (10:32 +0200)]
usb: gadget: f_ecm: convert to new function interface with backward compatibility
Converting ecm to the new function interface requires converting
the USB ecm's function code and its users.
This patch converts the f_ecm.c to the new function interface.
The file is now compiled into a separate usb_f_ecm.ko module.
The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 08:32:02 +0000 (10:32 +0200)]
usb: gadget: add helpers for configfs support for USB Ethernet
All USB Ethernet functions will have very similar attributes in configfs.
This patch provides helper definitions to ease writing the functions and
reduce source code duplication.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:10 +0000 (09:22 +0200)]
usb: gadget: f_ncm: add configfs support
Add configfs support to the NCM function driver so
that we can, eventually, get rid of kernel-based
gadget drivers.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:09 +0000 (09:22 +0200)]
usb: gadget: f_ncm: use usb_gstrings_attach
Trivial patch making use of the new usb_gstrings_attach
interface.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:08 +0000 (09:22 +0200)]
usb: gadget: f_ncm: remove compatibility layer
There are no old function interface users left, so the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:07 +0000 (09:22 +0200)]
usb: gadget: ncm: convert to new function interface
Utilize our new configfs-based interface.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:06 +0000 (09:22 +0200)]
usb: gadget: f_ncm: convert to new function interface with backward compatibility
Converting ncm to the new function interface requires converting
the USB ncm's function code and its users.
This patch converts the f_ncm.c to the new function interface.
The file is now compiled into a separate usb_f_ncm.ko module.
The old function interface is provided by means of a preprocessor
conditional directives. After all users are converted, the old interface
can be removed.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:05 +0000 (09:22 +0200)]
usb: gadget: u_ether: construct with default values and add setters/getters
Add an interface to create a struct netdev_dev filled with default values, an
interface which makes it an interface to fill the struct with useful values and
an interface to read the values set.
The patch also adds an interface to register the net device associated with an
ethernet-over-usb link.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Fri, 24 May 2013 08:23:02 +0000 (10:23 +0200)]
usb: gadget: rndis: convert into module
In order to convert to configfs the usb functions need to be converted
to a new interface and compiled as modules. This patch creates an rndis
module which will be used by the new functions. After all users of
f_rndis are converted to the new interface, this module can be
merged with f_rndis module.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz [Thu, 23 May 2013 07:22:03 +0000 (09:22 +0200)]
usb: gadget: u_ether: convert into module
u_ether.c has been #include'd by all gadgets which implement
USB Ethernet functions. In order to add configfs support,
the f_ecm.c, f_eem.c, f_ncm.c, f_subset.c, f_rndis.c need to be
converted into modules and must not be #include'd. Consequently,
the u_ether.c needs to be a module too, in a manner similar
to u_serial.c. The resulting module should not take any parameters,
so they are pushed to the current users of it, that is ether.c,
g_ffs.c, multi.c, ncm.c, nokia.c.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Chanho Park [Mon, 2 Sep 2013 06:37:11 +0000 (15:37 +0900)]
Revert "ARM: dts: exynos4x12: add usb sysreg node"
This reverts commit
4c3885e75920886c5a4f9dd206bc2774eb345ed0.
Chanho Park [Mon, 2 Sep 2013 05:53:27 +0000 (14:53 +0900)]
ARM: dts: exynos4x12: specify iommu node for rotator
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 12 Aug 2013 13:50:22 +0000 (22:50 +0900)]
ARM: dts: Add rotator node for exynos5250
This patch adds a rotator node for exynos5250. It has different align value of
image size compared with any other chips. So, we should define new compatible
for the exynos5250.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Chanho Park [Mon, 12 Aug 2013 13:49:53 +0000 (22:49 +0900)]
ARM: dts: Add rotator node for exynos4x12
This patch adds a rotator node for exynos4212 and 4412. These have different
limitation of image size compared with the exynos4210. So, we should define
new compatible to distinguish it from the exynos4210.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Chanho Park [Mon, 12 Aug 2013 13:49:16 +0000 (22:49 +0900)]
ARM: dts: Add rotator node for exynos4210
This patch adds a rotator node for exynos4210. The exynos4210 has different
limitation of image size compared with later chips.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Chanho Park [Mon, 12 Aug 2013 13:44:42 +0000 (22:44 +0900)]
drm/exynos: add device tree support for rotator
The exynos4 platform is only dt-based since 3.10, we should convert driver data
and ids to dt-based parsing methods. The rotator driver has a limit table to get
size limit of input picture. Each SoCs has slightly different limit value
compared with any others.
For example, exynos4210's max_size of RGB888 is 16k x 16k. But, others have
8k x 8k. Another example the exynos5250 should have multiple of 2 pixel size
for its X/Y axis. Thus, we should keep different tables for each of them.
This patch also includes desciptions of each nodes for the rotator and specifies
a example how to bind it.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Chanho Park [Mon, 2 Sep 2013 04:25:41 +0000 (13:25 +0900)]
Revert "drm/exynos: add device tree support for rotator"
This reverts commit
4306d0e1427f477853d555fc08f4ec5dc370f01f.
Conflicts:
drivers/gpu/drm/exynos/exynos_drm_rotator.c
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 2 Sep 2013 04:23:56 +0000 (13:23 +0900)]
Revert "ARM: dts: add a rotator node for exynos4"
This reverts commit
75a691b2420a63580d452561c55284f1720ed947.
Chanho Park [Mon, 2 Sep 2013 04:23:29 +0000 (13:23 +0900)]
Revert "drm/exynos: add dt-binding documentation for rotator"
This reverts commit
5e842af0339fda92b300bf95be9886aff776f80c.
Chanho Park [Fri, 30 Aug 2013 12:08:25 +0000 (21:08 +0900)]
ARM: dts: exynos4x12: add usb sysreg node
The exynos4x12 can control usb mode by sysreg register.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 30 Aug 2013 11:58:55 +0000 (20:58 +0900)]
usb: gadget: s3c-hsotg: specify device mode before initializing phy
The otg module can be used both host and device mode. According to the boot
sequence, device mode will be initialized first and host mode will be
initialized later. Thus, the phy always remained in the host mode.
To address this problem, we should clear the 'host' value before initializing
the phy driver.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 30 Aug 2013 11:56:11 +0000 (20:56 +0900)]
usb: ehci-s5p: specify host mode to phy driver
In otg mode, we can use it both host and device mode. Before initializing phy
driver, we should specify which mode will be used for it.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 30 Aug 2013 11:46:07 +0000 (20:46 +0900)]
usb: phy: samsung: do not check otg->host to clear it
This patch can clear otg->host variable to select a host and a device mode on
runtime. Before initializing the phy, it should specify which mode will be used.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Inki Dae [Fri, 30 Aug 2013 06:56:59 +0000 (15:56 +0900)]
dmabuf-sync: update it to patch v8
- Consider the write-and-then-read ordering.
The ordering issue means that a task don't take a lock to the dmabuf
so this task would be stalled even though this task requested a lock
to the dmabuf between other task unlocked and tries to lock the dmabuf
again. For this, it addes a wait event mechanism using only generic
APIs, wait_event_timeout and wake_up functions.
The below is how to handle the ordering issue using this mechanism:
1. Check if there is a sync object added prior to current task's one.
2. If exists, it unlocks the dmabuf so that other task can take a lock
to the dmabuf first.
3. Wait for the wake up event from other task: current task will be
waked up when other task unlocks the dmabuf.
4. Take a lock to the dmabuf again.
- Update Document
- Code cleanups.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Chanho Park [Thu, 29 Aug 2013 12:38:41 +0000 (21:38 +0900)]
ARM: dts: exynos4412-slp_pq: always turn on ESAFEOUT1
This patch is only WIP(work-in-progress) patch. Max77693's ESAFEOUT1 is used
for AP-USB VBUS. To enable USB for AP, it should be turned on always or when
a cable is connected. Extcon driver can detect the cable status, so ESAFEOUT1
can be brought up by the extcon. Until supporting it, we should turn ESAFEOUT1
on boot time.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Sylwester Nawrocki [Sun, 18 Aug 2013 19:14:27 +0000 (19:14 +0000)]
s5p-jpeg: Add initial device tree support for S5PV210/Exynos4210 SoCs
This patch enables the JPEG codec on S5PV210 and Exynos4210 SoCs. There are
some differences in newer versions of the JPEG codec IP on SoCs like Exynos4x12
and Exynos5 series and support for them will be added in subsequent patches.
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tomasz Figa [Mon, 26 Aug 2013 15:08:10 +0000 (17:08 +0200)]
ARM: dts: exynos4412-slp_pq: Enable WLAN chip
This patch adds required device tree nodes to enable support for BCM4334
WLAN chip present on SLP PQ based boards.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Mon, 26 Aug 2013 15:01:04 +0000 (17:01 +0200)]
ARM: dts: exynos4412-slp_pq: Allow using max77686 as clock provider
This patch adds #clock-cells property and label to the node of max77686
to enable using it as a clock provider.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Sat, 20 Apr 2013 23:56:00 +0000 (01:56 +0200)]
of: irq: Pass trigger type in IRQ resource flags
Some drivers might rely on availability of trigger flags in IRQ
resource, for example to configure the hardware for particular interrupt
type. However current code creating IRQ resources from data in device
tree does not configure trigger flags in resulting resources.
This patch tries to solve the problem, based on the fact that
irq_of_parse_and_map() configures the trigger based on DT interrupt
specifier and IRQD_TRIGGER_* flags are consistent with IORESOURCE_IRQ_*,
and we can get correct trigger flags by calling irqd_get_trigger_type()
after mapping the interrupt.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Tomasz Figa [Fri, 23 Aug 2013 17:22:21 +0000 (19:22 +0200)]
clk: max77686: Register OF clock provider
If max77686 chip is instantiated from device tree, it is desirable to
have an OF clock provider to allow device tree based look-up of clocks.
This patch adds OF clock provider registration to the clk-max77686
driver.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 17:09:41 +0000 (19:09 +0200)]
clk: max77686: Refactor driver data handling
As a prerequisite for further patch adding OF clock provider support to
the driver, this patch changes the driver to store an array of struct
clk * as driver data.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 17:03:47 +0000 (19:03 +0200)]
clk: max77686: Fix clean-up in error and remove paths
This patch fixes invalid kfree() and adds missing call to clk_unregister()
in error and remove paths in max77686_clk_probe(). While at it, error
handling is also cleaned up.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 16:59:40 +0000 (18:59 +0200)]
clk: max77686: Make max77686_clk_register() return struct clk *
As a preparation for further patches, this patch modifies the clock
registration helper function to return a pointer to the newly registered
clock. No functional change is done to the driver.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 16:56:31 +0000 (18:56 +0200)]
clk: max77686: Refactor successful exit of probe function
The function can simply return 0, without jumping to a separate label,
which does exactly the same. This patch does not introduce any
functional change, just a clean-up.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 16:41:27 +0000 (18:41 +0200)]
mfd: max77686: Enable register cache
This patch enables flat register cache for max77686 PMIC register to
speed up operations like getting regulator voltage or clock status.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 16:28:17 +0000 (18:28 +0200)]
clk: max77686: Provide .recalc_rate() operation
It is usually nice to know frequency of a clock, so this patch adds a
.recalc_rate() callback returning rates of provided clocks.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 23 Aug 2013 15:24:29 +0000 (17:24 +0200)]
clk: max77686: Correct callback used for checking clock status
Changing status of clock gates in max77686 requires i2c transfers, which
can sleep, so this is done in prepare and unprepare callbacks. Due to
this, checking whether whether the clock is ungated must be done
in is_prepared() callback as well, for consistency.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Thu, 23 May 2013 11:28:09 +0000 (13:28 +0200)]
brcmfmac: Add generic platform support
This patch adds basic support for generic platforms that do not require
special platform data.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Sylwester Nawrocki [Thu, 22 Aug 2013 15:50:41 +0000 (17:50 +0200)]
s5c73m3: Set default data plane lengths for interleaved data
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Sylwester Nawrocki [Thu, 22 Aug 2013 15:49:18 +0000 (17:49 +0200)]
exynos4-is: Fix compressed format setting in fimc-capture
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Sylwester Nawrocki [Wed, 21 Aug 2013 13:28:44 +0000 (15:28 +0200)]
ARM: dts: Add missing aliases for I2C bus controllers in exynos4412-m0.dts
When an I2C bus controller is added without a corresponding entry in
the aliases node the I2C core uses firs available number as the bus ID
which may be one of already reserved IDs for other controllers. E.g.
0...7 are reserved for hardware I2C bus controllers I2C0.I2C7.
Missing aliases were causing I2C0 bus adapter initialization to fail
due to bus ID 0 being assigned to one of the i2c-gpio controllers.
Fix this regression by adding corresponding node aliases.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Marek Szyprowski [Wed, 21 Aug 2013 11:24:50 +0000 (13:24 +0200)]
ARM: Exynos4: dts: disable CMA support for MFC (obsoleted by IOMMU support)
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Marek Szyprowski [Wed, 21 Aug 2013 11:24:22 +0000 (13:24 +0200)]
ARM: Exynos4: add clocks for SYSMMU controller and enable IOMMU support
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Marek Szyprowski [Wed, 7 Aug 2013 09:03:17 +0000 (11:03 +0200)]
iommu/exynos: add dummy driver for enabling runtime pm for mem port devices
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>