Skip to content

Commit 670f089

Browse files
committed
Merge tag 'tag-chrome-platform-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform updates from Tzung-Bi Shih: "Improvements: - Remove shutdown timeout on EC panic for offering the filesystem a chance to sync - Support official HID "GOOG0016" for ChromeOS ACPI Fixes: - Print hex string instead of using "%s" for ACPI_TYPE_BUFFER Misc: - Update MAINTAINERS" * tag 'tag-chrome-platform-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER platform/chrome: chromeos_acpi: support official HID GOOG0016 platform/chrome: cros_ec_lpc: Remove EC panic shutdown timeout MAINTAINERS: update maintainers of chrome-platform
2 parents 6383cb4 + 0820deb commit 670f089

File tree

5 files changed

+52
-8
lines changed

5 files changed

+52
-8
lines changed

Documentation/ABI/testing/sysfs-driver-chromeos-acpi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
What: /sys/bus/platform/devices/GGL0001:*/BINF.2
2+
/sys/bus/platform/devices/GOOG0016:*/BINF.2
23
Date: May 2022
34
KernelVersion: 5.19
45
Description:
@@ -10,6 +11,7 @@ Description:
1011
== ===============================
1112

1213
What: /sys/bus/platform/devices/GGL0001:*/BINF.3
14+
/sys/bus/platform/devices/GOOG0016:*/BINF.3
1315
Date: May 2022
1416
KernelVersion: 5.19
1517
Description:
@@ -23,6 +25,7 @@ Description:
2325
== =====================================
2426

2527
What: /sys/bus/platform/devices/GGL0001:*/CHSW
28+
/sys/bus/platform/devices/GOOG0016:*/CHSW
2629
Date: May 2022
2730
KernelVersion: 5.19
2831
Description:
@@ -38,27 +41,31 @@ Description:
3841
==== ===========================================
3942

4043
What: /sys/bus/platform/devices/GGL0001:*/FMAP
44+
/sys/bus/platform/devices/GOOG0016:*/FMAP
4145
Date: May 2022
4246
KernelVersion: 5.19
4347
Description:
4448
Returns physical memory address of the start of the main
4549
processor firmware flashmap.
4650

4751
What: /sys/bus/platform/devices/GGL0001:*/FRID
52+
/sys/bus/platform/devices/GOOG0016:*/FRID
4853
Date: May 2022
4954
KernelVersion: 5.19
5055
Description:
5156
Returns firmware version for the read-only portion of the
5257
main processor firmware.
5358

5459
What: /sys/bus/platform/devices/GGL0001:*/FWID
60+
/sys/bus/platform/devices/GOOG0016:*/FWID
5561
Date: May 2022
5662
KernelVersion: 5.19
5763
Description:
5864
Returns firmware version for the rewritable portion of the
5965
main processor firmware.
6066

6167
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.0
68+
/sys/bus/platform/devices/GOOG0016:*/GPIO.X/GPIO.0
6269
Date: May 2022
6370
KernelVersion: 5.19
6471
Description:
@@ -73,6 +80,7 @@ Description:
7380
=========== ==================================
7481

7582
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.1
83+
/sys/bus/platform/devices/GOOG0016:*/GPIO.X/GPIO.1
7684
Date: May 2022
7785
KernelVersion: 5.19
7886
Description:
@@ -84,25 +92,29 @@ Description:
8492
== =======================
8593

8694
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.2
95+
/sys/bus/platform/devices/GOOG0016:*/GPIO.X/GPIO.2
8796
Date: May 2022
8897
KernelVersion: 5.19
8998
Description:
9099
Returns the GPIO number on the specified GPIO
91100
controller.
92101

93102
What: /sys/bus/platform/devices/GGL0001:*/GPIO.X/GPIO.3
103+
/sys/bus/platform/devices/GOOG0016:*/GPIO.X/GPIO.3
94104
Date: May 2022
95105
KernelVersion: 5.19
96106
Description:
97107
Returns name of the GPIO controller.
98108

99109
What: /sys/bus/platform/devices/GGL0001:*/HWID
110+
/sys/bus/platform/devices/GOOG0016:*/HWID
100111
Date: May 2022
101112
KernelVersion: 5.19
102113
Description:
103114
Returns hardware ID for the Chromebook.
104115

105116
What: /sys/bus/platform/devices/GGL0001:*/MECK
117+
/sys/bus/platform/devices/GOOG0016:*/MECK
106118
Date: May 2022
107119
KernelVersion: 5.19
108120
Description:
@@ -113,6 +125,7 @@ Description:
113125
present, or if the firmware was unable to read the extended registers, this buffer size can be zero.
114126

115127
What: /sys/bus/platform/devices/GGL0001:*/VBNV.0
128+
/sys/bus/platform/devices/GOOG0016:*/VBNV.0
116129
Date: May 2022
117130
KernelVersion: 5.19
118131
Description:
@@ -122,16 +135,18 @@ Description:
122135
clock data).
123136

124137
What: /sys/bus/platform/devices/GGL0001:*/VBNV.1
138+
/sys/bus/platform/devices/GOOG0016:*/VBNV.1
125139
Date: May 2022
126140
KernelVersion: 5.19
127141
Description:
128142
Return the size in bytes of the verified boot non-volatile
129143
storage block.
130144

131145
What: /sys/bus/platform/devices/GGL0001:*/VDAT
146+
/sys/bus/platform/devices/GOOG0016:*/VDAT
132147
Date: May 2022
133148
KernelVersion: 5.19
134149
Description:
135150
Returns the verified boot data block shared between the
136151
firmware verification step and the kernel verification step
137-
(binary).
152+
(hex dump).

Documentation/firmware-guide/acpi/chromeos-acpi-device.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ Chrome OS ACPI Device
55
=====================
66

77
Hardware functionality specific to Chrome OS is exposed through a Chrome OS ACPI device.
8-
The plug and play ID of a Chrome OS ACPI device is GGL0001. GGL is a valid PNP ID of Google.
9-
PNP ID can be used with the ACPI devices according to the guidelines. The following ACPI
10-
objects are supported:
8+
The plug and play ID of a Chrome OS ACPI device is GGL0001 and the hardware ID is
9+
GOOG0016. The following ACPI objects are supported:
1110

1211
.. flat-table:: Supported ACPI Objects
1312
:widths: 1 2

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4819,6 +4819,7 @@ F: drivers/input/touchscreen/chipone_icn8505.c
48194819

48204820
CHROME HARDWARE PLATFORM SUPPORT
48214821
M: Benson Leung <bleung@chromium.org>
4822+
M: Tzung-Bi Shih <tzungbi@kernel.org>
48224823
L: chrome-platform@lists.linux.dev
48234824
S: Maintained
48244825
T: git git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git

drivers/platform/chrome/chromeos_acpi.c

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,36 @@ static int chromeos_acpi_handle_package(struct device *dev, union acpi_object *o
9090
case ACPI_TYPE_STRING:
9191
return sysfs_emit(buf, "%s\n", element->string.pointer);
9292
case ACPI_TYPE_BUFFER:
93-
return sysfs_emit(buf, "%s\n", element->buffer.pointer);
93+
{
94+
int i, r, at, room_left;
95+
const int byte_per_line = 16;
96+
97+
at = 0;
98+
room_left = PAGE_SIZE - 1;
99+
for (i = 0; i < element->buffer.length && room_left; i += byte_per_line) {
100+
r = hex_dump_to_buffer(element->buffer.pointer + i,
101+
element->buffer.length - i,
102+
byte_per_line, 1, buf + at, room_left,
103+
false);
104+
if (r > room_left)
105+
goto truncating;
106+
at += r;
107+
room_left -= r;
108+
109+
r = sysfs_emit_at(buf, at, "\n");
110+
if (!r)
111+
goto truncating;
112+
at += r;
113+
room_left -= r;
114+
}
115+
116+
buf[at] = 0;
117+
return at;
118+
truncating:
119+
dev_info_once(dev, "truncating sysfs content for %s\n", name);
120+
sysfs_emit_at(buf, PAGE_SIZE - 4, "..\n");
121+
return PAGE_SIZE - 1;
122+
}
94123
default:
95124
dev_err(dev, "element type %d not supported\n", element->type);
96125
return -EINVAL;
@@ -235,9 +264,9 @@ static int chromeos_acpi_device_probe(struct platform_device *pdev)
235264
return 0;
236265
}
237266

238-
/* GGL is valid PNP ID of Google. PNP ID can be used with the ACPI devices. */
239267
static const struct acpi_device_id chromeos_device_ids[] = {
240268
{ "GGL0001", 0 },
269+
{ "GOOG0016", 0 },
241270
{}
242271
};
243272
MODULE_DEVICE_TABLE(acpi, chromeos_device_ids);

drivers/platform/chrome/cros_ec_lpc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data)
327327
dev_emerg(ec_dev->dev, "CrOS EC Panic Reported. Shutdown is imminent!");
328328
blocking_notifier_call_chain(&ec_dev->panic_notifier, 0, ec_dev);
329329
kobject_uevent_env(&ec_dev->dev->kobj, KOBJ_CHANGE, (char **)env);
330-
/* Begin orderly shutdown. Force shutdown after 1 second. */
331-
hw_protection_shutdown("CrOS EC Panic", 1000);
330+
/* Begin orderly shutdown. EC will force reset after a short period. */
331+
hw_protection_shutdown("CrOS EC Panic", -1);
332332
/* Do not query for other events after a panic is reported */
333333
return;
334334
}

0 commit comments

Comments
 (0)