struct otg_transceiver *otg;
};
+static struct cpcap_whisper_data *whisper_di;
+
static int whisper_debug;
module_param(whisper_debug, int, S_IRUGO | S_IWUSR | S_IWGRP);
return retval;
}
+void cpcap_accy_whisper_spdif_set_state(int state)
+{
+ if (!whisper_di)
+ return;
+
+ if (!switch_get_state(&whisper_di->dsdev))
+ return;
+
+ state = ((state > 0) ? 1 : 0);
+ switch_set_state(&whisper_di->asdev, state);
+
+ pr_info("%s: Audio cable %s present\n", __func__,
+ (state ? "is" : "not"));
+}
+
static int cpcap_whisper_probe(struct platform_device *pdev)
{
int retval;
#endif
data->cpcap->accydata = data;
+ whisper_di = data;
dev_info(&pdev->dev, "CPCAP Whisper detection probed\n");
/* Perform initial detection */
int cpcap_accy_whisper(struct cpcap_device *cpcap, unsigned int cmd,
char *dock_id);
+void cpcap_accy_whisper_spdif_set_state(int state);
+
#define cpcap_driver_register platform_driver_register
#define cpcap_driver_unregister platform_driver_unregister