summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/tc358767'Lucas Stach2017-07-311-50/+179
|\
| * video: tc358767: accept any hsync and vsync polatiryAndrey Gusakov2017-07-061-6/+7
| | | | | | | | | | | | | | | | Do not fix modes. Instead set any sync polarity passed through VPL_PREPARE and fb_videomode. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: filter out modes with too high pixelclockAndrey Gusakov2017-07-061-0/+83
| | | | | | | | | | | | | | | | | | Minimum pixel clock period is 6.5 nS for DPI. Remove modes with lower pixel clock period. Also sort modes in decreasing order because currently first resolution in list is picked. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: optimize DPCD register writeAndrey Gusakov2017-07-061-11/+13
| | | | | | | | | | Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: optimize aux i2c bus checksAndrey Gusakov2017-07-061-11/+2
| | | | | | | | | | | | | | | | Move common check to tc_aux_i2c_xfer Remove duplicated check from tc_aux_i2c_write Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: support newer DPCD revisions and higher data ratesAndrey Gusakov2017-07-061-4/+16
| | | | | | | | | | | | | | | | | | Do not fail on newer DPCD revision. Assume it backwards compatible. Try to fall back to supported data rate in case display reports too high data rate. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: do not fail if sink supports more than 2 lanesAndrey Gusakov2017-07-061-5/+31
| | | | | | | | | | | | | | Display should support lower lane count for backward compatibility Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix AUXDATAn registers access during writeAndrey Gusakov2017-07-061-2/+2
| | | | | | | | | | | | | | | | | | First four bytes should go to DP0_AUXWDATA0. Due to bug if len > 4 first four bytes was writen to DP0_AUXWDATA1 and all data get shifted by 4 bytes. Fix it. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix timing calculationAndrey Gusakov2017-07-061-10/+13
| | | | | | | | | | | | | | | | Fields in HTIM01 and HTIM02 regs should be even. Recomended thresh_dly value is max_tu_symbol. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix DP0_MISC register setAndrey Gusakov2017-07-061-2/+2
| | | | | | | | | | | | | | | | Remove shift from TU_SIZE_RECOMMENDED define as it used to calculate max_tu_symbols. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * video: tc358767: fix EDID read for DP displaysAndrey Gusakov2017-07-061-5/+16
| | | | | | | | | | | | | | | | Desktop displays do not always support E-DDC. So do not fall on EDID segment index write operation. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/nvmem'Lucas Stach2017-07-311-34/+62
|\ \
| * | nvmem: snvs_lpgpr: sync with latest version for kernelOleksij Rempel2017-07-061-34/+62
| |/ | | | | | | | | | | | | | | DT format is ACKed now without "offset" parameter. Make sure barebox driver will work with it properly. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/mmc'Lucas Stach2017-07-311-24/+30
|\ \
| * | mmc: add eMMC v5 and V5.1 detection supportPeter Seiderer2017-07-061-0/+6
| | | | | | | | | | | | | | | | | | | | | Just add the defines. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | mmc: Consistently use EXT_CSD_* names from eMMC 5.1 specSascha Hauer2017-07-061-24/+24
| |/ | | | | | | | | | | | | | | | | | | We have kept the EXT_CSD registers which were added in the 5.1 spec separately for no good reason. Order the EXT_CSD defines by register number instead. Also we had some duplicates, for these consistently use the names from the 5.1 spec. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/misc'Lucas Stach2017-07-314-15/+58
|\ \
| * | video/ssd1307fb: add support for VBATBastian Stender2017-07-301-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support to the driver to enable VBAT regulator at init time. This is similar to ba14301e0356 ("fbdev/ssd1307fb: add support to enable VBAT") and cfc5b2b551d8 ("fbdev/ssd1307fb: fix optional VBAT support") in Linux kernel. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | clk: clk-fixed-factor: remove leftover debuggingLucas Stach2017-07-201-1/+0
| | | | | | | | | | | | | | | | | | | | | Don't spam the output with rate propagation messages. It isn't done for any other clock. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | video: IPUv3-LDB: fix dual-channel modeLucas Stach2017-07-201-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | For the dual-channel mode to work correctly, both channels need to be muxed to the same DI and both clock branches need to be configured correctly. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | video: tc358767: demote ASSR enable failure to debug levelLucas Stach2017-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Same as in the Linux kernel. Failure to enable ASSR isn't a critical failure and can happen in normal use. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | Merge branch 'for-next/imx'Lucas Stach2017-07-313-11/+68
|\ \ \
| * | | clk: i.MX7: Remove unused UART clocks arrayAndrey Smirnov2017-07-301-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove what looks like unused leftover from analogous Linux kernel code. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | | regulator: pfuze: provide power over standby handlerOleksij Rempel2017-07-072-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is providing an optional power off handler which will configure standby state of the PMIC to disable all power lines. In my power consumption test on RIoTBoard, I got the following results: power off without this patch: 320 mA power off with this patch: 2 mA Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | | Merge branch 'for-next/efi'Lucas Stach2017-07-311-1/+16
|\ \ \ \
| * | | | of: of_path: find device via partuuidSteffen Trumtrar2017-07-101-1/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a node is compatible to a fixed-partitions, support searching the corresponding device via the partuuid, if it specified in the device tree. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | | Merge branch 'for-next/at91'Lucas Stach2017-07-316-7/+8
|\ \ \ \
| * | | | atmel_lcdfb: fix so the correct guard_time is usedSam Ravnborg2017-07-202-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | guard_time is set in platform data but was never copied to atmel_lcdfb_info thus a guard_time of 0 have always been used. This issue was found during code inspection and no know bugs is fixed by this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | | | mci: atmel_mci: fix devinfo DEV with OF enabledSam Ravnborg2017-07-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devinfo DEV resulted in a NULL pointer expection. As platform_data is only valid in non-DT setup, fix this so we no longer reference platform_data outside the probe function Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | | | pinctrl: at91: move initcalls to postcore_initcallSam Ravnborg2017-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move initcalls to postcore_initcall() like all other pinctrl drivers. This will init this driver earlier right after pinctrl driver. No know bugs are fixed by this change. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | | | clk: at91: fix clk-mainSam Ravnborg2017-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following warning was reported during boot with at91sam9263ek with DT enabled. "Main crystal frequency not set, using approximate value" This occured due to a missing parent in clk_rm9200_main. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | | | macb: fix clock probing with DTSam Ravnborg2017-07-201-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With DT enabled the following was logged: macb fffbc000.ethernet: no macb_clk macb fffbc000.ethernet: probe failed: Invalid argument The clock probed was with the name used in a non-DT setup. Fix so we use a proper name ("pclk") with DT, and keep current fuctionality without DT. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | | gpiolib: Simplify code of gpio_request_one()Andrey Smirnov2017-07-301-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like we can get rid of an 'if' and 'goto', so do it to simplify the code. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | | gpiolib: Fix buggy flag detection codeAndrey Smirnov2017-07-301-9/+16
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both GPIOF_ACTIVE_LOW and GPIOF_INIT_ACTIVE are multi-bit constants so detecting their assertion using simple bit-wise and is incorrect and would lead to false positives. Fixes: bbc499914 ("gpiolib: Add code to support "active low" GPIOs") Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | i.MX: clk-pllv3: Initially disable PLL_BYPASS bitPhilipp Zabel2017-07-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit cbff8031b491 ("i.MX: clk-pllv3: Do not touch PLL_BYPASS bit") overreached a bit by removing the code that disables the PLL_BYPASS bit for all architectures instead of making an exception for Vybrid and i.MX6SL. This causes the USB controller on i.MX6Q to run at bypass frequency and fail: barebox@Boundary Devices i.MX6 Quad Nitrogen6x Board:/ usb usb: USB: scanning bus for devices... usb: Bus 001 Device 001: ID 0000:0000 EHCI Host Controller imx-usb 2184200.usb: port(0) reset error This patch adds code to unconditionally disable the PLL_BYPASS bit initially, when the PLL clocks are registered. Cc: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Fixes: cbff8031b491 ("i.MX: clk-pllv3: Do not touch PLL_BYPASS bit") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | crypto: caam: use dma_alloc_coherent instead of dma_allocOleksij Rempel2017-07-121-3/+1
| |/ |/| | | | | | | | | | | | | | | | | dma_alloc return non-coherent memory, but the driver does no cache maintenance on the buffer, causing memory corruption. Fix this by requesting coherent memory for the DMA transfer. Fixes: ef4144b4ab63 (crypto: caam - fix RNG buffer cache alignment) Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | gpio: fix null pointer exception when there is no oftreeSam Ravnborg2017-07-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a system with oftree support enabled but with no oftree the of_gpiochip_scan_hogs() would fail due to device_node equals NULL. Check device_node and return with 0 in this situation, as this mirrors what would have happened before we added support for gpio-hogs. Use IS_ENABLED(CONFIG_OFDEVICE) to teach compiler to leave out the of_* specific functions if not needed. Fixes: 37e6bee7 ("gpiolib: Add support for GPIO "hog" nodes") Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | clk: fix clk_get error handlingSam Ravnborg2017-07-071-1/+1
|/ | | | | | | | | | | | | | | | | If there is no OFTREE support of_clk_get_by_name failed with -ENOENT, which caused clk_get to bail out. This had the effect that nothing was printed on the serial console with at91sam9263-ek. There are no error paths that will return -ENODEV as we test for today, so change this to -ENOENT which is in use. This allows us to contine with clk_get_sys() in case of other errors as was the intention of the original fix. Fixes: 90f7eacb ("clk: let clk_get return errors from of_clk_get_by_name") Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* Merge branch 'for-next/mvebu'Sascha Hauer2017-06-304-0/+157
|\
| * clk: mvebu: Add support for Armada 38x's coreclkUwe Kleine-König2017-06-194-0/+157
| | | | | | | | | | | | | | | | This is a mixture of the Armada 370 barebox driver and the Armada 38x Linux driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2017-06-301-89/+113
|\ \
| * | mtd: dataflash: Add flash_info for AT45DB641EAndrey Smirnov2017-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is a backport of kernel commit 67e4145ebf2c161d7404770461b8404f00a6d3bf Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: dataflash: Make use of "extened device information"Andrey Smirnov2017-06-201-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In anticipation of supporting chips that need it, extend the size of struct flash_info's 'jedec_id' field to make room 2 byte of extended device information as well as add code to fetch this data during jedec_probe(). This is a backport of kernel commit 1da8869a428317a6d3cd8d47184cf87feb34a98b Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: dataflash: Get rid of loop counter in jedec_probe()Andrey Smirnov2017-06-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "For" loop in jedec_probe can be simplified to not need counter 'i'. Convert the code and get rid of the variable. This is a backport of kernel commit a296a1bc3eb54382d2a61d47529e71c9d3bc615e Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: dataflash: Replace pr_debug, printk with dev_* functionsAndrey Smirnov2017-06-201-42/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lion's share of calls to pr_debug in this driver follow the pattern of pr_debug("%s <message>", dev_name(<dev>), <arguments>), which should be semantically identical to dev_dbg(<dev>, "<message>", <arguments>), so replace such occurencies to simplify the code. Convert the small minority of pr_debug that do not follow pattern from above to use dev_dbg as well, for the sake of consistency. Convert similar patter of printk(KERN_ERR, "%s: ...", dev_name(...), ...) to use dev_err instead. No functional change intended. This is a backport of kernel commit 02f62864f6cebbbbff6bb611fddf78c1d05a9747 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: dataflash: Improve coding style in jedec_probe()Andrey Smirnov2017-06-201-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the following: - Replace indentation between type and name of local variable from tabs to spaces - Replace magic number 0x1F with CFI_MFR_ATMEL macro - Replace variable 'tmp' with 'ret' and 'i' where appropriate - Reformat multi-line comments and add newlines where appropriate No functional change intended. This is a backport of kernel commit 41c9c6621afa22c86fe74cf07536fd21c7719ca6 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: dataflash: Replace C99 types with their kernel counterpartsAndrey Smirnov2017-06-201-20/+20
| |/ | | | | | | | | | | | | | | | | | | No functional change intended. This is a backport of kernel commit c41e43c6faf68a9b70afdb0dfee45d196c27031b Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-06-303-16/+28
|\ \
| * | mtd: spi-nor: sync definition of Spansion chips from LinuxUwe Kleine-König2017-06-191-10/+12
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of_device_is_stdout_path: split off options and support aliasesUwe Kleine-König2017-06-191-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several device trees use something like: stdout-path = "serial0:115200n8"; Currently of_device_is_stdout_path fails to do the right thing here because it expects an absolute node path and no options. So split off options (everything after the colon) and resolve aliases. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>