summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2014-11-18clk: exynos4: Add additional G2D clocksSachin Kamat1-2/+7
Add G2D clocks for Exynos4x12 SoC and sclk_fimg2d required by G2D IP. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-11-18video: display: panel-s6d6aa1: remove useless function.Donghwa Lee1-22/+0
There is no usage for s6d6aa1_read_id(). Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
2014-11-18DT: support l5f31188 panelHyungwon Hwang3-0/+680
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2014-11-18mmc: dw_mmc-exynos: supporte the packed commandJaehoon Chung1-0/+5
To increase the performance, use the packed command Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2014-11-18mmc: dw_mmc: add the specified capabilities2 of the controllerJaehoon Chung2-0/+5
Add the capabilities2 of controller to use *_CAP2_* Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2014-11-18mmc: Makefile: change the init sequence for indexing mmcblkXJaehoon Chung1-4/+4
To ensure mmcblk0 for eMMC, must call the dwmmc before calling sdhci. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2014-11-18extcon: max77693: Fix bug related to MAX77693 irq when set ADC debounce timeJonghwa Lee1-1/+9
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-11-18drm/exynos: add runtime pm interfaces to g2d driverInki Dae1-4/+31
This patch makes g2d power domain and clock to be controlled with runtime pm interfaces instead of controlling them respectively. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18clock: clk-exynos4: set the CLK_SET_RATE_PARENT for mmc4Jaehoon Chung1-1/+2
mmc4_clk set to CLK_SET_PARENT with DIV_F(). Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2014-11-18mmc: dw_mmc: Add the ability to set the ciu clock frequencyDoug Anderson1-4/+13
As of now we rely on code outside of the driver to set the ciu clock frequency. There's no reason to do that. Add support for setting up the clock in the driver during probe. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2014-11-18mmc: dw_mmc: Handle late vmmc regulators with EPROBE_DEFERDoug Anderson1-14/+20
It is possible to specify a regulator that should be turned on when dw_mmc is probed. At the moment dw_mmc will fail to use the regulator properly if the regulator probes after dw_mmc. Fix this problem by honoring EPROBE_DEFER. At the same time move the regulator code out of the slot init code. We only specify one regulator for the whole device and other parts of the code (like suspend/resume) assume that the regulator has only been enabled once. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2014-11-18mmc: dw_mmc: change the macro name from DTO to DRTOJaehoon Chung2-3/+3
At Interrupt status register, Bit9 is Data Read Timeout. But we used macro name as the DTO. It could be confused with the Data Transfer Over(DTO)-Bit[3]. It's clearly that is changed the DRTO instead of DTO. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2014-11-18mmc: dw_mmc: clear IDSTS register when initialize IDMACJoonyoung Shim1-0/+6
If pending interrupt for IDMAC exists when initialize IDMAC, it will call interrupt handler unnecessarily. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2014-11-18mmc: dw_mmc: fix error return code in dw_mci_probe()Wei Yongjun1-1/+3
Fix to return -ENOMEM in alloc workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2014-11-18drm/exynos: consider common clock framework to g2d driver.Inki Dae1-2/+2
This patch just changes clk_enable/disable to clk_prepare_enable/clk_disable_unprepare. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fix module build errorInki Dae3-4/+0
Exynos drm drivers don't need to export device tables because all devices of Exynos drm include in one SoC so they cannot be plugged in. P.S. we need to create MODULE_DEVICE_TABLE in case of enabling the linux-hotplug system to load the driver automatically when the device is plugged in. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18dmabuf-sync: add private backend callbacksInki Dae1-1/+7
This ops has just a free callback to release resource for each device driver. free callback will be called when device driver's sync object is freed. So device drivers should implement this callback so that their own contexts can be cleaned up regarding sync object. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18dmabuf-sync: remove unnecessary the use of mutex lock.Inki Dae1-6/+3
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18dmabuf-sync: fix sync lock to multiple readInki Dae1-30/+13
This patch fixes the issue that a sync object is unlocked when shared_cnt is bigger than 1 and sobj->access_type is write. the below number means shared_cnt and three sync objects share one buffer, r r r w when write locked 1 2 3 3 <- blocked when read unlocked 2 when read unlocked 1 when read unlocked 1 <- waked up Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18cpufreq: exynos: fix section mismatchSeung-Woo Kim1-2/+2
Non init data, exynos_cpufreq_driver references init data, exynos_cpufreq_probe and exynos_cpufreq_of_match, and this causes section mismatch. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-11-18max77693_charger: fix section mismatchSeung-Woo Kim1-1/+1
max77693_charger_of_match with __initconst flag is referenced from max77693_charger_driver which is non init data and this causes section mismatch. So flag __initconst is removed. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-11-18clk: samsung: fix section mismatch from audio subsystem clocksSeung-Woo Kim1-1/+1
The init function should have __init flag to match reference sections. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2014-11-18drm/exynos: add cache operation backend callbacksInki Dae1-0/+34
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: export a gem into dmabuf fd with O_RDWRInki Dae1-0/+2
user process needs read/write permissions when the user process tires buffer lock with a exported dmabuf fd through fcntl system call. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18dma-buf: add lock callback for fcntl system call.Inki Dae1-0/+33
This patch adds lock callback to dma buf file operations, and this callback will be called by fcntl system call. With this patch, fcntl system call can be used for buffer synchronization between CPU and CPU, and CPU and DMA in user mode. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18dmabuf-sync: add cache operation featureInki Dae1-0/+75
With this patch, all cache operations will be done in kernel side instead of user side. P.S. basically, not only user shouldn't need to request cache operation to kernel but also kernel should't need such things. However, we would have performance overhead by unnecessary cache operations if we conform with mainline style: cache sync just before memory ownership moves from CPU to DMA, and just after memory ownership moves from DMA to CPU. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18dmabuf-sync: add buffer synchronization frameworkInki Dae4-0/+686
This patch adds a buffer synchronization framework based on DMA BUF[1] and and based on ww-mutexes[2] for lock mechanism. The purpose of this framework is to provide not only buffer access control to CPU and DMA but also easy-to-use interfaces for device drivers and user application. This framework can be used for all dma devices using system memory as dma buffer, especially for most ARM based SoCs. Changelog v5: - Rmove a dependence on reservation_object: the reservation_object is used to hook up to ttm and dma-buf for easy sharing of reservations across devices. However, the dmabuf sync can be used for all dma devices; v4l2 and drm based drivers, so doesn't need the reservation_object anymore. With regared to this, it adds 'void *sync' to dma_buf structure. - All patches are rebased on mainline, Linux v3.10. Changelog v4: - Add user side interface for buffer synchronization mechanism and update descriptions related to the user side interface. Changelog v3: - remove cache operation relevant codes and update document file. Changelog v2: - use atomic_add_unless to avoid potential bug. - add a macro for checking valid access type. - code clean. The mechanism of this framework has the following steps, 1. Register dmabufs to a sync object - A task gets a new sync object and can add one or more dmabufs that the task wants to access. This registering should be performed when a device context or an event context such as a page flip event is created or before CPU accesses a shared buffer. dma_buf_sync_get(a sync object, a dmabuf); 2. Lock a sync object - A task tries to lock all dmabufs added in its own sync object. Basically, the lock mechanism uses ww-mutex[1] to avoid dead lock issue and for race condition between CPU and CPU, CPU and DMA, and DMA and DMA. Taking a lock means that others cannot access all locked dmabufs until the task that locked the corresponding dmabufs, unlocks all the locked dmabufs. This locking should be performed before DMA or CPU accesses these dmabufs. dma_buf_sync_lock(a sync object); 3. Unlock a sync object - The task unlocks all dmabufs added in its own sync object. The unlock means that the DMA or CPU accesses to the dmabufs have been completed so that others may access them. This unlocking should be performed after DMA or CPU has completed accesses to the dmabufs. dma_buf_sync_unlock(a sync object); 4. Unregister one or all dmabufs from a sync object - A task unregisters the given dmabufs from the sync object. This means that the task dosen't want to lock the dmabufs. The unregistering should be performed after DMA or CPU has completed accesses to the dmabufs or when dma_buf_sync_lock() is failed. dma_buf_sync_put(a sync object, a dmabuf); dma_buf_sync_put_all(a sync object); The described steps may be summarized as: get -> lock -> CPU or DMA access to a buffer/s -> unlock -> put This framework includes the following two features. 1. read (shared) and write (exclusive) locks - A task is required to declare the access type when the task tries to register a dmabuf; READ, WRITE, READ DMA, or WRITE DMA. The below is example codes, struct dmabuf_sync *sync; sync = dmabuf_sync_init(NULL, "test sync"); dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_R); ... And the below can be used as access types: DMA_BUF_ACCESS_R - CPU will access a buffer for read. DMA_BUF_ACCESS_W - CPU will access a buffer for read or write. DMA_BUF_ACCESS_DMA_R - DMA will access a buffer for read DMA_BUF_ACCESS_DMA_W - DMA will access a buffer for read or write. 2. Mandatory resource releasing - a task cannot hold a lock indefinitely. A task may never try to unlock a buffer after taking a lock to the buffer. In this case, a timer handler to the corresponding sync object is called in five (default) seconds and then the timed-out buffer is unlocked by work queue handler to avoid lockups and to enforce resources of the buffer. The below is how to use interfaces for device driver: 1. Allocate and Initialize a sync object: struct dmabuf_sync *sync; sync = dmabuf_sync_init(NULL, "test sync"); ... 2. Add a dmabuf to the sync object when setting up dma buffer relevant registers: dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ); ... 3. Lock all dmabufs of the sync object before DMA or CPU accesses the dmabufs: dmabuf_sync_lock(sync); ... 4. Now CPU or DMA can access all dmabufs locked in step 3. 5. Unlock all dmabufs added in a sync object after DMA or CPU access to these dmabufs is completed: dmabuf_sync_unlock(sync); And call the following functions to release all resources, dmabuf_sync_put_all(sync); dmabuf_sync_fini(sync); You can refer to actual example codes: "drm/exynos: add dmabuf sync support for g2d driver" and "drm/exynos: add dmabuf sync support for kms framework" from https://git.kernel.org/cgit/linux/kernel/git/daeinki/ drm-exynos.git/log/?h=dmabuf-sync And this framework includes fcntl system call[3] as interfaces exported to user. As you know, user sees a buffer object as a dma-buf file descriptor. So fcntl() call with the file descriptor means to lock some buffer region being managed by the dma-buf object. The below is how to use interfaces for user application: struct flock filelock; 1. Lock a dma buf: filelock.l_type = F_WRLCK or F_RDLCK; /* lock entire region to the dma buf. */ filelock.lwhence = SEEK_CUR; filelock.l_start = 0; filelock.l_len = 0; fcntl(dmabuf fd, F_SETLKW or F_SETLK, &filelock); ... CPU access to the dma buf 2. Unlock a dma buf: filelock.l_type = F_UNLCK; fcntl(dmabuf fd, F_SETLKW or F_SETLK, &filelock); close(dmabuf fd) call would also unlock the dma buf. And for more detail, please refer to [3] References: [1] http://lwn.net/Articles/470339/ [2] https://patchwork.kernel.org/patch/2625361/ [3] http://linux.die.net/man/2/fcntl Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18power: charger-manager: Fix a bug when it unregisters notifier block of extcon.Jonghwa Lee1-1/+3
This patch prevents NULL pointer error cauesed by unregistering unregistered exton notifier block. At the probing time of charger manager, it tries to remove extcon notifier block when it fails to initialize them. It has to be applied for only registered one. Otherwise, it'd make kernel panic. To make it work right, it checks extcon_specific_cable_nb's extcon_dev node. If extcon cable notifier block was registered successfully, it has proper extcon_dev pointer if not so it has NULL pointer. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18power: charger-manager: regulator_get() never returns NULL.Jonghwa Lee1-3/+2
This patch fixes return value checking of regulator_get() in charger-manager driver. The API, regulator_get(), returns ERR_PTR() when it fails to get regulator with given name, not NULL. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18charger_manager: Workaround for supporting platform data without DT parsing.Jonghwa Lee1-1/+114
All data will be move into DT later. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18tty: serial: samsung: Remove useless checks in suspend/resume callbacksTomasz Figa1-18/+13
Since uart_port struct exists through whole driver lifetime, there is no need to check if it is non-NULL in suspend/resume callbacks. Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-11-18clocksource: exynos_mct: Register sched_clockTomasz Figa1-0/+8
This patch adds sched_clock registration to Exynos MCT driver to improve scheduler precision by providing a high resolution clock source for scheduling purposes. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Conflicts: drivers/clocksource/exynos_mct.c
2014-11-18regulator: max77686: Fix suspend-mode settings of regulatorsTomasz Figa1-10/+89
LDO20, LDO21, LDO22, BUCK8 and BUCK9 regulators provide external pins for enable control in addition to I2C control, which is usually used to control regulator states in suspend. BUCK5-BUCK7 do not provide any suspend-mode control. This patch modifies the driver to account for these factors, making it program sleep mode states of regulators correctly. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Conflicts: drivers/regulator/max77686.c
2014-11-18regulator: max77686: Add set_suspend_enable callback for buck regulatorsTomasz Figa1-0/+18
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-11-18regulator: of: Parse regulator state in mem mode from DTTomasz Figa1-0/+20
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-11-18regulator: Handle suspend and resume of regulatorsTomasz Figa1-0/+28
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-11-18pinctrl: samsung: Parse pin groups before calling pinctrl_register()Tomasz Figa1-6/+4
Calling pinctrl_register() means that the driver is fully initialized and might accept pinmux/pinconf requests, so pin groups must be parsed before. This patch fixes this problem by moving device tree parsing before call to pinctrl_register(). Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-11-18clk: samsung: exynos4: Do not disable ISP bus clocksTomasz Figa1-4/+4
Some ISP bus clocks must be kept enabled when entering sleep mode, otherwise the system hangs. This patch adds CLK_IGNORE_UNUSED flags to those clocks to keep them ungated when FIMC IS driver is not present. Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-11-18modem_if: Add modem drivers to Kconfig and MakefileKamil Debski2-0/+2
Add modem_if to Kconfig and Makefile to enable compilation. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Change net device name choice mechanismKamil Debski1-15/+5
CONFIG_SLP is no longer used hence new method of net device names was implemented. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: ifdef wake_lock support in the modem driverKamil Debski5-0/+20
Wake_locks are not supported outside of Android so it is essential to make their use optional. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Move code from board-m0-modems.c to the xmm6262 driverKamil Debski2-10/+64
Moved code from the board file to the driver of the xmm6262 chip. Also handling of sim card detection has been commented out. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18usb: ehci-s5p: Add s5p_ehci_configurate, needed by modem_ifKamil Debski1-0/+27
s5p_ehci_configurate function configures the data transfer for HSIC modem. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Comment out enable_wake_irq in modem drivers (HSIC, xmm6262)Kamil Debski2-4/+5
Enabling the interrupt caused problem with the modem. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Move code from board-m0-modems.c to the modem driverKamil Debski1-2/+239
Move modem related code from the board file to the modem driver. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Modification of the modem driver to compile on the 3.8 kernelKamil Debski4-10/+12
The modem_if driver code was taken from 3.0 kernel and did not compile on 3.8. These changes are necessary to make the driver work. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Remove linux/cma.h useKamil Debski1-1/+0
Remove linux/cma.h from modem_modemctl_device_xmm6262.c It wasn't used anyway and was included for linux/rbtree.h only. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18modem_if: Add modem_if driver filesKamil Debski37-0/+21527
All files were taken from exynos3.4 kernel. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18usb: ehci-s5p: Add support for HSIC to the Exynos 4x12 SoC familyKamil Debski2-7/+53
Add support for HSIC to the Exynos 4x12 SoC family. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18usb: s3c-hsotg: Changing MAC interface to 8 bitPraveen Paneri2-3/+4
This patch changes UTMI+ PHY interface of udc core from 16bit to 8bit. Although the manual says that only 16 bit is supported. This solves the problem of EHCI and Device not working together. Signed-off-by: Praveen Paneri <p.paneri@samsung.com>