void ts_init_local(void) { ts_data.new_instance = ts_new_instance; ts_data.description = "A trans-splitter-ooo object can split a transaction that " "crosses a cache line in two non-crossing transactions.\n\n" "A trans-splitter-ooo can be inserted between the cpu and " "the caches if the cpu can issue cache-line crossing " "transactions (x86 being a good example). It can also be " "used between two caches to split transactions.\n\n" "A trans-splitter-ooo object supports multiple outstanding " "transactions. Note that it does not support splitting a " "transaction more than once, so transactions that crosses " "two cache lines or more will be split incorrectly."; if (!(ts_class = SIM_register_class("trans-splitter-ooo", &ts_data))) { pr_err("Could not create trans-splitter-ooo class\n"); } else { /* register the attributes */ ts_register(ts_class); /* register the timing model interface */ ts_ifc.operate = ts_operate; SIM_register_interface(ts_class, "timing-model", (void *) &ts_ifc); } }
static int ts_probe(struct i2c_client *client, const struct i2c_device_id *id) { int err = 0; struct ft5x06_ts *ts; struct device *dev = &client->dev; if (gts) { printk(KERN_ERR "%s: Error gts is already allocated\n", client_name); return -ENOMEM; } if (detect_ft5x06(client) != 0) { dev_err(dev, "%s: Could not detect touch screen.\n", client_name); return -ENODEV; } ts = kzalloc(sizeof(struct ft5x06_ts), GFP_KERNEL); if (!ts) { dev_err(dev, "Couldn't allocate memory for %s\n", client_name); return -ENOMEM; } init_waitqueue_head(&ts->sample_waitq); sema_init(&ts->sem, 1); ts->client = client; ts->irq = client->irq ; ts->gp = irq_to_gpio(client->irq); printk(KERN_INFO "%s: %s touchscreen irq=%i, gp=%i\n", __func__, client_name, ts->irq, ts->gp); i2c_set_clientdata(client, ts); err = ts_register(ts); if (err == 0) { gts = ts; ts->procentry = create_proc_entry(procentryname, 0, NULL); if (ts->procentry) { ts->procentry->read_proc = ft5x06_proc_read ; ts->procentry->write_proc = ft5x06_proc_write ; } } else { printk(KERN_WARNING "%s: ts_register failed\n", client_name); ts_deregister(ts); kfree(ts); } return err; }
void ts_init_local(void) { ts_data.new_instance = ts_new_instance; ts_data.description = "A trans-splitter object should be inserted between two caches if the higher-level " "cache has a larger cache line size than the lower-level cache, or between the " "processor and the id-splitter object if you have a processor that can do " "unaligned accesses or accesses larger than one cache line. It splits cacheable " "transactions that span more than one naturally aligned next-cache-line-size bytes " "big lines into multiple transactions that each fit within one line."; if (!(ts_class = SIM_register_class("trans-splitter", &ts_data))) { fputs("Could not create trans-splitter class\n", stderr); } else { /* register the attributes */ ts_register(ts_class); /* register the timing model interface */ ts_ifc.operate = ts_operate; SIM_register_interface(ts_class, "timing-model", &ts_ifc); } }