+
+static irqreturn_t palmas_vbus_wakeup_irq(int irq, void *_palmas_usb)
+
+
+static irqreturn_t palmas_id_wakeup_irq(int irq, void *_palmas_usb)
+
+static void palmas_set_vbus_work(struct work_struct *data)
+{
+ int ret;
+ struct palmas_usb *palmas_usb = container_of(data, struct palmas_usb,
+ set_vbus_work);
+
+ if (IS_ERR_OR_NULL(palmas_usb->vbus_reg)) {
+ dev_err(palmas_usb->dev, "invalid regulator\n");
+ return;
+ }
+
+static void palmas_dt_to_pdata(struct device_node *node,
+ struct palmas_usb_platform_data *pdata)
+{
+ pdata->no_control_vbus = of_property_read_bool(node,
+ "ti,no_control_vbus");
+
+ palmas_usb->irq1 = regmap_irq_get_virq(palmas->irq_data,
+ PALMAS_ID_OTG_IRQ);
+ palmas_usb->irq2 = regmap_irq_get_virq(palmas->irq_data,
+ PALMAS_ID_IRQ);
+ palmas_usb->irq3 = regmap_irq_get_virq(palmas->irq_data,
+ PALMAS_VBUS_OTG_IRQ);
+ palmas_usb->irq4 = regmap_irq_get_virq(palmas->irq_data,
+ PALMAS_VBUS_IRQ);
+
+
+ if (device_create_file(&pdev->dev, &dev_attr_vbus))
+ dev_warn(&pdev->dev, "could not create sysfs file\n");
+
+ palmas_usb->edev.name = "palmas_usb";
+ palmas_usb->edev.supported_cable = palmas_extcon_cable;
+ palmas_usb->edev.mutually_exclusive = mutually_exclusive;
+
+ ret = extcon_dev_register(&palmas_usb->edev, palmas_usb->dev);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to register extcon device\n");
+ return ret;
+ }
+
+ /* init spinlock for workqueue */
+ spin_lock_init(&palmas_usb->lock);
+
+ INIT_WORK(&palmas_usb->set_vbus_work, palmas_set_vbus_work);
+
+
diff --git a/include/linux/extcon/extcon_palmas.h b/include/linux/extcon/extcon_palmas.h
new file mode 100644
index 0000000..a5119c9
--- /dev/null
+++ b/include/linux/extcon/extcon_palmas.h
@@ -0,0 +1,26 @@Do we really require mailboxstat?
- u8 linkstat;
+ int mailboxstat;