summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-19ARM: dts: tegra124-apalis: unify display backlight settingsApalis-TK1_Console-Image_3.0b2.65-20190830Philippe Schenker
All displays sold by Toradex have now a common typical frequency for dimming backlight. This commit sets that frequency to 150Hz and put some better brightness values. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2019-08-16ARM: config: apalis-tk1: Make USB a modulePhilippe Schenker
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2019-05-16ASoC: sgtl5000: Heavy anti-pop workOleksandr Suvorov
Add handlers for HP/DAC/ADC power on/off event. Mute outputs on power on/off of any chip block to avoid pops. Improve logic for VAG to power on/off to avoid muxing pops. Fix DAPM widgets' definitions to use new handlers. Related to: #48500 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-14ASoC: Add definition for DAPM up pre/post events setOleksandr Suvorov
Define SND_SOC_DAPM_PRE_POST_PMU to reduce code. Related to: #48500 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Add on/off control for HP/LINE outOleksandr Suvorov
- adding mute/unmute controls for headphone and lineout allows alsa-compatible sound players automatically unmute output port to play music. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Fix leading and trailing popsOleksandr Suvorov
- increase trailing delay after VAG power down to reduce trailing pop; - mute HP/LINE output before VAG power up. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Fix setting power registersOleksandr Suvorov
- set VDDD voltage ONLY if use internal ldo regulator; - assign manually the source of charge pump ONLY if automatic selection can't perform. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Fix enabling ZCD for HP and ADCOleksandr Suvorov
- change HP_ZCD_EN/ADC_ZCD_EN bits only in CHIP_ANA_CTRL register. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Fix control of SMALL_POPOleksandr Suvorov
- define the SMALL_POP as a 1-bit mask, not value; - properly set the SMALL_POP on device probing. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Fix possible dereference crashOleksandr Suvorov
- ldo_regulator_remove() doesn't reset sgtl5000->ldo so it is possible to dereference members of previously freed struct ldo. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-03ASoC: sgtl5000: Name mux control correctlyOleksandr Suvorov
- Name headphone mux related data objects correctly. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-05-02ASoC: sgtl5000: Don't fallback to ldo regulatorOleksandr Suvorov
- the code to fallback to internal ldo regulator instead of external vddd is completely wrong. According to TDM and Errata of sgtl5000 chips revision < 0x11 strongly need to use external vddd due to ER1. For chips revision >= 0x11 there is no limitation to use either external vddd or internal ldo regulator. - fix logical error in cleanup sequence. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-04-26ASoC: sgtl5000: Fix SMALL_POP bit definitionFabio Estevam
commit c251ea7bd7a04f1f2575467e0de76e803cf59149 upstream On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen 5 seconds after the end of a playback. The SMALL_POP bit should fix this, but its definition is incorrect: according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not bit 1. Fix the definition accordingly and enable the bit as intended per the code comment. After applying this change, no loud 'click' sound is heard after playback Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2019-04-26ASoC: sgtl5000: prevent playback to be muted when terminating concurrent captureLothar Waßmann
commit f091f3f07328f75d20a2a5970d1f8b58d95fc990 upstream When a sound capture/playback is terminated while a playback/capture is running, power_vag_event() will clear SGTL5000_CHIP_ANA_POWER in the SND_SOC_DAPM_PRE_PMD event, thus muting the respective other channel. Don't clear SGTL5000_CHIP_ANA_POWER when both DAC and ADC are active to prevent this. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2019-04-26ASoC: sgtl5000: Fix VAG_POWER enabling/disabling orderMarek Vasut
commit dd4d2d6dfb49e8916064f2cb07f0ad7b32a82fb7 upstream The VAG_POWER must be enabled after all other bits in CHIP_ANA_POWER and disabled before any other bit in CHIP_ANA_POWER. See the SGTL5000 datasheet (Table 31, BIT 7, page 42-43). Failing to follow this order will result in ugly loud "POP" noise at the end of playback. To achieve such order, use the _PRE and _POST DAPM widgets to trigger the power_vag_event, where the event type check has to be fixed accordingly as well. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2019-04-24Modify the way vi2 handles frame grabbing.Peter Gielda
(cherry picked from commit 0a8984655b5239833a3e6e0d54c7c867dbc7ea63) This fixes the dual camera use case. Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-04-23apalis-tk1: mmc: enable HS200 mode for eMMCOleksandr Suvorov
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Related to: #40373
2019-04-23mmc: tegra: fix type of flag in KconfigOleksandr Suvorov
Fix a type of flag of disabling HS200 mode on tegra sdhci. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-04-23apalis-tk1: dts: add regulators for eMMCOleksandr Suvorov
Set vddio_sdmmc, vqmmc, vmmc regulators for eMMC. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Related to: #40373
2019-02-06apalis-tk1: dts: we're now using level for can irqApalis-TK1_LXDE-Image_2.8b6.184-20190401Dominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2019-02-06board-apalis-tk1: do not use OTG when using 3.0Dominik Sliwa
If the OTG port is configured for USB 3.0 operation using usb_port_owner_info kernel cmd line argument operate in host mode only. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2019-02-06tegra-xusb: fix module compilationDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2019-01-30apalis-tk1: can: mfd: k20: use level interrupts and prioritize txDominik Sliwa
Prioritize CAN TX trafic, and move from edge to level triggered interrupts. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2019-01-30apalis-tk1: mfd: k20: update supported fw version to 1.4Dominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2018-12-27apalis-tk1: mfd: k20: update supported fw version to 1.3Apalis-TK1_LXDE-Image_2.8b5.156-20181228Dominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-27apalis-tk1: mfd: k20: extra cycles for fifo cleanupDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-27apalis-tk1: mfd: k20: release fw after flashingDominik Sliwa
Previously fw was not released when K20 was flashed successfully Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29gk20a: use kcalloc() to allocate arraysRolf Eike Beer
Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29nvavp: avoid needless string copiesRolf Eike Beer
Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29gk20a: mark gk20a_init_pmu_setup_sw() staticRolf Eike Beer
Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29gk20a: do not BUG if the ioctl size does not matchRolf Eike Beer
Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29xhci-tegra: fix compiler warningsRolf Eike Beer
Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29Tegra: fix potential one byte overflows when calling strncpy()Rolf Eike Beer
Causes build failures with gcc 8. Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29api: fix compatibility of linux/in.h with netinet/in.hStephen Hemminger
u This fixes breakage to iproute2 build with recent kernel headers caused by: commit a263653ed798216c0069922d7b5237ca49436007 Author: Pablo Neira Ayuso <pablo@netfilter.org> Date: Wed Jun 17 10:28:27 2015 -0500 netfilter: don't pull include/linux/netfilter.h from netns headers The issue is that definitions in linux/in.h overlap with those in netinet/in.h. This patch solves this by introducing the same mechanism as was used to solve the same problem with linux/in6.h Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 279c6c7fa64f5763e6b9f05e7ab3840092e702e7)
2018-11-29in6: fix conflict with glibcstephen hemminger
Resolve conflicts between glibc definition of IPV6 socket options and those defined in Linux headers. Looks like earlier efforts to solve this did not cover all the definitions. It resolves warnings during iproute2 build. Please consider for stable as well. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 6d08acd2d32e3e877579315dc3202d7a5f336d98)
2018-11-29net: sync some IP headers with glibcCarlos O'Donell
Solution: ========= - Synchronize linux's `include/uapi/linux/in6.h' with glibc's `inet/netinet/in.h'. - Synchronize glibc's `inet/netinet/in.h with linux's `include/uapi/linux/in6.h'. - Allow including the headers in either other. - First header included defines the structures and macros. Details: ======== The kernel promises not to break the UAPI ABI so I don't see why we can't just have the two userspace headers coordinate? If you include the kernel headers first you get those, and if you include the glibc headers first you get those, and the following patch arranges a coordination and synchronization between the two. Let's handle `include/uapi/linux/in6.h' from linux, and `inet/netinet/in.h' from glibc and ensure they compile in any order and preserve the required ABI. These two patches pass the following compile tests: cat >> test1.c <<EOF int main (void) { return 0; } EOF gcc -c test1.c cat >> test2.c <<EOF int main (void) { return 0; } EOF gcc -c test2.c One wrinkle is that the kernel has a different name for one of the members in ipv6_mreq. In the kernel patch we create a macro to cover the uses of the old name, and while that's not entirely clean it's one of the best solutions (aside from an anonymous union which has other issues). I've reviewed the code and it looks to me like the ABI is assured and everything matches on both sides. Notes: - You want netinet/in.h to include bits/in.h as early as possible, but it needs in_addr so define in_addr early. - You want bits/in.h included as early as possible so you can use the linux specific code to define __USE_KERNEL_DEFS based on the _UAPI_* macro definition and use those to cull in.h. - glibc was missing IPPROTO_MH, added here. Compile tested and inspected. Reported-by: Thomas Backlund <tmb@mageia.org> Cc: Thomas Backlund <tmb@mageia.org> Cc: libc-alpha@sourceware.org Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Cc: David S. Miller <davem@davemloft.net> Tested-by: Cong Wang <amwang@redhat.com> Signed-off-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit cfd280c91253cc28e4919e349fa7a813b63e71e8)
2018-11-29apalis-tk1: lvds: fix dts and allow setting lane4 drive strengthDominik Sliwa
Previously, lvds-drive-strength was located in a wrong node and there was no control of the 5th lane. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29apalis-tk1: proper usb lane and resource assigmentDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29Input: atmel_mxt_ts - fix reset-gpio for level based irqsSebastian Reichel
The current reset-gpio support triggers an interrupt storm on platforms using the maxtouch with level based interrupt. The Motorola Droid 4, which I used for some of the tests is not affected, since it uses a edge based interrupt. This change avoids the interrupt storm by enabling the device while its interrupt is disabled. Afterwards we wait 100ms. This is important for two reasons: The device is unresponsive for some time (~22ms for mxt224E) and the CHG (interrupt) line is not working properly for 100ms. We don't need to wait for any following interrupts, since the following mxt_initialize() checks for bootloader mode anyways. This fixes a boot issue on GE PPD (watchdog kills device due to interrupt storm) and does not cause regression on Motorola Droid 4. Fixes: f657b00df22e ("Input: atmel_mxt_ts - add support for reset line") Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Reviewed-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit ca1cd36cef00260db6b35b32d863e0c580c0488d) Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29apalis-tk1: atmel-mxt-ts reset gpio name changeDominik Sliwa
Align with mainline Atmel MXT driver. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-11-29Input: atmel_mxt_ts - add support for reset lineSebastian Reichel
Provide support for controlling reset pin. If this is not driven correctly the device will be held in reset and will not respond. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit f657b00df22e231da217ca0162a75db452475e8f) Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-10-09Input: atmel_mxt_ts - use more managed resourcesSebastian Reichel
Switch mxt_data and interrupt to resource managed allocation methods, which cleans up the driver slightly and prepares for adding reset GPIO support. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit 8cc8446b9b62ef954b630ed30e53bd1553e916a6)
2018-10-09Input: atmel_mxt_ts - add T100 as a readable objectMaxime Roussin-Bélanger
When using the 'object' sysfs attribute, T100 is not displayed in the output. Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit 089b50d95948f691589cca4d81f1f8761747dbaa)
2018-10-09Input: touchscreen - use local variables consistentlyDominik Sliwa
If a function declares a variable to access a structure element, use it consistently. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit d7ddf15414dd598b9b875664e6b7aebe6c988f5d)
2018-10-09Revert "input: atmel_mxt_ts: support reset gpio line"Dominik Sliwa
This reverts commit 22a2065b9a3fa6ad458e3100b66c4acaa05f2466.
2018-09-27net: igb: implement SIOCSMIIREG and allow SIOCGMIIREG to set pagesApalis-TK1_LXDE-Image_2.8b4.129-20181005Dominik Sliwa
Before SIOCGMIIREG was only able to access page 0 registers. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-09-27bus_client.c: fix build with gcc8Max Krummenacher
/build/krm/oe-core_master/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/video/tegra/host/bus_client.c: In function 'nvhost_channelctl': /build/krm/oe-core_master/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/video/tegra/host/bus_client.c:894:11: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] "%s_%s", dev_name(&pdata->pdev->dev), name); ^ /build/krm/oe-core_master/build/tmp-glibc/work-shared/apalis-tk1/kernel-source/drivers/video/tegra/host/bus_client.c:893:3: note: 'snprintf' output 2 or more bytes (assuming 33) into a destination of size 32 snprintf(set_name, sizeof(set_name), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s_%s", dev_name(&pdata->pdev->dev), name); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-09-27ARM: fix put_user() for gcc-8Arnd Bergmann
Building kernels before linux-4.7 with gcc-8 results in many build failures when gcc triggers a check that was meant to catch broken compilers: /tmp/ccCGMQmS.s:648: Error: .err encountered According to the discussion in the gcc bugzilla, a local "register asm()" variable is still supposed to be the correct way to force an inline assembly to use a particular register, but marking it 'const' lets the compiler do optimizations that break that, i.e the compiler is free to treat the variable as either 'const' or 'register' in that case. Upstream commit 9f73bd8bb445 ("ARM: uaccess: remove put_user() code duplication") fixed this problem in linux-4.8 as part of a larger change, but seems a little too big to be backported to 4.4. Let's take the simplest fix and change only the one broken line in the same way as newer kernels. Suggested-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85745 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86673 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 0ca85fc310e8c24cba10ed241a0188795e177683) /tmp/ccmcXtfu.s: Assembler messages: /tmp/ccmcXtfu.s:1441: Error: .err encountered Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Conflicts: arch/arm/include/asm/uaccess.h
2018-09-27give up on gcc ilog2() constant optimizationsLinus Torvalds
gcc-7 has an "optimization" pass that completely screws up, and generates the code expansion for the (impossible) case of calling ilog2() with a zero constant, even when the code gcc compiles does not actually have a zero constant. And we try to generate a compile-time error for anybody doing ilog2() on a constant where that doesn't make sense (be it zero or negative). So now gcc7 will fail the build due to our sanity checking, because it created that constant-zero case that didn't actually exist in the source code. There's a whole long discussion on the kernel mailing about how to work around this gcc bug. The gcc people themselevs have discussed their "feature" in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 but it's all water under the bridge, because while it looked at one point like it would be solved by the time gcc7 was released, that was not to be. So now we have to deal with this compiler braindamage. And the only simple approach seems to be to just delete the code that tries to warn about bad uses of ilog2(). So now "ilog2()" will just return 0 not just for the value 1, but for any non-positive value too. It's not like I can recall anybody having ever actually tried to use this function on any invalid value, but maybe the sanity check just meant that such code never made it out in public. Reported-by: Laura Abbott <labbott@redhat.com> Cc: John Stultz <john.stultz@linaro.org>, Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 474c90156c8dcc2fa815e6716cc9394d7930cb9c) Conflicts: tools/include/linux/log2.h File does not exist in the 3.1 kernel, change dropped. This helps with the move to GCC 8. | include/linux/log2.h:22:1: error: ignoring attribute 'noreturn' because it conflicts with attribute 'const' [-Werror=attributes] | int ____ilog2_NaN(void); Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-09-27apalis-tk1: mfd: k20: update supported fw version to 1.2Dominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>