summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* crypto: add i.MX6 CAAM supportSteffen Trumtrar2016-02-1217-0/+4638
| | | | | | | | | | | | | | | | Add the i.MX6 crypto core CAAM with support for the random number generator. The core itself works with jobrings in which descriptors can be queued/dequeued for processing. Depending on descriptor type the CAAM unit then either produces random numbers or decrypts/encrypts data. The code is based on the Linux v4.1 driver of the same name without all the crypto/hashing components. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: Fix unregister device after device probe failureSascha Hauer2016-02-081-0/+4
| | | | | | | | | When a device probe fails the device is removed from the active list. If then the device is unregistered afterwards it is removed from the active list again resulting in a crash. To fix this initialize the devices active list entry when removing it from the active list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: video: drop unused of_get_display_timing()Antony Pavlov2016-02-081-25/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: video: fb: make locally used fb_set_shadowfb() staticAntony Pavlov2016-02-081-1/+1
| | | | | | | | | | | | The patch fixes this compiler's warning: drivers/video/fb.c:233:5: warning: no previous prototype for 'fb_set_shadowfb' [-Wmissing-prototypes] int fb_set_shadowfb(struct param_d *p, void *priv) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/regmap'Sascha Hauer2016-02-085-71/+430
|\
| * mfd: mc13xxx: Switch to regmap supportSascha Hauer2016-02-051-71/+56
| | | | | | | | | | | | This moves the mc13xxx driver over to regmap. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add initial regmap supportSascha Hauer2016-02-054-0/+374
| | | | | | | | | | | | | | | | This adds initial regmap support. Function prototypes are from the Kernel, the implemention is mostly rewritten. Currently the regmap support is limited to the bare minimum to get started. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2016-02-087-30/+570
|\ \
| * | net: phy: micrel: Add workaround for bad autonegPhilipp Zabel2016-02-041-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>: Very rarely, the KSZ9031 will appear to complete autonegotiation, but will drop all traffic afterwards. When this happens, the idle error count will read 0xFF after autonegotiation completes. Reset the PHY when in that state. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: micrel: Center FLP timing at 16msPhilipp Zabel2016-02-041-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | Based on kernel commit 6270e1ae804a ("net/phy: micrel: Center FLP timing at 16ms") by Jaeden Amero <jaeden.amero@ni.com>: Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: micrel: Be more const correctPhilipp Zabel2016-02-041-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on kernel commit 3c9a9f7fb0ee ("net/phy: micrel: Be more const correct") by Jaeden Amero <jaeden.amero@ni.com>: In a few places in this driver, we weren't using const where we could have. Use const more. In addition, change the arrays of strings in ksz9031_config_init() to be not only const, but also static. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: micrel: use BIT macroPhilipp Zabel2016-02-041-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Based on kernel commit 00aee095000c ("net: phy: micrel: use BIT macro") by Johan Hovold <johan@kernel.org>. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: micrel: Staticise ksz8873mll_read_status()Philipp Zabel2016-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on kernel commit 32d73b144eac ("net: phy: micrel: Staticise ksz8873mll_read_status()") by Jingoo Han <jg1.han@samsung.com>: ksz8873mll_read_status() is used only in this file. Fix the following sparse warning: drivers/net/phy/micrel.c:147:5: warning: symbol 'ksz8873mll_read_status' was not declared. Should it be static? Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | miitool: Add code to register a PHYAndrey Smirnov2016-02-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the behaviour of the 'miitool'. Now in order to show PHY's link information 'miitool' should be invoked as such: miitool -s [PHY] Also, implment code to allow to register a dummy PHY device in order to be able to perform raw MDIO bus access. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mdio_bus: Change PHY's naming schemeAndrey Smirnov2016-02-032-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the way PHY devices are named upon creation. This commit replaces sequentialy numbered "/dev/phy%d" with "/dev/mdio%d-phy%02x". This way it is significanlty easier to identify which PHY in real-life (e.g. on a schematic) corresponds to which device in /dev. Also, replace asprintf with xasprintf to provide some form of memory allocation failure checking. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mdio_bus: Add mdiobus_get_bus() functionAndrey Smirnov2016-02-031-0/+19
| | | | | | | | | | | | | | | | | | | | | Add mdiobus_get_bus() -- a function to get a MDIO bus by its number Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mdio_bus: Change dev_info to dev_dbgAndrey Smirnov2016-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change dev_info to dev_dbg in mdiobus_detect for displaying phy's registration status as it is in of_mdiobus_register_phy(). While that information is useful for debugging, user doesn't really need to see that information every time they call miitool for the first time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: Port bitbanged MDIO code from Linux kernelAndrey Gusakov2016-02-034-0/+476
| |/ | | | | | | | | | | | | | | | | Port bitbanged MDIO framework and gpiolib MDIO bus driver that uses it from Linux kernel. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-02-082-5/+39
|\ \
| * | spi-nor: Port erase timeout fix from LinuxAndrey Smirnov2016-02-081-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Large SPI-NOR (>2MB) chips reuire more than 40 seconds to perform all-chip erase. This patch adapts 09b6a377687b885565339e60bc62566433a0406f from Linux kernel, which implements simple heuristics in order to calculate appropriate wait time (see orignal commit's description for more details of the fix) Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Convert users of PRINTF_CONVERSION_RESOURCE to %paSascha Hauer2016-01-151-2/+5
| |/ | | | | | | | | | | | | | | printf now supports printing resource_size_t directly, convert all users of the previously used PRINTF_CONVERSION_RESOURCE over to %pa. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/linux-headers'Sascha Hauer2016-02-087-0/+8
|\ \
| * | Introduce include/linux/wait.hYegor Yefremov2016-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | Move Linux wait queue related definitions to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Introduce include/linux/mutex.hYegor Yefremov2016-02-032-0/+2
| | | | | | | | | | | | | | | | | | | | | Move mutex related defines to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Introduce include/linux/spinlock.hYegor Yefremov2016-02-015-0/+5
| |/ | | | | | | | | | | | | Move spinlock related definitions to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/input'Sascha Hauer2016-02-088-423/+512
|\ \
| * | input: gpio-keys: convert to input frameworkSascha Hauer2016-01-182-47/+18
| | | | | | | | | | | | | | | | | | To allow asking for the button states. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: gpio-keys: Use KEY_* keycodesSascha Hauer2016-01-131-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | The gpio-keys driver takes ascii key codes from platform_data and Linux keycodes from device tree. Convert the ascii keys over to Linux keycodes to get rid of the special cases in the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: imx-keypad: Add device tree supportSascha Hauer2016-01-131-14/+20
| | | | | | | | | | | | | | | | | | | | | The preparations are done in previous patches, now we only have to add the device tree compatible and drio the check for platform_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: Add device tree parsing support for matrix keymapSascha Hauer2016-01-132-2/+51
| | | | | | | | | | | | | | | | | | Add support for parsing the "linux,keymap" property. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: imx-keypad: convert to input frameworkSascha Hauer2016-01-132-43/+13
| | | | | | | | | | | | | | | | | | To make it possible to ask for the button state. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: move matrix_keypad_build_keymap() to C fileSascha Hauer2016-01-134-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | Future additions will make the function too big to live as a static inline function. Move to a C file and while at it, move matrix_keypad.h to include/input/ where it belongs to. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: imx-keypad: Use dev_* functionsSascha Hauer2016-01-131-5/+6
| | | | | | | | | | | | | | | | | | driver should use dev_* rather than pr_* Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: usb keyboard: convert to input frameworkSascha Hauer2016-01-132-242/+55
| | | | | | | | | | | | | | | | | | Conert the USB keyboard over to the new input core as a first user. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: Add input coreSascha Hauer2016-01-133-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all input driver register themselves as consoles. Consoles are fine for typing text, but they do not allow to ask for the current pressed state of buttons or keypads. They also do not support non printable keys like the function keys. This patch adds a simple input core. On the driver side it supports input_report_key_event() to report events (button presses and releases). On the consumer side it allows getting the current button status via input_key_get_status(). Also an event driven interface is available which calls a callback whenever an input event is received. The input core also registers a console for all registered input devices which handles passing events to the console and stuff like key repetition, so this can be removed from the drivers once they are converted to the input core. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | keymap: Add keymap for keys with shift pressedSascha Hauer2016-01-131-0/+82
| | | | | | | | | | | | | | | | | | | | | When converting keys to ascii for the console we also need the keymap with shift pressed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | keymap: Add apostrophe, backslash and homeSascha Hauer2016-01-131-3/+3
| | | | | | | | | | | | | | | | | | Add some previously undefined keys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | keymap: Add keypad keysSascha Hauer2016-01-131-16/+16
| | | | | | | | | | | | | | | | | | Allow to use the number keypad keys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | keymap: remove exotic and nonprintable keysSascha Hauer2016-01-131-49/+0
| | | | | | | | | | | | | | | | | | | | | We do not need these keys and they do not produce a usable result either. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | keymap: Fix bracesSascha Hauer2016-01-131-2/+2
| |/ | | | | | | | | | | | | KEY_LEFTBRACE is the '[' key on an english keyboard and KEY_RIGHTBRACE is the ']' key. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i.MX habv4: Fix RVT address for newer SoCsSascha Hauer2016-02-051-3/+14
| | | | | | | | | | | | Newer i.MX SoCs have the RVT at 0x98, not at 0x94 any more. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx: hab: Make hab status functions SoC specificSascha Hauer2016-02-041-27/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HABv4 functions need access a part of the ROM which is located in the zero page. This must be done early, before the MMU has been configured and the zero page has been set to faulting. The HAB functions currently use cpu_is_imxxy(). At the stage where HAB is called the i.MX CPU type variable is not yet initialized, so this code only works when only one i.MX type is enabled and cpu_is_imxxy() are compile time constants. To fix HAB support when more than one i.MX type is enabled make the HAB status function SoC specific so that we can drop the use of cpu_is_imxxy(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | hab: Add HABv3 status report functionSascha Hauer2016-02-022-0/+79
| | | | | | | | | | | | | | Status reporting for HABv3 is different from HABv4. Add a status report function for HABv3. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx: hab: rename driver dir to hab/Sascha Hauer2016-02-024-3/+3
|/ | | | | | | There's not only HABv4 but also HABv3. No need to put the corresponding code in separate directories, so rename the habv4 directory to hab. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rtc'Sascha Hauer2016-01-116-1/+236
|\
| * rtc-lib: Check tm_wday for validity in rtc_valid_tm()Andrey Smirnov2016-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RTC drivers rely on rtc_valid_tm() in order to make sure that no bogus values from uninitialized HW registers get passed to the uppper layers. A somewhat contrived way to reproduce this problem with DS1307 RTC would be to do the following: > i2c_write -b <bus> -a <addr> -r 3 0x00 > hwclock Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rtc: ds1307: Fix a memory leakAndrey Smirnov2016-01-071-0/+3
| | | | | | | | | | | | | | | | | | Several failure paths would result in control being transfered to 'exit' label, so instead of just returning error codes in those cases we also need to free the memory allocated for 'ds1307' Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rtc: ds1307: Add code to support ds1337/1341Andrey Smirnov2016-01-071-0/+91
| | | | | | | | | | | | | | | | Port DS1337 specific bits from corresponding Linux driver and add small changes needed for DS1341. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rtc: Add Abracon driverSascha Hauer2016-01-073-0/+130
| | | | | | | | | | | | | | | | This patch adds support for the Abracon ab-rtcmc-32.768khz-eoz9-s3 RTC. The driver can probably support other Abracon RTCs aswell, but this hasn't been verified. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rtc: Fill in weekdays before setting timeSascha Hauer2016-01-071-1/+7
| | | | | | | | | | | | | | | | Some rtcs store the weekday. Make sure it's filled in correctly before passinf the time to the driver. This is easily done by converting it to seconds-since-epoch and back to struct rtc_time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>