Loading asoc/codecs/wsa883x/wsa883x.c +42 −0 Original line number Diff line number Diff line Loading @@ -1264,6 +1264,19 @@ static int wsa883x_swr_up(struct wsa883x_priv *wsa883x) return ret; } static int wsa883x_swr_device_up(struct swr_device *pdev) { struct wsa883x_priv *wsa883x; wsa883x = swr_get_dev_data(pdev); if (!wsa883x) { dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__); return -EINVAL; } wsa883x_swr_up(wsa883x); return 0; } static int wsa883x_swr_down(struct wsa883x_priv *wsa883x) { int ret; Loading @@ -1275,6 +1288,19 @@ static int wsa883x_swr_down(struct wsa883x_priv *wsa883x) return ret; } static int wsa883x_swr_device_down(struct swr_device *pdev) { struct wsa883x_priv *wsa883x; wsa883x = swr_get_dev_data(pdev); if (!wsa883x) { dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__); return -EINVAL; } wsa883x_swr_down(wsa883x); return 0; } static int wsa883x_swr_reset(struct wsa883x_priv *wsa883x) { u8 retry = WSA883X_NUM_RETRY; Loading @@ -1292,6 +1318,19 @@ static int wsa883x_swr_reset(struct wsa883x_priv *wsa883x) return 0; } static int wsa883x_swr_device_reset(struct swr_device *pdev) { struct wsa883x_priv *wsa883x; wsa883x = swr_get_dev_data(pdev); if (!wsa883x) { dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__); return -EINVAL; } wsa883x_swr_reset(wsa883x); return 0; } static int wsa883x_event_notify(struct notifier_block *nb, unsigned long val, void *ptr) { Loading Loading @@ -1670,6 +1709,9 @@ static struct swr_driver wsa883x_swr_driver = { .probe = wsa883x_swr_probe, .remove = wsa883x_swr_remove, .id_table = wsa883x_swr_id, .device_up = wsa883x_swr_device_up, .device_down = wsa883x_swr_device_down, .reset_device = wsa883x_swr_device_reset, }; static int __init wsa883x_swr_init(void) Loading Loading
asoc/codecs/wsa883x/wsa883x.c +42 −0 Original line number Diff line number Diff line Loading @@ -1264,6 +1264,19 @@ static int wsa883x_swr_up(struct wsa883x_priv *wsa883x) return ret; } static int wsa883x_swr_device_up(struct swr_device *pdev) { struct wsa883x_priv *wsa883x; wsa883x = swr_get_dev_data(pdev); if (!wsa883x) { dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__); return -EINVAL; } wsa883x_swr_up(wsa883x); return 0; } static int wsa883x_swr_down(struct wsa883x_priv *wsa883x) { int ret; Loading @@ -1275,6 +1288,19 @@ static int wsa883x_swr_down(struct wsa883x_priv *wsa883x) return ret; } static int wsa883x_swr_device_down(struct swr_device *pdev) { struct wsa883x_priv *wsa883x; wsa883x = swr_get_dev_data(pdev); if (!wsa883x) { dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__); return -EINVAL; } wsa883x_swr_down(wsa883x); return 0; } static int wsa883x_swr_reset(struct wsa883x_priv *wsa883x) { u8 retry = WSA883X_NUM_RETRY; Loading @@ -1292,6 +1318,19 @@ static int wsa883x_swr_reset(struct wsa883x_priv *wsa883x) return 0; } static int wsa883x_swr_device_reset(struct swr_device *pdev) { struct wsa883x_priv *wsa883x; wsa883x = swr_get_dev_data(pdev); if (!wsa883x) { dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__); return -EINVAL; } wsa883x_swr_reset(wsa883x); return 0; } static int wsa883x_event_notify(struct notifier_block *nb, unsigned long val, void *ptr) { Loading Loading @@ -1670,6 +1709,9 @@ static struct swr_driver wsa883x_swr_driver = { .probe = wsa883x_swr_probe, .remove = wsa883x_swr_remove, .id_table = wsa883x_swr_id, .device_up = wsa883x_swr_device_up, .device_down = wsa883x_swr_device_down, .reset_device = wsa883x_swr_device_reset, }; static int __init wsa883x_swr_init(void) Loading