Skip to content

Commit 4f1d841

Browse files
thierryredingarndb
authored andcommitted
ARM: tegra: Comment out gpio-ranges properties
While the addition of these properties is technically correct it unveils a bug with deferred probe. The problem is that the presence of the gpio- range property causes the gpio-tegra driver to defer probe (it needs the pinctrl driver to be ready). That's technically correct, but it causes a couple of issues: - The keyboard on Chromebooks stops working. The reason for that is that the gpio-tegra device has not registered an IRQ domain by the time the EC SPI device is registered, hence the interrupt number resolves to 0. This is technically a bug in the SPI core, since it should really resolve the interrupt at probe time and defer if the IRQ domain isn't available yet. This is similar to what's done for I2C and platform device already. - The gpio-tegra device deferring probe means that it is moved to the end of the dpm_list. This list defines the suspend/resume order for devices. However the core lacks a way to move all users of the gpio-tegra device to the end of the dpm_list at the same time. This in turn results in a subtle bug on Jetson TK1, where the gpio-keys device is used to expose the power key as input. The power key is a convenient way to wake the system from suspend. Interestingly, the gpio-keys device ends up getting probed at a point after gpio-tegra has been probed successfully from having been deferred earlier. As such the driver doesn't need to defer the probe itself, and hence the device isn't moved to the end of the dpm_list. This causes the gpio-tegra device to be suspended before gpio-keys, which in turn leaves gpio-keys unable to wake the system from suspend. There are patches in the works to fix both of the above issues, but they are too involved to make it into v4.3, so in the meantime let's fix the regressions by commenting out the gpio-ranges properties until the fixes have landed. Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent a787f40 commit 4f1d841

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

arch/arm/boot/dts/tegra114.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@
234234
gpio-controller;
235235
#interrupt-cells = <2>;
236236
interrupt-controller;
237+
/*
237238
gpio-ranges = <&pinmux 0 0 246>;
239+
*/
238240
};
239241

240242
apbmisc@70000800 {

arch/arm/boot/dts/tegra124.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@
258258
gpio-controller;
259259
#interrupt-cells = <2>;
260260
interrupt-controller;
261+
/*
261262
gpio-ranges = <&pinmux 0 0 251>;
263+
*/
262264
};
263265

264266
apbdma: dma@0,60020000 {

arch/arm/boot/dts/tegra20.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@
244244
gpio-controller;
245245
#interrupt-cells = <2>;
246246
interrupt-controller;
247+
/*
247248
gpio-ranges = <&pinmux 0 0 224>;
249+
*/
248250
};
249251

250252
apbmisc@70000800 {

arch/arm/boot/dts/tegra30.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@
349349
gpio-controller;
350350
#interrupt-cells = <2>;
351351
interrupt-controller;
352+
/*
352353
gpio-ranges = <&pinmux 0 0 248>;
354+
*/
353355
};
354356

355357
apbmisc@70000800 {

0 commit comments

Comments
 (0)