[PATCH v4 1/2] kbuild: Add a cache for generated variables

2017-10-16 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. NOTE: This change requires commit fa9acf703d64 ("kbuild: add forward declaration of default target to Makefile.asm-generic") for correctness. Sig

[PATCH v4 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-16 Thread Douglas Anderson
anges - Moved cache stuff below cc-cross-prefix - Removed duplicate documentation of try-run (oops) - Add Tested-by for Ingo and Guenter since v2 and v3 are very similar Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed the first

[PATCH v4 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-16 Thread Douglas Anderson
anges - Moved cache stuff below cc-cross-prefix - Removed duplicate documentation of try-run (oops) - Add Tested-by for Ingo and Guenter since v2 and v3 are very similar Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed the first

[PATCH v4 2/2] kbuild: Cache a few more calls to the compiler

2017-10-16 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[PATCH v4 2/2] kbuild: Cache a few more calls to the compiler

2017-10-16 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[RFC PATCH] kbuild: Allow specifying some base host CFLAGS

2017-10-13 Thread Douglas Anderson
an the kernel so KCFLAGS comes after the kernel's normal flags. One last note: I chose to add new variables rather than just having the build system try to pass HOSTCFLAGS in somehow (either through the environment or the command line) to avoid weird interactions with recursive invocations of make. S

[RFC PATCH] kbuild: Allow specifying some base host CFLAGS

2017-10-13 Thread Douglas Anderson
an the kernel so KCFLAGS comes after the kernel's normal flags. One last note: I chose to add new variables rather than just having the build system try to pass HOSTCFLAGS in somehow (either through the environment or the command line) to avoid weird interactions with recursive invocations of make. S

[PATCH v2 1/5] mmc: dw_mmc: cancel the CTO timer after a voltage switch

2017-10-12 Thread Douglas Anderson
h was done. Let's promote the cancel into the dw_mci_cmd_interrupt() function to fix this. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing <ker...@esmil.dk> Reviewed-by: Shawn Lin <shawn@rock-chip

[PATCH v2 1/5] mmc: dw_mmc: cancel the CTO timer after a voltage switch

2017-10-12 Thread Douglas Anderson
h was done. Let's promote the cancel into the dw_mci_cmd_interrupt() function to fix this. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing Reviewed-by: Shawn Lin Signed-off-by: Douglas Anderson --- Changes i

[PATCH v2 0/5] mmc: dw_mmc: Fix the CTO timer patch, plus the DTO timer

2017-10-12 Thread Douglas Anderson
age to see the 3rd patch doing something useful. Changes in v2: - Removed extra "int i" - Fix the DTO timeout calculation new for v2 - Cleanup the DTO timer new for v2 Douglas Anderson (5): mmc: dw_mmc: cancel the CTO timer after a voltage switch mmc: dw_mmc: Fix the CTO timeout calcu

[PATCH v2 0/5] mmc: dw_mmc: Fix the CTO timer patch, plus the DTO timer

2017-10-12 Thread Douglas Anderson
age to see the 3rd patch doing something useful. Changes in v2: - Removed extra "int i" - Fix the DTO timeout calculation new for v2 - Cleanup the DTO timer new for v2 Douglas Anderson (5): mmc: dw_mmc: cancel the CTO timer after a voltage switch mmc: dw_mmc: Fix the CTO timeout calcu

[PATCH v2 3/5] mmc: dw_mmc: Add locking to the CTO timer

2017-10-12 Thread Douglas Anderson
t it also (on my system) outputs some SELinux log spam. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing <ker...@esmil.dk> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v

[PATCH v2 3/5] mmc: dw_mmc: Add locking to the CTO timer

2017-10-12 Thread Douglas Anderson
t it also (on my system) outputs some SELinux log spam. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing Signed-off-by: Douglas Anderson --- Changes in v2: - Removed extra "i

[PATCH v2 5/5] mmc: dw_mmc: Cleanup the DTO timer like the CTO one

2017-10-12 Thread Douglas Anderson
10 93.886075 We always also were setting the DTO timer _after_ starting the transfer, unlike how the old code was seting the CTO timer. In any case, even though the DTO timer is much less likely to have races, it still makes sense to add code to handle it _just in case_. Signed-off-by: Doug

[PATCH v2 5/5] mmc: dw_mmc: Cleanup the DTO timer like the CTO one

2017-10-12 Thread Douglas Anderson
10 93.886075 We always also were setting the DTO timer _after_ starting the transfer, unlike how the old code was seting the CTO timer. In any case, even though the DTO timer is much less likely to have races, it still makes sense to add code to handle it _just in case_. Signed-off-by: Douglas And

[PATCH v2 2/5] mmc: dw_mmc: Fix the CTO timeout calculation

2017-10-12 Thread Douglas Anderson
dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing <ker...@esmil.dk> Reviewed-by: Shawn Lin <shawn....@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2: None drivers/mmc/host/dw_mmc.c | 6 ++

[PATCH v2 4/5] mmc: dw_mmc: Fix the DTO timeout calculation

2017-10-12 Thread Douglas Anderson
imply by code inspection and I have no failing test cases that are fixed by it. Presumably this could fix real bugs for someone out there, though. Fixes: 16a34574c6ca ("mmc: dw_mmc: remove the quirks flags") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2

[PATCH v2 2/5] mmc: dw_mmc: Fix the CTO timeout calculation

2017-10-12 Thread Douglas Anderson
dw_mmc: introduce timer for broken command transfer over scheme") Tested-by: Emil Renner Berthing Reviewed-by: Shawn Lin Signed-off-by: Douglas Anderson --- Changes in v2: None drivers/mmc/host/dw_mmc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/h

[PATCH v2 4/5] mmc: dw_mmc: Fix the DTO timeout calculation

2017-10-12 Thread Douglas Anderson
imply by code inspection and I have no failing test cases that are fixed by it. Presumably this could fix real bugs for someone out there, though. Fixes: 16a34574c6ca ("mmc: dw_mmc: remove the quirks flags") Signed-off-by: Douglas Anderson --- Changes in v2: - Fix the DTO timeout c

[PATCH v3 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-11 Thread Douglas Anderson
try-run (oops) - Add Tested-by for Ingo and Guenter since v2 and v3 are very similar Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed the first time Douglas Anderson (2): kbuild: Add a cache for generated variables

[PATCH v3 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-11 Thread Douglas Anderson
try-run (oops) - Add Tested-by for Ingo and Guenter since v2 and v3 are very similar Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed the first time Douglas Anderson (2): kbuild: Add a cache for generated variables

[PATCH v3 2/2] kbuild: Cache a few more calls to the compiler

2017-10-11 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[PATCH v3 2/2] kbuild: Cache a few more calls to the compiler

2017-10-11 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[PATCH v3 1/2] kbuild: Add a cache for generated variables

2017-10-11 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. NOTE: This change requires <https://patchwork.kernel.org/patch/9998651/> ("kbuild: add forward declaration of default target to Makefile.asm-gener

[PATCH v3 1/2] kbuild: Add a cache for generated variables

2017-10-11 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. NOTE: This change requires <https://patchwork.kernel.org/patch/9998651/> ("kbuild: add forward declaration of default target to Makefile.asm-generi

[PATCH v2 1/2] kbuild: Add a cache for generated variables

2017-10-04 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include l

[PATCH v2 1/2] kbuild: Add a cache for generated variables

2017-10-04 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. Signed-off-by: Douglas Anderson --- Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed t

[PATCH v2 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-04 Thread Douglas Anderson
l (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed the first time Douglas Anderson (2): kbuild: Add a cache for generated variables kbuild: Cache a few more calls to the compiler Documentation/kbuild/makefiles.txt | 21 + Makefile |

[PATCH v2 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-04 Thread Douglas Anderson
l (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed the first time Douglas Anderson (2): kbuild: Add a cache for generated variables kbuild: Cache a few more calls to the compiler Documentation/kbuild/makefiles.txt | 21 + Makefile |

[PATCH v2 2/2] kbuild: Cache a few more calls to the compiler

2017-10-04 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[PATCH v2 2/2] kbuild: Cache a few more calls to the compiler

2017-10-04 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[RFC PATCH 0/2] build: Pass CC, CFLAGS, ... to tools build from main Makefile

2017-10-03 Thread Douglas Anderson
many of my colleagues are), so I haven't confirmed that this is actually useful to clang. It just seemed like a good fix. I also continue to assert that I'm not a kernel build expert, so I've marked this as RFC in the hopes that people will not scream too loudly if this is a stupid thing to do. ;-) Dougl

[RFC PATCH 0/2] build: Pass CC, CFLAGS, ... to tools build from main Makefile

2017-10-03 Thread Douglas Anderson
many of my colleagues are), so I haven't confirmed that this is actually useful to clang. It just seemed like a good fix. I also continue to assert that I'm not a kernel build expert, so I've marked this as RFC in the hopes that people will not scream too loudly if this is a stupid thing to do. ;-) Dougl

[RFC PATCH 1/2] kbuild: Pass HOSTCC and similar to tools Makefiles

2017-10-03 Thread Douglas Anderson
FLAGS so it was never an issue. Turning on STACKVALIDATION, however, suddenly invoked a tools build that blew up. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Makefile | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Makefile b/Ma

[RFC PATCH 1/2] kbuild: Pass HOSTCC and similar to tools Makefiles

2017-10-03 Thread Douglas Anderson
FLAGS so it was never an issue. Turning on STACKVALIDATION, however, suddenly invoked a tools build that blew up. Signed-off-by: Douglas Anderson --- Makefile | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cf007a31d575..0d3af0677

[RFC PATCH 2/2] tools build: Take CC, AS, and LD from the command line

2017-10-03 Thread Douglas Anderson
allows us to properly get the HOST C Compiler used when the main kernel Makefile calls into the tools. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- tools/scripts/Makefile.include | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tools/scripts/

[RFC PATCH 2/2] tools build: Take CC, AS, and LD from the command line

2017-10-03 Thread Douglas Anderson
allows us to properly get the HOST C Compiler used when the main kernel Makefile calls into the tools. Signed-off-by: Douglas Anderson --- tools/scripts/Makefile.include | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tools/scripts/Makefile.include b/too

[PATCH] phy: rockchip-typec: Check for errors from tcphy_phy_init()

2017-09-29 Thread Douglas Anderson
ld account for it. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/phy/rockchip/phy-rockchip-typec.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c in

[PATCH] phy: rockchip-typec: Check for errors from tcphy_phy_init()

2017-09-29 Thread Douglas Anderson
ld account for it. Signed-off-by: Douglas Anderson --- drivers/phy/rockchip/phy-rockchip-typec.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index 4d2c57f21d76..38831eebc934 100644 ---

[PATCH] ASoC: rockchip: Allocate enough memory so we don't overflow routes

2017-09-29 Thread Douglas Anderson
that we don't overrun memory even if we encounter some sort of weird device tree. Fixes: d9f9c167edae ("ASoC: rockchip: Init dapm routes dynamically") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- sound/soc/rockchip/rk3399_gru_sound.c | 12 +++- 1 file changed,

[PATCH] ASoC: rockchip: Allocate enough memory so we don't overflow routes

2017-09-29 Thread Douglas Anderson
that we don't overrun memory even if we encounter some sort of weird device tree. Fixes: d9f9c167edae ("ASoC: rockchip: Init dapm routes dynamically") Signed-off-by: Douglas Anderson --- sound/soc/rockchip/rk3399_gru_sound.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion

[PATCH 3/3] mmc: dw_mmc: Add locking to the CTO timer

2017-09-27 Thread Douglas Anderson
t it also (on my system) outputs some SELinux log spam. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/mmc/host/dw_mmc.c | 92 +++

[PATCH 3/3] mmc: dw_mmc: Add locking to the CTO timer

2017-09-27 Thread Douglas Anderson
t it also (on my system) outputs some SELinux log spam. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Signed-off-by: Douglas Anderson --- drivers/mmc/host/dw_mmc.c | 92 +-- 1 file changed, 82 ins

[PATCH 0/3] mmc: dw_mmc: Fix the CTO timer patch

2017-09-27 Thread Douglas Anderson
e the need for the CTO timer on one of my devices and so I can confirm that part still works. As mentioned in the 3rd patch I also ran the mmc_test kernel module on this and did manage to see the 3rd patch doing something useful. Douglas Anderson (3): mmc: dw_mmc: cancel the CTO timer after a voltage sw

[PATCH 0/3] mmc: dw_mmc: Fix the CTO timer patch

2017-09-27 Thread Douglas Anderson
e the need for the CTO timer on one of my devices and so I can confirm that part still works. As mentioned in the 3rd patch I also ran the mmc_test kernel module on this and did manage to see the 3rd patch doing something useful. Douglas Anderson (3): mmc: dw_mmc: cancel the CTO timer after a voltage sw

[PATCH 2/3] mmc: dw_mmc: Fix the CTO timeout calculation

2017-09-27 Thread Douglas Anderson
dw_mmc: introduce timer for broken command transfer over scheme") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/mmc/host/dw_mmc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index f5b2b

[PATCH 2/3] mmc: dw_mmc: Fix the CTO timeout calculation

2017-09-27 Thread Douglas Anderson
dw_mmc: introduce timer for broken command transfer over scheme") Signed-off-by: Douglas Anderson --- drivers/mmc/host/dw_mmc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index f5b2bb4b4d98..16516c528a88 1006

[PATCH 1/3] mmc: dw_mmc: cancel the CTO timer after a voltage switch

2017-09-27 Thread Douglas Anderson
h was done. Let's promote the cancel into the dw_mci_cmd_interrupt() function to fix this. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/mmc/host/dw_mmc.c | 3 ++- 1

[PATCH 1/3] mmc: dw_mmc: cancel the CTO timer after a voltage switch

2017-09-27 Thread Douglas Anderson
h was done. Let's promote the cancel into the dw_mci_cmd_interrupt() function to fix this. Fixes: 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") Signed-off-by: Douglas Anderson --- drivers/mmc/host/dw_mmc.c | 3 ++- 1 file changed, 2 inser

[RFC PATCH 2/2] kbuild: Cache a few more calls to the compiler

2017-09-26 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[RFC PATCH 2/2] kbuild: Cache a few more calls to the compiler

2017-09-26 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[RFC PATCH 1/2] kbuild: Add a cache for generated variables

2017-09-26 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. The cache will be cleaned by virtue of the ".o" suffix by a "make clean". Signed-off-by: Douglas Anderson <diand...@chromium.org> -

[RFC PATCH 0/2] kbuild: Cache exploratory calls to the compiler

2017-09-26 Thread Douglas Anderson
ed some extra escaping here and there. Douglas Anderson (2): kbuild: Add a cache for generated variables kbuild: Cache a few more calls to the compiler Documentation/kbuild/makefiles.txt | 21 ++ Makefile | 9 ++- scripts/Kbuild.include

[RFC PATCH 1/2] kbuild: Add a cache for generated variables

2017-09-26 Thread Douglas Anderson
it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. The cache will be cleaned by virtue of the ".o" suffix by a "make clean". Signed-off-by: Douglas Anderson --- Documentation/kbuil

[RFC PATCH 0/2] kbuild: Cache exploratory calls to the compiler

2017-09-26 Thread Douglas Anderson
ed some extra escaping here and there. Douglas Anderson (2): kbuild: Add a cache for generated variables kbuild: Cache a few more calls to the compiler Documentation/kbuild/makefiles.txt | 21 ++ Makefile | 9 ++- scripts/Kbuild.include

[PATCH v3 1/4] phy: rockchip-typec: Set the AUX channel flip state earlier

2017-09-22 Thread Douglas Anderson
_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh <sha...@chromium.org> Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v3: None Changes in v2: No

[PATCH v3 1/4] phy: rockchip-typec: Set the AUX channel flip state earlier

2017-09-22 Thread Douglas Anderson
_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- Changes in v3: None Changes in v2: None drivers/phy/rockchip/phy-rockchip-typec.c | 62 +--

[PATCH v3 0/4] phy: rockchip-typec: Set "flip" properly; some cleanups; fix swing

2017-09-22 Thread Douglas Anderson
d rather I didn't do that, please yell. Changes in v3: - Voltage swing patch now patch 2. Changes in v2: - Voltage swing patch new for v2. - Removed extra blank line. Douglas Anderson (4): phy: rockchip-typec: Set the AUX channel flip state earlier phy: rockchip-typec: Don't set the aux vol

[PATCH v3 0/4] phy: rockchip-typec: Set "flip" properly; some cleanups; fix swing

2017-09-22 Thread Douglas Anderson
d rather I didn't do that, please yell. Changes in v3: - Voltage swing patch now patch 2. Changes in v2: - Voltage swing patch new for v2. - Removed extra blank line. Douglas Anderson (4): phy: rockchip-typec: Set the AUX channel flip state earlier phy: rockchip-typec: Don't set the aux vol

[PATCH v3 2/4] phy: rockchip-typec: Don't set the aux voltage swing to 400 mV

2017-09-22 Thread Douglas Anderson
lution. Tightening signals to give cleaner waveforms can often have adverse affects, like increasing EMI or adding noise to other signals. I'd rather not tune things like this without a healthy application of expertise that I don't have. Signed-off-by: Douglas Anderson <diand...@chro

[PATCH v3 2/4] phy: rockchip-typec: Don't set the aux voltage swing to 400 mV

2017-09-22 Thread Douglas Anderson
lution. Tightening signals to give cleaner waveforms can often have adverse affects, like increasing EMI or adding noise to other signals. I'd rather not tune things like this without a healthy application of expertise that I don't have. Signed-off-by: Douglas Anderson --- Changes in

[PATCH v3 4/4] phy: rockchip-typec: Do the calibration more correctly

2017-09-22 Thread Douglas Anderson
the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v3: None Changes in v2: - Removed extra blank line. drivers/phy/

[PATCH v3 4/4] phy: rockchip-typec: Do the calibration more correctly

2017-09-22 Thread Douglas Anderson
the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- Changes in v3: None Changes in v2: - Removed extra blank line. drivers/phy/rockchip/phy-rockchip-typec.c | 27

[PATCH v3 3/4] phy: rockchip-typec: Avoid magic numbers + add delays in aux calib

2017-09-22 Thread Douglas Anderson
lowup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v3: None Changes in v2: No

[PATCH v3 3/4] phy: rockchip-typec: Avoid magic numbers + add delays in aux calib

2017-09-22 Thread Douglas Anderson
lowup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- Changes in v3: None Changes in v2: None drivers/phy/rockchip/phy-rockchip-typec.c | 202 +++

[PATCH v2 1/4] phy: rockchip-typec: Set the AUX channel flip state earlier

2017-09-19 Thread Douglas Anderson
_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh <sha...@chromium.org> Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2: None drivers/

[PATCH v2 0/4] phy: rockchip-typec: Set "flip" properly; some cleanups; fix swing

2017-09-19 Thread Douglas Anderson
d rather I didn't do that, please yell. Changes in v2: - Removed extra blank line - Voltage swing patch new for v2. Douglas Anderson (4): phy: rockchip-typec: Set the AUX channel flip state earlier phy: rockchip-typec: Avoid magic numbers + add delays in aux calib phy: rockchip-typec: Do the c

[PATCH v2 3/4] phy: rockchip-typec: Do the calibration more correctly

2017-09-19 Thread Douglas Anderson
the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2: - Removed extra blank line drivers/phy/rockchip/phy-rockchip-

[PATCH v2 3/4] phy: rockchip-typec: Do the calibration more correctly

2017-09-19 Thread Douglas Anderson
the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- Changes in v2: - Removed extra blank line drivers/phy/rockchip/phy-rockchip-typec.c | 27 ++- 1 file changed, 18

[PATCH v2 1/4] phy: rockchip-typec: Set the AUX channel flip state earlier

2017-09-19 Thread Douglas Anderson
_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- Changes in v2: None drivers/phy/rockchip/phy-rockchip-typec.c | 62 +-- 1 file changed,

[PATCH v2 0/4] phy: rockchip-typec: Set "flip" properly; some cleanups; fix swing

2017-09-19 Thread Douglas Anderson
d rather I didn't do that, please yell. Changes in v2: - Removed extra blank line - Voltage swing patch new for v2. Douglas Anderson (4): phy: rockchip-typec: Set the AUX channel flip state earlier phy: rockchip-typec: Avoid magic numbers + add delays in aux calib phy: rockchip-typec: Do the c

[PATCH v2 4/4] phy: rockchip-typec: Don't set the aux voltage swing to 400 mV

2017-09-19 Thread Douglas Anderson
lution. Tightening signals to give cleaner waveforms can often have adverse affects, like increasing EMI or adding noise to other signals. I'd rather not tune things like this without a healthy application of expertise that I don't have. Signed-off-by: Douglas Anderson <diand...@chro

[PATCH v2 4/4] phy: rockchip-typec: Don't set the aux voltage swing to 400 mV

2017-09-19 Thread Douglas Anderson
lution. Tightening signals to give cleaner waveforms can often have adverse affects, like increasing EMI or adding noise to other signals. I'd rather not tune things like this without a healthy application of expertise that I don't have. Signed-off-by: Douglas Anderson --- Changes in

[PATCH v2 2/4] phy: rockchip-typec: Avoid magic numbers + add delays in aux calib

2017-09-19 Thread Douglas Anderson
lowup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2: No

[PATCH v2 2/4] phy: rockchip-typec: Avoid magic numbers + add delays in aux calib

2017-09-19 Thread Douglas Anderson
lowup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- Changes in v2: None drivers/phy/rockchip/phy-rockchip-typec.c | 203 -

[RFC PATCH 3/3] usbnet: Fix memory leak when rx_submit() fails

2017-09-19 Thread Douglas Anderson
If rx_submit() returns an error code then nobody calls usb_free_urb(). That means it's leaked. NOTE: This problem was found solely by code inspection and not due to any failing test cases. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/net/usb/usbnet.c | 9 ++

[RFC PATCH 3/3] usbnet: Fix memory leak when rx_submit() fails

2017-09-19 Thread Douglas Anderson
If rx_submit() returns an error code then nobody calls usb_free_urb(). That means it's leaked. NOTE: This problem was found solely by code inspection and not due to any failing test cases. Signed-off-by: Douglas Anderson --- drivers/net/usb/usbnet.c | 9 ++--- 1 file changed, 6 insertions

[RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Douglas Anderson
worth of data and probably never fails. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/net/usb/usbnet.c | 50 +--- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb

[RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Douglas Anderson
worth of data and probably never fails. Signed-off-by: Douglas Anderson --- drivers/net/usb/usbnet.c | 50 +--- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index a3e8dbaadcf9..e

[RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Douglas Anderson
the types of work need to be repeated if usbnet_defer_kevent() is called multiple times then that should be quite easy to accomplish without dropping any work on the floor. We can just keep an atomic count for that type of work and add a loop into usbnet_deferred_kevent(). Signed-off-by: Douglas Ander

[RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Douglas Anderson
the types of work need to be repeated if usbnet_defer_kevent() is called multiple times then that should be quite easy to accomplish without dropping any work on the floor. We can just keep an atomic count for that type of work and add a loop into usbnet_deferred_kevent(). Signed-off-by: Dougla

[PATCH 1/3] phy: rockchip-typec: Set the AUX channel flip state earlier

2017-09-06 Thread Douglas Anderson
_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh <sha...@chromium.org> Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/

[PATCH 1/3] phy: rockchip-typec: Set the AUX channel flip state earlier

2017-09-06 Thread Douglas Anderson
_REG_1 is documented to be 0x0 after reset. This was also confirmed by printk. Suggested-by: Shawn Nematbakhsh Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- drivers/phy/rockchip/phy-rockchip-typec.c | 62 +-- 1 file changed, 42 insertions(+), 20 dele

[PATCH 2/3] phy: rockchip-typec: Avoid magic numbers + add delays in aux calib

2017-09-06 Thread Douglas Anderson
lowup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/phy/rockchip/phy-rockchip-typec.c

[PATCH 2/3] phy: rockchip-typec: Avoid magic numbers + add delays in aux calib

2017-09-06 Thread Douglas Anderson
lowup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- drivers/phy/rockchip/phy-rockchip-typec.c | 203 -- 1 file changed, 164 in

[PATCH 0/3] phy: rockchip-typec: Set "flip" at the right time; some cleanups

2017-09-06 Thread Douglas Anderson
dded Chris Zhong's Reviewed-by tags since he gave a +1 to nearly identical patches on the Chrome OS gerrit and I didn't think he'd mind me carrying his tag. If folks would rather I didn't do that, please yell. Douglas Anderson (3): phy: rockchip-typec: Set the AUX channel flip state earlier phy

[PATCH 0/3] phy: rockchip-typec: Set "flip" at the right time; some cleanups

2017-09-06 Thread Douglas Anderson
dded Chris Zhong's Reviewed-by tags since he gave a +1 to nearly identical patches on the Chrome OS gerrit and I didn't think he'd mind me carrying his tag. If folks would rather I didn't do that, please yell. Douglas Anderson (3): phy: rockchip-typec: Set the AUX channel flip state earlier phy

[PATCH 3/3] phy: rockchip-typec: Do the calibration more correctly

2017-09-06 Thread Douglas Anderson
the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong <z...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/phy/rockchip/phy-rockchip-typec.c | 28 +++- 1

[PATCH 3/3] phy: rockchip-typec: Do the calibration more correctly

2017-09-06 Thread Douglas Anderson
the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson --- drivers/phy/rockchip/phy-rockchip-typec.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git

[PATCH] USB: core: Avoid race of async_completed() w/ usbdev_release()

2017-08-10 Thread Douglas Anderson
ffc0cc042080 mtpd-20553 13759487us : async_getcompleted before spin_lock_irqsave mtpd-20553 13759497us!: usbdev_release after kfree(ps): ps=ffc0cc042080 <...>-2104 0d.h2 13760294us : async_completed before wake_up(): as=ffc0cc638200 To fix this problem we can just mov

[PATCH] USB: core: Avoid race of async_completed() w/ usbdev_release()

2017-08-10 Thread Douglas Anderson
ffc0cc042080 mtpd-20553 13759487us : async_getcompleted before spin_lock_irqsave mtpd-20553 13759497us!: usbdev_release after kfree(ps): ps=ffc0cc042080 <...>-2104 0d.h2 13760294us : async_completed before wake_up(): as=ffc0cc638200 To fix this problem we can just move

[PATCH] pstore: Fix leaked pstore_record in pstore_get_backend_records()

2017-05-30 Thread Douglas Anderson
When the "if (record->size <= 0)" test is true in pstore_get_backend_records() it's pretty clear that nobody holds a reference to the allocated pstore_record, yet we don't free it. Let's free it. Fixes: 2a2b0acf768c ("pstore: Allocate records on heap instead of stack&quo

[PATCH] pstore: Fix leaked pstore_record in pstore_get_backend_records()

2017-05-30 Thread Douglas Anderson
When the "if (record->size <= 0)" test is true in pstore_get_backend_records() it's pretty clear that nobody holds a reference to the allocated pstore_record, yet we don't free it. Let's free it. Fixes: 2a2b0acf768c ("pstore: Allocate records on heap instead of stack&quo

[RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used

2017-05-30 Thread Douglas Anderson
f avoiding an error path in the init code. Note that the saving code that we're removing (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson <diand...@chromiu

[RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used

2017-05-30 Thread Douglas Anderson
f avoiding an error path in the init code. Note that the saving code that we're removing (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson --- This problem wa

[RFC PATCH] ASoC: Intel: sst: Delete sst_save_shim64(); saved regs are never used

2017-05-26 Thread Douglas Anderson
rs we were storing data in. Note that the saving code (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson <diand...@chromium.org> --- This problem was fou

[RFC PATCH] ASoC: Intel: sst: Delete sst_save_shim64(); saved regs are never used

2017-05-26 Thread Douglas Anderson
rs we were storing data in. Note that the saving code (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson --- This problem was found only by code inspection and

[PATCH 1/3] ASoC: rt5514: Mark rt5514_i2c_driver as static

2017-04-14 Thread Douglas Anderson
There's no reason for rt5514_i2c_driver to be non-static. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- sound/soc/codecs/rt5514.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c index b281a4

[PATCH 3/3] ASoC: rt5514: Unconfuse the rt5514 at probe / resume time

2017-04-14 Thread Douglas Anderson
believed that this problem should be fixed in the rt5514 driver itself because it seems that the i2c controller in the rt5514 is easily confused. Most i2c devices wouldn't detect a start bit in this case. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- sound/soc/codecs/rt5514.

[PATCH 2/3] ASoC: rt5514: Avoid relying on uninitialized "val" value

2017-04-14 Thread Douglas Anderson
do we're not passing a possibly uninitialized int to printk. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- sound/soc/codecs/rt5514.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c index 481e777

<    4   5   6   7   8   9   10   11   12   13   >