Lines Matching refs:htcpld
36 #include <linux/htcpld.h>
77 /* htcpld info */
83 * on the htcpld chip itself. So, we simply ignore interrupts that
121 .name = "htcpld",
134 struct htcpld_data *htcpld = dev;
140 if (!htcpld) {
141 pr_debug("htcpld is null in ISR\n");
152 for (i = 0; i < htcpld->nchips; i++) {
153 struct htcpld_chip *chip = &htcpld->chip[i];
223 if (htcpld->int_reset_gpio_hi)
224 gpio_set_value(htcpld->int_reset_gpio_hi, 1);
225 if (htcpld->int_reset_gpio_lo)
226 gpio_set_value(htcpld->int_reset_gpio_lo, 0);
345 struct htcpld_data *htcpld;
355 htcpld = platform_get_drvdata(pdev);
356 chip = &htcpld->chip[chip_index];
379 struct htcpld_data *htcpld;
390 htcpld = platform_get_drvdata(pdev);
391 chip = &htcpld->chip[chip_index];
410 strlcpy(info.type, "htcpld-chip", I2C_NAME_SIZE);
437 struct htcpld_data *htcpld;
441 htcpld = platform_get_drvdata(pdev);
442 chip = &htcpld->chip[chip_index];
452 struct htcpld_data *htcpld;
462 htcpld = platform_get_drvdata(pdev);
463 chip = &htcpld->chip[chip_index];
468 gpio_chip->label = "htcpld-out";
479 gpio_chip->label = "htcpld-in";
517 struct htcpld_data *htcpld;
524 htcpld = platform_get_drvdata(pdev);
527 htcpld->nchips = pdata->num_chip;
528 htcpld->chip = kzalloc(sizeof(struct htcpld_chip) * htcpld->nchips,
530 if (!htcpld->chip) {
536 for (i = 0; i < htcpld->nchips; i++) {
540 htcpld->chip[i].reset = pdata->chip[i].reset;
541 htcpld->chip[i].cache_out = pdata->chip[i].reset;
542 htcpld->chip[i].cache_in = 0;
543 htcpld->chip[i].dev = dev;
544 htcpld->chip[i].irq_start = pdata->chip[i].irq_base;
545 htcpld->chip[i].nirqs = pdata->chip[i].num_irqs;
547 INIT_WORK(&(htcpld->chip[i].set_val_work), &htcpld_chip_set_ni);
548 spin_lock_init(&(htcpld->chip[i].lock));
551 if (htcpld->chained_irq) {
579 struct htcpld_data *htcpld;
590 dev_warn(dev, "Platform data not found for htcpld core!\n");
594 htcpld = kzalloc(sizeof(struct htcpld_data), GFP_KERNEL);
595 if (!htcpld)
603 htcpld->chained_irq = res->start;
607 ret = request_threaded_irq(htcpld->chained_irq,
609 flags, pdev->name, htcpld);
618 platform_set_drvdata(pdev, htcpld);
620 /* Setup the htcpld chips */
627 ret = gpio_request(pdata->int_reset_gpio_hi, "htcpld-core");
634 htcpld->int_reset_gpio_hi = 0;
636 htcpld->int_reset_gpio_hi = pdata->int_reset_gpio_hi;
637 gpio_set_value(htcpld->int_reset_gpio_hi, 1);
642 ret = gpio_request(pdata->int_reset_gpio_lo, "htcpld-core");
649 htcpld->int_reset_gpio_lo = 0;
651 htcpld->int_reset_gpio_lo = pdata->int_reset_gpio_lo;
652 gpio_set_value(htcpld->int_reset_gpio_lo, 0);
660 kfree(htcpld);
666 { "htcpld-chip", 0 },
674 .name = "htcpld-chip",
682 .name = "i2c-htcpld",