Commit graph

3734 commits

Author SHA1 Message Date
Peter Mamonov
051b39f683 input: usb keyboard: fix BACKSPACE
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-23 08:46:57 +01:00
Sascha Hauer
4c24879f6a regulator: fixed: Init gpio properly
gpio has to be initialized with an invalid gpio number. 0 is a valid
number and it will be requested and used by the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-23 08:05:39 +01:00
Sascha Hauer
46bb3a4d84 driver: Fix unregister device after device probe failure
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>
2016-02-08 11:31:02 +01:00
Antony Pavlov
c976b06e16 drivers: video: drop unused of_get_display_timing()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-08 08:30:02 +01:00
Antony Pavlov
132e226920 drivers: video: fb: make locally used fb_set_shadowfb() static
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>
2016-02-08 08:28:39 +01:00
Sascha Hauer
7482ab4de1 Merge branch 'for-next/regmap' 2016-02-08 08:27:03 +01:00
Sascha Hauer
a22f59c178 Merge branch 'for-next/net' 2016-02-08 08:26:45 +01:00
Sascha Hauer
1379a5ef1e Merge branch 'for-next/misc' 2016-02-08 08:26:43 +01:00
Sascha Hauer
79606b51ed Merge branch 'for-next/linux-headers' 2016-02-08 08:26:36 +01:00
Sascha Hauer
05261801e9 Merge branch 'for-next/input' 2016-02-08 08:26:35 +01:00
Andrey Smirnov
b09ee0358c spi-nor: Port erase timeout fix from Linux
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>
2016-02-08 08:07:08 +01:00
Sascha Hauer
1db47f7616 i.MX habv4: Fix RVT address for newer SoCs
Newer i.MX SoCs have the RVT at 0x98, not at 0x94 any more.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:51:42 +01:00
Sascha Hauer
77bfff1cbe mfd: mc13xxx: Switch to regmap support
This moves the mc13xxx driver over to regmap.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 14:32:16 +01:00
Sascha Hauer
7a53e162de Add initial regmap support
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>
2016-02-05 14:32:16 +01:00
Sascha Hauer
48d74b1ca4 imx: hab: Make hab status functions SoC specific
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>
2016-02-04 14:38:33 +01:00
Philipp Zabel
a4cee7207a net: phy: micrel: Add workaround for bad autoneg
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>
2016-02-04 08:10:39 +01:00
Philipp Zabel
da89ee8f2e net: phy: micrel: Center FLP timing at 16ms
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>
2016-02-04 08:10:39 +01:00
Philipp Zabel
9fc7b70a28 net: phy: micrel: Be more const correct
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>
2016-02-04 08:10:39 +01:00
Philipp Zabel
ea89f30bbd net: phy: micrel: use BIT macro
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>
2016-02-04 08:10:39 +01:00
Philipp Zabel
7be3ed46a6 net: phy: micrel: Staticise ksz8873mll_read_status()
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>
2016-02-04 08:10:39 +01:00
Andrey Smirnov
ae2fb9b918 miitool: Add code to register a PHY
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>
2016-02-04 08:10:39 +01:00
Andrey Smirnov
993a28aa48 mdio_bus: Change PHY's naming scheme
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>
2016-02-03 08:36:33 +01:00
Andrey Smirnov
109543cf88 mdio_bus: Add mdiobus_get_bus() function
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>
2016-02-03 07:58:28 +01:00
Andrey Smirnov
dfe0745ba2 mdio_bus: Change dev_info to dev_dbg
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>
2016-02-03 07:58:28 +01:00
Andrey Gusakov
09c56012a4 net: Port bitbanged MDIO code from Linux kernel
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>
2016-02-03 07:58:28 +01:00
Yegor Yefremov
6b8cf28e0c Introduce include/linux/wait.h
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>
2016-02-03 07:57:36 +01:00
Yegor Yefremov
7814ae61ab Introduce include/linux/mutex.h
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>
2016-02-03 07:57:32 +01:00
Sascha Hauer
8aabf498e1 hab: Add HABv3 status report function
Status reporting for HABv3 is different from HABv4. Add a status
report function for HABv3.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Sascha Hauer
2ff23512d9 imx: hab: rename driver dir to hab/
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>
2016-02-02 15:41:04 +01:00
Yegor Yefremov
baa7fe1d15 Introduce include/linux/spinlock.h
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>
2016-02-01 09:16:13 +01:00
Sascha Hauer
253fb33bb8 input: gpio-keys: convert to input framework
To allow asking for the button states.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-18 08:32:59 +01:00
Sascha Hauer
e2306ada3e Convert users of PRINTF_CONVERSION_RESOURCE to %pa
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>
2016-01-15 15:33:59 +01:00
Sascha Hauer
30b7c5ead3 input: gpio-keys: Use KEY_* keycodes
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>
2016-01-13 16:28:08 +01:00
Sascha Hauer
dcaf3adb53 input: imx-keypad: Add device tree support
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>
2016-01-13 16:28:07 +01:00
Sascha Hauer
5ac4b013a3 input: Add device tree parsing support for matrix keymap
Add support for parsing the "linux,keymap" property.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:07 +01:00
Sascha Hauer
b187e4784a input: imx-keypad: convert to input framework
To make it possible to ask for the button state.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:07 +01:00
Sascha Hauer
6639c98acc input: move matrix_keypad_build_keymap() to C file
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>
2016-01-13 16:28:06 +01:00
Sascha Hauer
f3bf60efcb input: imx-keypad: Use dev_* functions
driver should use dev_* rather than pr_*

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:06 +01:00
Sascha Hauer
85e54605ed input: usb keyboard: convert to input framework
Conert the USB keyboard over to the new input core as a first user.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:05 +01:00
Sascha Hauer
224a08df5d input: Add input core
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>
2016-01-13 16:26:05 +01:00
Sascha Hauer
cfe4e61df1 keymap: Add keymap for keys with shift pressed
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>
2016-01-13 16:23:22 +01:00
Sascha Hauer
2d43dd7697 keymap: Add apostrophe, backslash and home
Add some previously undefined keys.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:23:22 +01:00
Sascha Hauer
7e55652418 keymap: Add keypad keys
Allow to use the number keypad keys.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:23:22 +01:00
Sascha Hauer
59a464ca6c keymap: remove exotic and nonprintable keys
We do not need these keys and they do not produce a usable result
either.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:23:22 +01:00
Sascha Hauer
c8fe211975 keymap: Fix braces
KEY_LEFTBRACE is the '[' key on an english keyboard and KEY_RIGHTBRACE
is the ']' key.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:23:22 +01:00
Sascha Hauer
1b59b573e4 Merge branch 'for-next/rtc' 2016-01-11 13:11:08 +01:00
Sascha Hauer
2881f2df35 Merge branch 'for-next/mtd' 2016-01-11 13:11:07 +01:00
Sascha Hauer
b9a2512aaa Merge branch 'for-next/misc' 2016-01-11 13:11:06 +01:00
Sascha Hauer
8b7f29cd05 Merge branch 'for-next/arm' 2016-01-11 13:11:05 +01:00
Lucas Stach
34e8a227d4 reset: fix non GPIO reset
The reset controller structure is zero initialized in the OF
reset case, but as 0 is also a valid GPIO number the current
code tries to assert/deassert the GPIO instead of calling into
the reset controller device.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:26:12 +01:00