aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mipi_dsi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-06-26video: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10drivers: video: use module_platform_driver_probe()Fabio Porcedda1-11/+1
This patch converts the drivers to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> # atmel_lcdfb.c Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # amifb.c Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-01-03Drivers: video: remove __dev* attributes.Greg Kroah-Hartman1-2/+2
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21fbdev: sh_mipi_dsi: Remove last reference to LCDC platform dataLaurent Pinchart1-18/+0
The format check that references LCDC platform data isn't needed, as the mismatch between LCDC and MIPI-DSI platform it detects would result in a badly displayed image, which isn't worse than a complete failure to setup the transmitter. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-11-21fbdev: sh_mipi_dsi: Use the LCDC entity default modeLaurent Pinchart1-21/+22
Configure the MIPI-DSI transmitter using the LCDC entity default mode instead of accessing the mode through the LCDC platform data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-11-21fbdev: sh_mipi_dsi: Use the sh_mipi_dsi_info channel fieldLaurent Pinchart1-4/+4
Get the LCDC channel selector from the sh_mipi_dsi_info channel field directly instead of accessing the LCDC platform data through the lcd_chan field. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-06-20fbdev: sh_mipi_dsi: fix a section mismatchGuennadi Liakhovetski1-4/+3
sh_mipi_setup() is called from a .text function, therefore it cannot be __init. Additionally, sh_mipi_remove() can be moved to the .devexit.text section. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-21fbdev: sh_mipi_dsi: add extra phyctrl for sh_mipi_dsi_infoKuninori Morimoto1-1/+1
sh_mipi uses some clocks, but the method of setup depends on CPU. Current SuperH (like sh73a0) can control all of these clocks by CPG (Clock Pulse Generator). It means we can control it by clock framework only. But on sh7372, it needs CPG settings AND sh_mipi PHYCTRL::PLLDS, and only sh7372 has PHYCTRL::PLLDS. But on current sh_mipi driver, PHYCTRL::PLLDS of sh7372 was overwrote since the callback timing of clock setting was changed by c2658b70f06108361aa5024798f9c1bf47c73374 (fbdev: sh_mipi_dsi: fixup setup timing of sh_mipi_setup()). To solve this issue, this patch adds extra .phyctrl. This patch adds detail explanation for unclear mipi settings and fixup wrong PHYCTRL::PLLDS value for ap4evb (0xb -> 0x6). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-03-12fbdev: sh_mobile_lcdc: Rename (lcd|num)_cfg (lcd|num)_modesLaurent Pinchart1-19/+19
The struct sh_mobile_lcdc_chan_cfg platform data contains a list of video modes. Name the lcd_cfg and num_cfg fields to reflect that they describe video modes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Return display connection state in display_onLaurent Pinchart1-1/+1
Return true if the display is connected and false otherwise. Set the fb info state to FBINFO_STATE_SUSPENDED in the sh_mobile_lcdc driver when the display is not connected. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Remove fb_info parameter to display_on operationLaurent Pinchart1-2/+1
The parameter is unused, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mipi_dsi: Don't hook up into board_cfg display operationsLaurent Pinchart1-51/+5
The display_on/off operations are now accessed through the sh_mobile_lcdc_entity operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mipi_dsi: Implement sh_mobile_lcdc_entity interfaceLaurent Pinchart1-15/+51
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-11-21fbdev: sh_mipi_dsi: fixup setup timing DSICTRLKuninori Morimoto1-2/+3
DSICTRL should be called after all mipi settings Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: fixup setup timing of SYSCONFKuninori Morimoto1-12/+11
SYSCONF should be set after PHYCTRL Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: fixup setup timing of sh_mipi_setup()Kuninori Morimoto1-35/+44
sh_mipi_setup() should be called after setting of CPG Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: sh_mipi has pdata instead of devKuninori Morimoto1-4/+4
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add HSxxCLK supportKuninori Morimoto1-4/+10
SH MIPI manual explains the calculation method of HBP/HFP. it is based on HSbyteCLK settings. SH73a0 chip can use HS6divCLK/HS4divCLK for it. This patch has compatibility to SH7372 mipi Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add set_dot_clock() for each platformKuninori Morimoto1-34/+11
Dot clock of SH MIPI are depends on each platform board. This patch adds set_dot_clock() function for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add VMLEN1/VMLEN2 calculationKuninori Morimoto1-5/+40
VMLEN1/VMLEN2 needs blanking length which is calculated from video image size. The calculation methods are explained on [SH MIPI] - [Video Mode] - [Blanking Packet setting] But HFPLEN (= VMLEN2) is un-understandable. For example, if SH-MIPI input was RGB888 (3byte), output was RGB888 (3byte) and 3lane connection, the date goes straight. But if SH-MIPI input was RGB888 (3byte), output was RGB565 (2byte) and 4lane connection, it needs delay in HFPLEN. Then (input cycle - output cycle) * lane is necessary the delay Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add sync_pulses/sync_events/burst modeKuninori Morimoto1-1/+8
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add lane control supportKuninori Morimoto1-1/+9
SH MIPI DSI can use 0-4 lane Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add SH_MIPI_DSI_BL2E flagKuninori Morimoto1-0/+2
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: add SH_MIPI_DSI_HFPBM flagKuninori Morimoto1-0/+2
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: tidyup VMCTR2 parameter expressionKuninori Morimoto1-2/+2
VMCTR2 parameter will be supported more in the future. 1 << xx style is easy to understand. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: typo fix of SH_MIPI_DSI_HBPBMKuninori Morimoto1-1/+1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21fbdev: sh_mipi_dsi: tidyup dsip_clkKuninori Morimoto1-3/+1
dsipck clock is controled by CLKDEV_ICK_ID() in clock-shxxx. dsi0p_clk/dsi1p_clk naming is not needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-10-31video: Add module.h to drivers/video files who really use it.Paul Gortmaker1-0/+1
They were getting this implicitly by an include of module.h from device.h -- but we are going to clean that up and break that include chain, so include module.h explicitly now. [ with contributions from Axel Lin <axel.lin@gmail.com> ] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-01-05fbdev: sh_mipi_dsi: use platform provided register layout and valuesGuennadi Liakhovetski1-5/+11
Different sh-mobile SoCs have variations in their MIPI DSI register layouts, besides, different LCD panels require different configuration parameters. This patch switches the driver to use platform-provided MIPI DSI parameters. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-05fbdev: sh-mobile: implement MIPI DSI runtime PM supportGuennadi Liakhovetski1-3/+17
On SH-Mobile platforms using runtime PM with the MIPI DSI driver switches the DSI Tx link clock on PM events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19fbdev: sh_mipi_dsi: Allow LCDC board callbacksMagnus Damm1-0/+14
Update the MIPI-DSI driver to make use of the LCD panel callbacks in the LCDC platform data. Without this patch MIPI panels cannot use board specific LCDC callbacks to control power and/or back light. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19fbdev: sh_mipi_dsi: Require two I/O resources V2Magnus Damm1-16/+39
This is V2 of the MIPI-DSI two resources patch. The second I/O resource specifies the base address for the link hardware block. The base address for the link hardware block seems to vary with SoC type. Using two I/O resources to describe the MIPI-DSI hardware allows us to support both newer and older SoCs. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19fbdev: sh_mipi_dsi: Make use of register namesMagnus Damm1-23/+39
Keep MIPI-DSI registers in one place instead of using magic values together with comments. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14fbdev: sh_mobile_lcdcfb: Support multiple video modes in platform dataGuennadi Liakhovetski1-14/+18
This is a preparation for HDMI hotplug support. This patch just moves all platform defined video modes for the sh_mobile_lcdcfb driver to separate arrays and switches all users to use element 0 of that array, so, this patch doesn't introduce any functional changes and as such should not cause any regressions. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-04sh: add a parameter to LCDC driver's .display_on() callbackGuennadi Liakhovetski1-1/+1
HDMI support for the sh_mobile_lcdc framebuffer driver will require a 'struct fb_info *' pointer for its .display_on() callback. While at it fix kfr2r09 framebuffer modular build. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-24sh-mobile: add support for displays, connected over the MIPI busGuennadi Liakhovetski1-0/+505
Some SH-mobile SoCs have a MIPI DSI controller, that can be used to connect MIPI displays to LCDC. This patch adds a platform driver for SH-mobile MIPI DSI unit. It uses existing hooks in the sh_mobile_lcdcfb.c driver for display activation and deactivation. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>