Lines Matching refs:pdata
61 struct rfkill_rk_platform_data *pdata; member
144 struct rfkill_rk_irq *irq = &rfkill->pdata->wake_host_irq; in rfkill_rk_setup_wake_irq()
148 ret = rfkill_rk_setup_gpio(rfkill->pdev, &irq->gpio, rfkill->pdata->name, "wake_host"); in rfkill_rk_setup_wake_irq()
188 struct rfkill_rk_gpio *wake = &rfkill->pdata->wake_gpio; in rfkill_rk_sleep_bt_internal()
196 if (rfkill_rk_setup_gpio(rfkill->pdev, wake, rfkill->pdata->name, "wake") != 0) { in rfkill_rk_sleep_bt_internal()
233 wake = &rfkill->pdata->wake_gpio; in rfkill_rk_sleep_bt()
261 *toggle = mrfkill->pdata->power_toggle; in rfkill_get_bt_power_state()
270 struct rfkill_rk_gpio *wake_host = &rfkill->pdata->wake_host_irq.gpio; in rfkill_rk_set_power()
271 struct rfkill_rk_gpio *poweron = &rfkill->pdata->poweron_gpio; in rfkill_rk_set_power()
272 struct rfkill_rk_gpio *reset = &rfkill->pdata->reset_gpio; in rfkill_rk_set_power()
273 struct rfkill_rk_gpio *rts = &rfkill->pdata->rts_gpio; in rfkill_rk_set_power()
274 struct pinctrl *pinctrl = rfkill->pdata->pinctrl; in rfkill_rk_set_power()
282 toggle = rfkill->pdata->power_toggle; in rfkill_rk_set_power()
374 struct pinctrl *pinctrl = rfkill->pdata->pinctrl; in rfkill_rk_pm_prepare()
382 rts = &rfkill->pdata->rts_gpio; in rfkill_rk_pm_prepare()
383 wake_host_irq = &rfkill->pdata->wake_host_irq; in rfkill_rk_pm_prepare()
415 struct pinctrl *pinctrl = rfkill->pdata->pinctrl; in rfkill_rk_pm_complete()
423 wake_host_irq = &rfkill->pdata->wake_host_irq; in rfkill_rk_pm_complete()
424 rts = &rfkill->pdata->rts_gpio; in rfkill_rk_pm_complete()
582 struct rfkill_rk_platform_data *pdata = pdev->dev.platform_data; in rfkill_rk_probe() local
588 if (!pdata) { in rfkill_rk_probe()
590 pdata = devm_kzalloc(&pdev->dev, sizeof(struct rfkill_rk_platform_data), GFP_KERNEL); in rfkill_rk_probe()
591 if (!pdata) { in rfkill_rk_probe()
595 ret = bluetooth_platdata_parse_dt(&pdev->dev, pdata); in rfkill_rk_probe()
605 pdata->name = (char *)bt_name; in rfkill_rk_probe()
606 pdata->type = RFKILL_TYPE_BLUETOOTH; in rfkill_rk_probe()
613 rfkill->pdata = pdata; in rfkill_rk_probe()
647 ret = rfkill_rk_setup_gpio(pdev, &pdata->poweron_gpio, pdata->name, "poweron"); in rfkill_rk_probe()
652 ret = rfkill_rk_setup_gpio(pdev, &pdata->reset_gpio, pdata->name, "reset"); in rfkill_rk_probe()
657 ret = rfkill_rk_setup_gpio(pdev, &pdata->wake_gpio, pdata->name, "wake"); in rfkill_rk_probe()
662 ret = rfkill_rk_setup_gpio(pdev, &pdata->rts_gpio, rfkill->pdata->name, "rts"); in rfkill_rk_probe()
675 rfkill->rfkill_dev = rfkill_alloc(pdata->name, &pdev->dev, pdata->type, &rfkill_rk_ops, rfkill); in rfkill_rk_probe()
689 if (gpio_is_valid(pdata->poweron_gpio.io)) { in rfkill_rk_probe()
690 gpio_direction_output(pdata->poweron_gpio.io, !pdata->poweron_gpio.enable); in rfkill_rk_probe()
692 if (gpio_is_valid(pdata->reset_gpio.io)) { in rfkill_rk_probe()
693 gpio_direction_output(pdata->reset_gpio.io, !pdata->reset_gpio.enable); in rfkill_rk_probe()
698 LOG("%s device registered.\n", pdata->name); in rfkill_rk_probe()
728 if (gpio_is_valid(rfkill->pdata->rts_gpio.io)) { in rfkill_rk_remove()
729 gpio_free(rfkill->pdata->rts_gpio.io); in rfkill_rk_remove()
732 if (gpio_is_valid(rfkill->pdata->wake_host_irq.gpio.io)) { in rfkill_rk_remove()
733 free_irq(rfkill->pdata->wake_host_irq.irq, rfkill); in rfkill_rk_remove()
735 gpio_free(rfkill->pdata->wake_host_irq.gpio.io); in rfkill_rk_remove()
740 if (gpio_is_valid(rfkill->pdata->wake_gpio.io)) { in rfkill_rk_remove()
741 gpio_free(rfkill->pdata->wake_gpio.io); in rfkill_rk_remove()
745 if (gpio_is_valid(rfkill->pdata->reset_gpio.io)) { in rfkill_rk_remove()
746 gpio_free(rfkill->pdata->reset_gpio.io); in rfkill_rk_remove()
749 if (gpio_is_valid(rfkill->pdata->poweron_gpio.io)) { in rfkill_rk_remove()
750 gpio_free(rfkill->pdata->poweron_gpio.io); in rfkill_rk_remove()
752 clk_disable_unprepare(rfkill->pdata->ext_clk); in rfkill_rk_remove()