summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/net'Sascha Hauer2017-09-081-1/+6
|\
| * Phy: Check NULL bus case and undetected phy via ofClément Leger2017-09-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 5e87dc2c24051c2cd2985e513c5a825d51d9bb00 Mon Sep 17 00:00:00 2001 From: Clement Leger <clement.leger@kalray.eu> Date: Tue, 5 Sep 2017 10:37:23 +0200 Subject: [PATCH] Phy: Check NULL bus case and undetected phy via of phy_device_connect can be called with NULL miibus for automatic match with the phy described in the device tree. In the case where the phy was not detected for some unknown reason, the next calls will be done with a NULL bus. This will lead to undefined behavior and more probably crashes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: don't crash if we have no parentOleksij Rempel2017-09-061-1/+1
| | | | | | | | | | | | | | | | current code will crash if DT has no PHY entry. With this patch we will test if parent exist, before testing the parent device node. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2017-09-082-13/+21
|\ \
| * | mtd: nand: nand_mxs: Don't call get/set features on chips which do not ↵Sascha Hauer2017-09-061-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | support it Older versions of the ONFI spec do not support get/set features, so do not call these commands when they are not available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: Only call ONFI get/set features on supported chipsSascha Hauer2017-09-061-2/+6
| | | | | | | | | | | | | | | | | | | | | Older versions of the ONFI spec do not support get/set features, so do not call these commands when they are not available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand-mxs: improve error messagesUwe Kleine-König2017-09-061-2/+2
| |/ | | | | | | | | | | | | | | This commit adds the return value of the failing function to one message and makes the other unique. 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/misc'Sascha Hauer2017-09-084-8/+64
|\ \
| * | gpio: gpio-generic: add dt supportAntony Pavlov2017-09-081-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: gpio-generic: fix bgpio_map()Antony Pavlov2017-09-081-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | serial: ns16550: provide big-endian supportOleksij Rempel2017-09-081-2/+17
| | | | | | | | | | | | | | | | | | | | | we need it at least for QCA AR9344 Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: port of_device_is_big_endian from linuxOleksij Rempel2017-09-081-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |commit 37786c7fee40771d13901de129af7e084ed48b55 |Author: Kevin Cernekee <cernekee@gmail.com> |Date: Thu Apr 9 13:05:14 2015 -0700 | | of: Add helper function to check MMIO register endianness | | SoC peripherals can come in several different flavors: | | - little-endian: registers always need to be accessed in LE mode (so the | kernel should perform a swap if the CPU is running BE) | | - big-endian: registers always need to be accessed in BE mode (so the | kernel should perform a swap if the CPU is running LE) | | - native-endian: the bus will automatically swap accesses, so the kernel | should never swap | | Introduce a function that checks an OF device node to see whether it | contains a "big-endian" or "native-endian" property. For the former case, | always return true. For the latter case, return true iff the kernel was | built for BE (implying that the BE MMIO accessors do not perform a swap). | Otherwise return false, assuming LE registers. | | LE registers are assumed by default because most existing drivers (libahci, | serial8250, usb) always use readl/writel in the absence of instructions | to the contrary, so that will be our fallback. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: autostart: properly release f_multi_optsOleksij Rempel2017-09-061-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the same as for usb gadget autostarter. |commit 2b9bcff79a02f770fa730e2689ba35cc03c0da7d |Author: Sascha Hauer <s.hauer@pengutronix.de> |Date: Fri Jan 20 10:03:45 2017 +0100 | | usb: gadget: properly release f_multi_opts | | The usbgadget commands uses statically allocated f_multi_opts and passes | this to usb_multi_register(). These f_multi_opts are of course no | longer valid when we leave the usbgadget command. Luckily we do not use | the data after we left the usbgadget command, so this never has been a | problem. However, f_multi_opts has some allocated members which we can | not free anymore on gadget unregistration because we no longer have the | pointer to them. | | Fix this by adding a release function to struct f_multi_opts. This way | we can allocate all memory dynamically and properly free it when not | used anymore. | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2017-09-082-35/+82
|\| |
| * | clk: imx: cpu: don't store the address of a function parameterUwe Kleine-König2017-08-151-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function imx_clk_cpu takes a const char *parent_name as second paramter. The implementation introduced in commit 9a89ed9d281e then uses the address of this function parameter to assign clk.parent_names. This is an address on the stack that is saved in the clk tree and of course this is easily overwritten by later execution paths of barebox. Without this fix the clk_dump command reproducibly crashes on i.MX7 (which is the only SoC that makes use of imx_clk_cpu()). Fixes: 9a89ed9d281e ("clk: imx: Add clk-cpu support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | spi: imx: add timeout to xchg_singleUwe Kleine-König2017-08-151-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | If there is a problem STAT_RR might never be set which results in an endless loop. Break out after 10 µs with -ETIMEOUT instead. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | spi: imx: add error checkingUwe Kleine-König2017-08-151-29/+48
| |/ | | | | | | | | | | | | | | | | This makes it possible that the xchg_single callbacks return an error code that is then passed to the caller of spi_transfer. There is no change in behaviour intended as up to now the callbacks always return 0. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/at91'Sascha Hauer2017-09-085-48/+287
|\ \
| * | at91_udc: add DT supportSam Ravnborg2017-09-061-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the linux kernel version of the same driver. Needs to adjust clock names as the clock names used in the device tree does not match the clocknames used in platform_data. The clocknames in the device tree are not unique, so it was not an option to rename the clocks. It boots and the driver is discovered - no further testing done. $ devinfo fff78000.gadget Resources: num: 0 name: /ahb/apb/gadget@fff78000 start: 0xfff78000 size: 0x00004000 Driver: at91_udc Bus: platform Parameters: vbus: 1 (type: bool) Device node: /ahb/apb/gadget@fff78000 gadget@fff78000 { compatible = "atmel,at91sam9263-udc"; reg = <0xfff78000 0x4000>; interrupts = <0x18 0x4 0x2>; clocks = <0x26 0x27>; clock-names = "pclk", "hclk"; status = "okay"; atmel,vbus-gpio = <0x28 0x19 0x0>; }; Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | atmel_lcdfb: add DT supportSam Ravnborg2017-09-062-4/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards use "have_intensity_bit". To support this the syntax for lcd_wiring_mode was extended to include this info. This is an extension compared to the documented bindings, and an extension the kernel does not support (yet). The binding documents that there can be more than one gpio to power on/off the display but current implmentation supports only one gpio. There are no users that requires more than one gpio so this is good enough. The clk name used for hclk differs from device trees and platform data. We could rename the clocl used in platform data but the name "hclk" is not unique. Configure clockname based on configuration method. Devicetree => hclk Platform data => hck1 Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | atmel_lcdfb: move pdata init to a separate functionSam Ravnborg2017-09-061-24/+41
| | | | | | | | | | | | | | | | | | | | | | | | Keep atmel_lcdc_register() readable by separating out pdata handling in a helper function Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | atmel_lcdfb: define power_control gpio in platform_dataSam Ravnborg2017-09-062-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify board specific code by specifying the power_control gpio direct in platform data. Move registration of the GPIO to the driver so we no longer need to duplicate this for each board. As an intended side-effect there is no longer any references to platform_data outside atmel_lcdc_register() so remove it from struct atmel_lcdfb_info The implementation assumes that GPIO=0 is the same as no power control. This prevents us from using any GPIO=0 for power control, but this is not considered a problem for current users. Future DT users will not have this limitation. This commit include a fix so we will actually power down if requested. Previously this was hardcoded to ON. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | atmel_lcdfb: move lcd_wiring_mode, have_intensity_bit to local dataSam Ravnborg2017-09-062-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Copy lcd_wiring_mode and have_intensity_bit to atmel_lcdfb_info to minimize dependency on the atmel_lcdfb_platform_data. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | atmel_lcdfb: move dmacon, lcdcon2 to local dataSam Ravnborg2017-09-064-8/+8
| |/ | | | | | | | | | | | | | | Copy dmacon + lcdcon2 to atmel_lcdfb_info to minimize dependency on the atmel_lcdfb_platform_data. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / gpio: clps711x: clps711x_gpio_dt_ids: add missing sentinel entryAntony Pavlov2017-09-061-0/+1
|/ | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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
|\ \ \ \