pinctrl: mxs: atomically switch mux and drive strength config
Uwe Kleine-König authored
commit da6c2add upstream.

To set the mux mode of a pin two bits must be set. Up to now this is
implemented using the following idiom:

	writel(mask, reg + CLR);
	writel(value, reg + SET);

. This however results in the mux mode being 0 between the two writes.

On my machine there is an IC's reset pin connected to LCD_D20. The
bootloader configures this pin as GPIO output-high (i.e. not holding the
IC in reset). When Linux reconfigures the pin to GPIO the short time
LCD_D20 is muxed as LCD_D20 instead of GPIO_1_20 is enough to confuse
the connected IC.

The same problem is present for the pin's drive strength setting which is
reset to low drive strength before using the right value.

So instead of relying on the hardware to modify the register setting
using two writes implement the bit toggling using read-modify-write.

Fixes: 17723111 ("pinctrl: add pinctrl-mxs support")
Signed-off-by: Uwe Kleine-König <u.k...
53f806e4
Name Last commit Last update
Documentation mm: larger stack guard gap, between vmas
arch arm: remove wrong CONFIG_PROC_SYSCTL ifdef
block partitions/msdos: FreeBSD UFS2 file systems are not recognized
certs certs: Add a secondary system keyring that can be added to dynamically
crypto crypto: gcm - wait for crypto op not signal safe
drivers pinctrl: mxs: atomically switch mux and drive strength config
firmware WHENCE: use https://linuxtv.org for LinuxTV URLs
fs ceph: choose readdir frag based on previous readdir reply
include usb: Fix typo in the definition of Endpoint[out]Request
init initramfs: avoid "label at end of compound statement" error
ipc Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
kernel tracing/kprobes: Allow to create probe with a module name starting with a digit
lib lib/cmdline.c: fix get_options() overflow while parsing ranges
mm mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings
net esp4: Fix udpencap for local TCP packets.
samples statx: Include a mask for stx_attributes in struct statx
scripts Merge tag 'kbuild-fixes-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
security selinux: fix double free in selinux_parse_opts_str()
sound ALSA: hda - set input_path bitmap to zero after moving it to new place
tools tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
usr kbuild: initramfs cleanup, set target from Kconfig
virt KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
.mailmap mailmap: add Martin Kepplinger's email
COPYING [PATCH] update FSF address in COPYING
CREDITS MAINTAINERS: Remove old e-mail address
Kbuild scripts/gdb: provide linux constants
Kconfig kbuild: migrate all arch to the kconfig mainmenu upgrade
MAINTAINERS bpf, doc: update bpf maintainers entry
Makefile Linux 4.11.9
README README: add a new README file, pointing to the Documentation/
Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.