History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform

Pull chrome platform cleanups and improvements from Olof Johansson: - Use deferred probing on Chrome OS platforms for the i2c device registration. This fixes a long-standing race of initialization of touchpad/screen on Chromebooks. - Added in platform device registration for pstore console on supported hardware - Misc smaller fixes (__initdata, module exit cleanup, etc) * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform: platform/chrome: unregister platform driver/device when module exit platform/chrome: Make i2c_adapter_names static platform/chrome: chromeos_laptop - fix incorrect placement of __initdata tag platform/chrome: chromeos_laptop - Use deferred probing platform/chrome: chromeos_laptop - Restructure device associations platform/chrome: Add pstore platform_device

Linus Torvalds committed 12 years ago

Commit e9e352e2 parents b3a4bca 2b8454a4 files · +323 −91Browse files

Unified · Split

4 files
  1. drivers/platform/chrome/Kconfig +14 −0
  2. drivers/platform/chrome/Makefile +1 −0
  3. drivers/platform/chrome/chromeos_laptop.c +207 −91
  4. drivers/platform/chrome/chromeos_pstore.c +101 −0
drivers/platform/chrome/Kconfig+14−0
@@ -25,4 +25,18 @@ config CHROMEOS_LAPTOP · 24 unmodified lines
2525 If you have a supported Chromebook, choose Y or M here.
2626 The module will be called chromeos_laptop.
2727
28+config CHROMEOS_PSTORE
29+ tristate "Chrome OS pstore support"
30+ ---help---
31+ This module instantiates the persistent storage on x86 ChromeOS
32+ devices. It can be used to store away console logs and crash
33+ information across reboots.
34+
35+ The range of memory used is 0xf00000-0x1000000, traditionally
36+ the memory used to back VGA controller memory.
37+
38+ If you have a supported Chromebook, choose Y or M here.
39+ The module will be called chromeos_pstore.
40+
41+
2842 endif # CHROMEOS_PLATFORMS
drivers/platform/chrome/Makefile+1−0
@@ -1,2 +1,3 @@
11
22 obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o
3+obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o
drivers/platform/chrome/chromeos_laptop.c+207−91
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include <linux/input.h>
2828 #include <linux/interrupt.h>
2929 #include <linux/module.h>
30+#include <linux/platform_device.h>
3031
3132 #define ATMEL_TP_I2C_ADDR 0x4b
3233 #define ATMEL_TP_I2C_BL_ADDR 0x25
@@ -40,7 +41,7 @@ static struct i2c_client *als; · 7 unmodified lines
4041 static struct i2c_client *tp;
4142 static struct i2c_client *ts;
4243
43−const char *i2c_adapter_names[] = {
44+static const char *i2c_adapter_names[] = {
4445 "SMBus I801 adapter",
4546 "i915 gmbus vga",
4647 "i915 gmbus panel",
@@ -53,20 +54,33 @@ enum i2c_adapter_type { · 6 unmodified lines
5354 I2C_ADAPTER_PANEL,
5455 };
5556
56−static struct i2c_board_info __initdata cyapa_device = {
57+struct i2c_peripheral {
58+ int (*add)(enum i2c_adapter_type type);
59+ enum i2c_adapter_type type;
60+};
61+
62+#define MAX_I2C_PERIPHERALS 3
63+
64+struct chromeos_laptop {
65+ struct i2c_peripheral i2c_peripherals[MAX_I2C_PERIPHERALS];
66+};
67+
68+static struct chromeos_laptop *cros_laptop;
69+
70+static struct i2c_board_info cyapa_device = {
5771 I2C_BOARD_INFO("cyapa", CYAPA_TP_I2C_ADDR),
5872 .flags = I2C_CLIENT_WAKE,
5973 };
6074
61−static struct i2c_board_info __initdata isl_als_device = {
75+static struct i2c_board_info isl_als_device = {
6276 I2C_BOARD_INFO("isl29018", ISL_ALS_I2C_ADDR),
6377 };
6478
65−static struct i2c_board_info __initdata tsl2583_als_device = {
79+static struct i2c_board_info tsl2583_als_device = {
6680 I2C_BOARD_INFO("tsl2583", TAOS_ALS_I2C_ADDR),
6781 };
6882
69−static struct i2c_board_info __initdata tsl2563_als_device = {
83+static struct i2c_board_info tsl2563_als_device = {
7084 I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR),
7185 };
7286
@@ -89,7 +103,7 @@ static struct mxt_platform_data atmel_224s_tp_platform_data = { · 16 unmodified lines
89103 .config_length = 0,
90104 };
91105
92−static struct i2c_board_info __initdata atmel_224s_tp_device = {
106+static struct i2c_board_info atmel_224s_tp_device = {
93107 I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR),
94108 .platform_data = &atmel_224s_tp_platform_data,
95109 .flags = I2C_CLIENT_WAKE,
@@ -110,13 +124,13 @@ static struct mxt_platform_data atmel_1664s_platform_data = { · 14 unmodified lines
110124 .config_length = 0,
111125 };
112126
113−static struct i2c_board_info __initdata atmel_1664s_device = {
127+static struct i2c_board_info atmel_1664s_device = {
114128 I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR),
115129 .platform_data = &atmel_1664s_platform_data,
116130 .flags = I2C_CLIENT_WAKE,
117131 };
118132
119−static struct i2c_client __init *__add_probed_i2c_device(
133+static struct i2c_client *__add_probed_i2c_device(
120134 const char *name,
121135 int bus,
122136 struct i2c_board_info *info,
@@ -169,7 +183,7 @@ static struct i2c_client __init *__add_probed_i2c_device( · 46 unmodified lines
169183 return client;
170184 }
171185
172−static int __init __find_i2c_adap(struct device *dev, void *data)
186+static int __find_i2c_adap(struct device *dev, void *data)
173187 {
174188 const char *name = data;
175189 static const char *prefix = "i2c-";
@@ -180,7 +194,7 @@ static int __init __find_i2c_adap(struct device *dev, void *data) · 4 unmodified lines
180194 return (strncmp(adapter->name, name, strlen(name)) == 0);
181195 }
182196
183−static int __init find_i2c_adapter_num(enum i2c_adapter_type type)
197+static int find_i2c_adapter_num(enum i2c_adapter_type type)
184198 {
185199 struct device *dev = NULL;
186200 struct i2c_adapter *adapter;
@@ -189,8 +203,9 @@ static int __init find_i2c_adapter_num(enum i2c_adapter_type type) · 2 unmodified lines
189203 dev = bus_find_device(&i2c_bus_type, NULL, (void *)name,
190204 __find_i2c_adap);
191205 if (!dev) {
192− pr_err("%s: i2c adapter %s not found on system.\n", __func__,
193− name);
206+ /* Adapters may appear later. Deferred probing will retry */
207+ pr_notice("%s: i2c adapter %s not found on system.\n", __func__,
208+ name);
194209 return -ENODEV;
195210 }
196211 adapter = to_i2c_adapter(dev);
@@ -205,7 +220,7 @@ static int __init find_i2c_adapter_num(enum i2c_adapter_type type) · 8 unmodified lines
205220 * Returns NULL if no devices found.
206221 * See Documentation/i2c/instantiating-devices for more information.
207222 */
208−static __init struct i2c_client *add_probed_i2c_device(
223+static struct i2c_client *add_probed_i2c_device(
209224 const char *name,
210225 enum i2c_adapter_type type,
211226 struct i2c_board_info *info,
@@ -222,7 +237,7 @@ static __init struct i2c_client *add_probed_i2c_device( · 10 unmodified lines
222237 * info->addr.
223238 * Returns NULL if no device found.
224239 */
225−static __init struct i2c_client *add_i2c_device(const char *name,
240+static struct i2c_client *add_i2c_device(const char *name,
226241 enum i2c_adapter_type type,
227242 struct i2c_board_info *info)
228243 {
@@ -233,161 +248,259 @@ static __init struct i2c_client *add_i2c_device(const char *name, · 4 unmodified lines
233248 addr_list);
234249 }
235250
236−
237−static struct i2c_client __init *add_smbus_device(const char *name,
238− struct i2c_board_info *info)
251+static int setup_cyapa_tp(enum i2c_adapter_type type)
239252 {
240− return add_i2c_device(name, I2C_ADAPTER_SMBUS, info);
241−}
253+ if (tp)
254+ return 0;
242255
243−static int __init setup_cyapa_smbus_tp(const struct dmi_system_id *id)
244−{
245− /* add cyapa touchpad on smbus */
246− tp = add_smbus_device("trackpad", &cyapa_device);
247− return 0;
256+ /* add cyapa touchpad */
257+ tp = add_i2c_device("trackpad", type, &cyapa_device);
258+ return (!tp) ? -EAGAIN : 0;
248259 }
249260
250−static int __init setup_atmel_224s_tp(const struct dmi_system_id *id)
261+static int setup_atmel_224s_tp(enum i2c_adapter_type type)
251262 {
252263 const unsigned short addr_list[] = { ATMEL_TP_I2C_BL_ADDR,
253264 ATMEL_TP_I2C_ADDR,
254265 I2C_CLIENT_END };
266+ if (tp)
267+ return 0;
255268
256− /* add atmel mxt touchpad on VGA DDC GMBus */
257− tp = add_probed_i2c_device("trackpad", I2C_ADAPTER_VGADDC,
269+ /* add atmel mxt touchpad */
270+ tp = add_probed_i2c_device("trackpad", type,
258271 &atmel_224s_tp_device, addr_list);
259− return 0;
272+ return (!tp) ? -EAGAIN : 0;
260273 }
261274
262−static int __init setup_atmel_1664s_ts(const struct dmi_system_id *id)
275+static int setup_atmel_1664s_ts(enum i2c_adapter_type type)
263276 {
264277 const unsigned short addr_list[] = { ATMEL_TS_I2C_BL_ADDR,
265278 ATMEL_TS_I2C_ADDR,
266279 I2C_CLIENT_END };
280+ if (ts)
281+ return 0;
267282
268− /* add atmel mxt touch device on PANEL GMBus */
269− ts = add_probed_i2c_device("touchscreen", I2C_ADAPTER_PANEL,
283+ /* add atmel mxt touch device */
284+ ts = add_probed_i2c_device("touchscreen", type,
270285 &atmel_1664s_device, addr_list);
271− return 0;
286+ return (!ts) ? -EAGAIN : 0;
272287 }
273288
274−
275−static int __init setup_isl29018_als(const struct dmi_system_id *id)
289+static int setup_isl29018_als(enum i2c_adapter_type type)
276290 {
291+ if (als)
292+ return 0;
293+
277294 /* add isl29018 light sensor */
278− als = add_smbus_device("lightsensor", &isl_als_device);
279− return 0;
295+ als = add_i2c_device("lightsensor", type, &isl_als_device);
296+ return (!als) ? -EAGAIN : 0;
280297 }
281298
282−static int __init setup_isl29023_als(const struct dmi_system_id *id)
299+static int setup_tsl2583_als(enum i2c_adapter_type type)
283300 {
284− /* add isl29023 light sensor on Panel GMBus */
285− als = add_i2c_device("lightsensor", I2C_ADAPTER_PANEL,
286− &isl_als_device);
287− return 0;
301+ if (als)
302+ return 0;
303+
304+ /* add tsl2583 light sensor */
305+ als = add_i2c_device(NULL, type, &tsl2583_als_device);
306+ return (!als) ? -EAGAIN : 0;
288307 }
289308
290−static int __init setup_tsl2583_als(const struct dmi_system_id *id)
309+static int setup_tsl2563_als(enum i2c_adapter_type type)
291310 {
292− /* add tsl2583 light sensor on smbus */
293− als = add_smbus_device(NULL, &tsl2583_als_device);
294− return 0;
311+ if (als)
312+ return 0;
313+
314+ /* add tsl2563 light sensor */
315+ als = add_i2c_device(NULL, type, &tsl2563_als_device);
316+ return (!als) ? -EAGAIN : 0;
295317 }
296318
297−static int __init setup_tsl2563_als(const struct dmi_system_id *id)
319+static int __init chromeos_laptop_dmi_matched(const struct dmi_system_id *id)
298320 {
299− /* add tsl2563 light sensor on smbus */
300− als = add_smbus_device(NULL, &tsl2563_als_device);
301− return 0;
321+ cros_laptop = (void *)id->driver_data;
322+ pr_debug("DMI Matched %s.\n", id->ident);
323+
324+ /* Indicate to dmi_scan that processing is done. */
325+ return 1;
302326 }
303327
304−static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
305− {
306− .ident = "Samsung Series 5 550 - Touchpad",
307− .matches = {
308− DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"),
309− DMI_MATCH(DMI_PRODUCT_NAME, "Lumpy"),
310− },
311− .callback = setup_cyapa_smbus_tp,
328+static int chromeos_laptop_probe(struct platform_device *pdev)
329+{
330+ int i;
331+ int ret = 0;
332+
333+ for (i = 0; i < MAX_I2C_PERIPHERALS; i++) {
334+ struct i2c_peripheral *i2c_dev;
335+
336+ i2c_dev = &cros_laptop->i2c_peripherals[i];
337+
338+ /* No more peripherals. */
339+ if (i2c_dev->add == NULL)
340+ break;
341+
342+ /* Add the device. Set -EPROBE_DEFER on any failure */
343+ if (i2c_dev->add(i2c_dev->type))
344+ ret = -EPROBE_DEFER;
345+ }
346+
347+ return ret;
348+}
349+
350+static struct chromeos_laptop samsung_series_5_550 = {
351+ .i2c_peripherals = {
352+ /* Touchpad. */
353+ { .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
354+ /* Light Sensor. */
355+ { .add = setup_isl29018_als, I2C_ADAPTER_SMBUS },
312356 },
313− {
314− .ident = "Chromebook Pixel - Touchscreen",
315− .matches = {
316− DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
317− DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
318− },
319− .callback = setup_atmel_1664s_ts,
357+};
358+
359+static struct chromeos_laptop samsung_series_5 = {
360+ .i2c_peripherals = {
361+ /* Light Sensor. */
362+ { .add = setup_tsl2583_als, I2C_ADAPTER_SMBUS },
363+ },
364+};
365+
366+static struct chromeos_laptop chromebook_pixel = {
367+ .i2c_peripherals = {
368+ /* Touch Screen. */
369+ { .add = setup_atmel_1664s_ts, I2C_ADAPTER_PANEL },
370+ /* Touchpad. */
371+ { .add = setup_atmel_224s_tp, I2C_ADAPTER_VGADDC },
372+ /* Light Sensor. */
373+ { .add = setup_isl29018_als, I2C_ADAPTER_PANEL },
374+ },
375+};
376+
377+static struct chromeos_laptop acer_c7_chromebook = {
378+ .i2c_peripherals = {
379+ /* Touchpad. */
380+ { .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
381+ },
382+};
383+
384+static struct chromeos_laptop acer_ac700 = {
385+ .i2c_peripherals = {
386+ /* Light Sensor. */
387+ { .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
320388 },
389+};
390+
391+static struct chromeos_laptop hp_pavilion_14_chromebook = {
392+ .i2c_peripherals = {
393+ /* Touchpad. */
394+ { .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
395+ },
396+};
397+
398+static struct chromeos_laptop cr48 = {
399+ .i2c_peripherals = {
400+ /* Light Sensor. */
401+ { .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
402+ },
403+};
404+
405+#define _CBDD(board_) \
406+ .callback = chromeos_laptop_dmi_matched, \
407+ .driver_data = (void *)&board_
408+
409+static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
321410 {
322− .ident = "Chromebook Pixel - Touchpad",
411+ .ident = "Samsung Series 5 550",
323412 .matches = {
324− DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
325− DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
413+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"),
414+ DMI_MATCH(DMI_PRODUCT_NAME, "Lumpy"),
326415 },
327− .callback = setup_atmel_224s_tp,
416+ _CBDD(samsung_series_5_550),
328417 },
329418 {
330− .ident = "Samsung Series 5 550 - Light Sensor",
419+ .ident = "Samsung Series 5",
331420 .matches = {
332− DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"),
333− DMI_MATCH(DMI_PRODUCT_NAME, "Lumpy"),
421+ DMI_MATCH(DMI_PRODUCT_NAME, "Alex"),
334422 },
335− .callback = setup_isl29018_als,
423+ _CBDD(samsung_series_5),
336424 },
337425 {
338− .ident = "Chromebook Pixel - Light Sensor",
426+ .ident = "Chromebook Pixel",
339427 .matches = {
340428 DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
341429 DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
342430 },
343− .callback = setup_isl29023_als,
431+ _CBDD(chromebook_pixel),
344432 },
345433 {
346− .ident = "Acer C7 Chromebook - Touchpad",
434+ .ident = "Acer C7 Chromebook",
347435 .matches = {
348436 DMI_MATCH(DMI_PRODUCT_NAME, "Parrot"),
349437 },
350− .callback = setup_cyapa_smbus_tp,
438+ _CBDD(acer_c7_chromebook),
351439 },
352440 {
353− .ident = "HP Pavilion 14 Chromebook - Touchpad",
441+ .ident = "Acer AC700",
354442 .matches = {
355− DMI_MATCH(DMI_PRODUCT_NAME, "Butterfly"),
443+ DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
356444 },
357− .callback = setup_cyapa_smbus_tp,
445+ _CBDD(acer_ac700),
358446 },
359447 {
360− .ident = "Samsung Series 5 - Light Sensor",
448+ .ident = "HP Pavilion 14 Chromebook",
361449 .matches = {
362− DMI_MATCH(DMI_PRODUCT_NAME, "Alex"),
450+ DMI_MATCH(DMI_PRODUCT_NAME, "Butterfly"),
363451 },
364− .callback = setup_tsl2583_als,
452+ _CBDD(hp_pavilion_14_chromebook),
365453 },
366454 {
367− .ident = "Cr-48 - Light Sensor",
455+ .ident = "Cr-48",
368456 .matches = {
369457 DMI_MATCH(DMI_PRODUCT_NAME, "Mario"),
370458 },
371− .callback = setup_tsl2563_als,
372− },
373− {
374− .ident = "Acer AC700 - Light Sensor",
375− .matches = {
376− DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
377− },
378− .callback = setup_tsl2563_als,
459+ _CBDD(cr48),
379460 },
380461 { }
381462 };
382463 MODULE_DEVICE_TABLE(dmi, chromeos_laptop_dmi_table);
383464
465+static struct platform_device *cros_platform_device;
466+
467+static struct platform_driver cros_platform_driver = {
468+ .driver = {
469+ .name = "chromeos_laptop",
470+ .owner = THIS_MODULE,
471+ },
472+ .probe = chromeos_laptop_probe,
473+};
474+
384475 static int __init chromeos_laptop_init(void)
385476 {
477+ int ret;
386478 if (!dmi_check_system(chromeos_laptop_dmi_table)) {
387479 pr_debug("%s unsupported system.\n", __func__);
388480 return -ENODEV;
389481 }
482+
483+ ret = platform_driver_register(&cros_platform_driver);
484+ if (ret)
485+ return ret;
486+
487+ cros_platform_device = platform_device_alloc("chromeos_laptop", -1);
488+ if (!cros_platform_device) {
489+ ret = -ENOMEM;
490+ goto fail_platform_device1;
491+ }
492+
493+ ret = platform_device_add(cros_platform_device);
494+ if (ret)
495+ goto fail_platform_device2;
496+
390497 return 0;
498+
499+fail_platform_device2:
500+ platform_device_put(cros_platform_device);
501+fail_platform_device1:
502+ platform_driver_unregister(&cros_platform_driver);
503+ return ret;
391504 }
392505
393506 static void __exit chromeos_laptop_exit(void)
@@ -398,6 +511,9 @@ static void __exit chromeos_laptop_exit(void) · 4 unmodified lines
398511 i2c_unregister_device(tp);
399512 if (ts)
400513 i2c_unregister_device(ts);
514+
515+ platform_device_unregister(cros_platform_device);
516+ platform_driver_unregister(&cros_platform_driver);
401517 }
402518
403519 module_init(chromeos_laptop_init);
drivers/platform/chrome/chromeos_pstore.c+101−0
@@ -0,0 +1,101 @@
1+/*
2+ * chromeos_pstore.c - Driver to instantiate Chromebook ramoops device
3+ *
4+ * Copyright (C) 2013 Google, Inc.
5+ *
6+ * This program is free software; you can redistribute it and/or modify
7+ * it under the terms of the GNU General Public License as published by
8+ * the Free Software Foundation, version 2 of the License.
9+ */
10+
11+#include <linux/dmi.h>
12+#include <linux/module.h>
13+#include <linux/platform_device.h>
14+#include <linux/pstore_ram.h>
15+
16+static struct dmi_system_id chromeos_pstore_dmi_table[] __initdata = {
17+ {
18+ /*
19+ * Today all Chromebooks/boxes ship with GOOGLE as vendor and
20+ * coreboot as bios vendor. No other systems with this
21+ * combination are known to date.
22+ */
23+ .matches = {
24+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
25+ DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
26+ },
27+ },
28+ {
29+ /*
30+ * The first Samsung Chromebox and Chromebook Series 5 550 use
31+ * coreboot but with Samsung as the system vendor.
32+ */
33+ .matches = {
34+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"),
35+ DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
36+ },
37+ },
38+ {
39+ /* x86-alex, the first Samsung Chromebook. */
40+ .matches = {
41+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
42+ DMI_MATCH(DMI_PRODUCT_NAME, "Alex"),
43+ },
44+ },
45+ {
46+ /* x86-mario, the Cr-48 pilot device from Google. */
47+ .matches = {
48+ DMI_MATCH(DMI_SYS_VENDOR, "IEC"),
49+ DMI_MATCH(DMI_PRODUCT_NAME, "Mario"),
50+ },
51+ },
52+ {
53+ /* x86-zgb, the first Acer Chromebook. */
54+ .matches = {
55+ DMI_MATCH(DMI_SYS_VENDOR, "ACER"),
56+ DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
57+ },
58+ },
59+ { }
60+};
61+MODULE_DEVICE_TABLE(dmi, chromeos_pstore_dmi_table);
62+
63+/*
64+ * On x86 chromebooks/boxes, the firmware will keep the legacy VGA memory
65+ * range untouched across reboots, so we use that to store our pstore
66+ * contents for panic logs, etc.
67+ */
68+static struct ramoops_platform_data chromeos_ramoops_data = {
69+ .mem_size = 0x100000,
70+ .mem_address = 0xf00000,
71+ .record_size = 0x20000,
72+ .console_size = 0x20000,
73+ .ftrace_size = 0x20000,
74+ .dump_oops = 1,
75+};
76+
77+static struct platform_device chromeos_ramoops = {
78+ .name = "ramoops",
79+ .dev = {
80+ .platform_data = &chromeos_ramoops_data,
81+ },
82+};
83+
84+static int __init chromeos_pstore_init(void)
85+{
86+ if (dmi_check_system(chromeos_pstore_dmi_table))
87+ return platform_device_register(&chromeos_ramoops);
88+
89+ return -ENODEV;
90+}
91+
92+static void __exit chromeos_pstore_exit(void)
93+{
94+ platform_device_unregister(&chromeos_ramoops);
95+}
96+
97+module_init(chromeos_pstore_init);
98+module_exit(chromeos_pstore_exit);
99+
100+MODULE_DESCRIPTION("Chrome OS pstore module");
101+MODULE_LICENSE("GPL");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t