rtl8188eu: Add new wireless driver

This adds the rtl8188eu dir from rtl8188eu.zip from:
http://gutspot.com/wp-content/uploads/2013/01/8188eu_USB_linux.zip
Which is the latest version I can find, as drivers/net/wireless/rtl8188eu
with all line-endings converted from dos to unix.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8189es: Add new wireless driver

This adds the rtl8188eu dir from rtl8188eu.zip from:
http://gutspot.com/wp-content/uploads/2013/01/8188eu_USB_linux.zip
Which is the latest version I can find, as drivers/net/wireless/rtl8189es
with all line-endings converted from dos to unix and
rtl8189es/autoconf_rtl8189e_sdio_linux.h copied to rtl8189es/include/autoconf.h

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8723as: Add new wireless driver

Add several drivers for various realtek chipsets. The code is taken from the
i-onik.de source and the 8188eu driver has been tested.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtxx7x: Add new wireless driver

Add several drivers for various realtek chipsets. The code is taken from the
i-onik.de source and the 8188eu driver has been tested.

HdG: Note this is not a realtek but a Ralink driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl818x: Hookup the new wireless drivers

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
wireless: Make the new drivers build with sunxi-3.4

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
mmc-pm: Add support for a couple of new sdio wifi card types

From the i-onik.de sources.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-mmc: Make sunximmc_rescan_card work if called before module-init

The init order of builtin modules is not guaranteed, so mmc_pm
init may get called first, leading to sunximmc_rescan_card being called before
the sunxi-host mmc module is initialized itself.

This patch makes this scenario work by remembering the rescan request, and
executing it on module init.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8189es: Make module auto-load

Add a proper sdio: module-alias and move the initial powerup + rescan to
rtl8189es_wifi_gpio_init, so that the wifi module gets auto-loaded if
enabled in the fex file. This assumes that mmc_pm is build into the kernel,
as mmc_pm is the one doing the sdio_wifi_para fex section parsing.

If mmc_pm is not buildin it will need to be loaded manually (just as before),
and then on mmc_pm load rtl8189es will be autoloaded.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8723as: Make module auto-load

Add a proper sdio: module-alias and move the initial powerup + rescan to
rtl8723as_wifi_gpio_init, so that the wifi module gets auto-loaded if
enabled in the fex file. This assumes that mmc_pm is build into the kernel,
as mmc_pm is the one doing the sdio_wifi_para fex section parsing.

If mmc_pm is not buildin it will need to be loaded manually (just as before),
and then on mmc_pm load rtl8723as will be autoloaded.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Merge remote-tracking branch 'sunxi/stage/sunxi-3.4' into work-3.4
sunxi-sound: Fix soc-audio.x should use snd_soc_register_card() warnings

These warnings are thrown at runtime when the device(s) in question are
registering.

Note this is possibly a 3.4 only thing / patch-series.

While almost rewriting this code anyways also fix:
1) script_parser_fetch's last argument is an integer count, not a byte count
2) Fix cleaning up of platform_device when driver registration fails
3) On module onload properly remove both the device and the driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound: Move registration of hdmi-audio devices to sunxi-hdmi code

Registering the hdmi audio-devices when not using hdmi means that userspace
may end up trying to use hdmi while it is not working. When hdmi-audio is
not enabled, and userspace still tries to use it the audio-using app(s) will
hang when trying to write to the audio-device, since the write will never
complete when the video-part is not consuming any hdmi-audio.

Note that this patch does not unregister the audio-card again if the hdmi
block is powered down (dpms / blank screen), so as to avoid audio-streaming
apps to crash / abort because the soundcard has gone away. Instead the app
will pause (write will block) on monitor powerdown and resume again when
the monitor powers back on.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound: Cleanup spdif_used parsing

Various spdif_used parsing fixes / cleanups:
1) sun4i_spdma was not honoring spdif_used
2) There are 4 .ko files build for spdif, having each of them complain when
   spdif_used is not set is a bit too much
3) script_parser_fetch's last argument is an integer count, not a byte count
4) Fix cleaning up of platform_device when driver registration fails
5) On module onload properly remove both the device and the driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound: Honor audio_used fex file setting

So that devices which don't have analog audio hooked up don't get an
alsa sound-card for it.

While almost rewriting this code anyways also fix:
1) Cleaning up of platform_device when driver registration fails
2) On module onload properly remove both the device and the driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound: Honor capture_used and playback_used

So that the onboard-coded alsa-card does not advertises that it can playback /
capture sound on boards which cannot.

Note playback_used is a linux-sunxi.org fex file extension for boards which use
the onboard audio codec only for input, such as the uhost_u1a & mk802-a10s.

Since playback_used is a linux-sunxi.org fex file extension, it is assumed to
be 1 when not set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-rfkill: Don't register a bluetooth rfkill device when there is no bt

This also modifies mmc_pm_get_mod_type to make it safe to call before the
mmc_pm module_init function has completed running, since the sunxi-rfkill
module_init function may run first.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Merge remote-tracking branch 'sunxi/stage/sunxi-3.4' into work-3.4
1-wire bus platform device for sunxi platforms

This adds a way to register a platform device for 1-wire bus.
It introduces a new section "[w1_para]" in the FEX to configure the
GPIO pin number used for the bus, with the attribute named "gpio".
The GPIO pin must also be defined in the "[gpio_para]" section.

1-wire device can then be accessed using the w1-gpio driver.

Example configuration :
[w1_para]
gpio = 3

[gpio_para]
gpio_used = 1
gpio_num = 3
...
gpio_pin_3 = port:PH7<0><default><default><0>

It is also possible to configure the GPIO pin number with the
module paramerer "gpio". In this case, if the pin is valid,
it will be used instead of what is configured in the FEX script.

Signed-off-by: Damien Nicolet <zardam@gmail.com>
rtc:rtc-sun5i: Chinese comments on RTC driver of sun5i translated to english

Acked-by: Oliver Schinagl (oliver@schinagl.nl)