#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/gpio/consumer.h>
#include <linux/of_platform.h>
#include <linux/phy/phy.h>
#include <linux/pinctrl/consumer.h>
#define PHY_MDM6600_PHY_DELAY_MS …
#define PHY_MDM6600_ENABLED_DELAY_MS …
#define PHY_MDM6600_WAKE_KICK_MS …
#define MDM6600_MODEM_IDLE_DELAY_MS …
#define MDM6600_MODEM_WAKE_DELAY_MS …
enum phy_mdm6600_ctrl_lines { … };
enum phy_mdm6600_bootmode_lines { … };
enum phy_mdm6600_cmd_lines { … };
enum phy_mdm6600_status_lines { … };
enum phy_mdm6600_cmd { … };
enum phy_mdm6600_status { … };
static const char * const
phy_mdm6600_status_name[] = …;
struct phy_mdm6600 { … };
static int phy_mdm6600_init(struct phy *x)
{ … }
static int phy_mdm6600_power_on(struct phy *x)
{ … }
static int phy_mdm6600_power_off(struct phy *x)
{ … }
static const struct phy_ops gpio_usb_ops = …;
static void phy_mdm6600_cmd(struct phy_mdm6600 *ddata, int val)
{ … }
static void phy_mdm6600_status(struct work_struct *work)
{ … }
static irqreturn_t phy_mdm6600_irq_thread(int irq, void *data)
{ … }
static irqreturn_t phy_mdm6600_wakeirq_thread(int irq, void *data)
{ … }
static void phy_mdm6600_init_irq(struct phy_mdm6600 *ddata)
{ … }
struct phy_mdm6600_map { … };
static const struct phy_mdm6600_map
phy_mdm6600_ctrl_gpio_map[PHY_MDM6600_NR_CTRL_LINES] = …;
static int phy_mdm6600_init_lines(struct phy_mdm6600 *ddata)
{ … }
static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata)
{ … }
static void phy_mdm6600_device_power_off(struct phy_mdm6600 *ddata)
{ … }
static void phy_mdm6600_deferred_power_on(struct work_struct *work)
{ … }
static void phy_mdm6600_wake_modem(struct phy_mdm6600 *ddata)
{ … }
static void phy_mdm6600_modem_wake(struct work_struct *work)
{ … }
static int __maybe_unused phy_mdm6600_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused phy_mdm6600_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops phy_mdm6600_pm_ops = …;
static const struct of_device_id phy_mdm6600_id_table[] = …;
MODULE_DEVICE_TABLE(of, phy_mdm6600_id_table);
static int phy_mdm6600_probe(struct platform_device *pdev)
{ … }
static void phy_mdm6600_remove(struct platform_device *pdev)
{ … }
static struct platform_driver phy_mdm6600_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;