/** * struct hw_prober_entry - Holds an entry for the hardware prober * * @compatible: compatible string to match against the machine * @prober: prober function to call when machine matches * @data: extra data for the prober function
*/ struct hw_prober_entry { constchar *compatible; int (*prober)(struct device *dev, constvoid *data); constvoid *data;
};
staticconststruct chromeos_i2c_probe_data chromeos_i2c_probe_hana_trackpad = {
.cfg = &chromeos_i2c_probe_simple_trackpad_cfg,
.opts = &(conststruct i2c_of_probe_simple_opts) {
.res_node_compatible = "elan,ekth3000",
.supply_name = "vcc", /* * ELAN trackpad needs 2 ms for H/W init and 100 ms for F/W init. * Synaptics trackpad needs 100 ms. * However, the regulator is set to "always-on", presumably to * avoid this delay. The ELAN driver is also missing delays.
*/
.post_power_on_delay_ms = 0,
},
};
staticint chromeos_of_hw_prober_probe(struct platform_device *pdev)
{ for (size_t i = 0; i < ARRAY_SIZE(hw_prober_platforms); i++) { int ret;
if (!of_machine_is_compatible(hw_prober_platforms[i].compatible)) continue;
ret = hw_prober_platforms[i].prober(&pdev->dev, hw_prober_platforms[i].data); /* Ignore unrecoverable errors and keep going through other probers */ if (ret == -EPROBE_DEFER) return ret;
}
staticint chromeos_of_hw_prober_driver_init(void)
{
size_t i; int ret;
for (i = 0; i < ARRAY_SIZE(hw_prober_platforms); i++) if (of_machine_is_compatible(hw_prober_platforms[i].compatible)) break; if (i == ARRAY_SIZE(hw_prober_platforms)) return -ENODEV;
ret = platform_driver_register(&chromeos_of_hw_prober_driver); if (ret) return ret;
chromeos_of_hw_prober_pdev =
platform_device_register_simple(DRV_NAME, PLATFORM_DEVID_NONE, NULL, 0); if (IS_ERR(chromeos_of_hw_prober_pdev)) goto err;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.