Lines Matching refs:pdata
125 struct wm8903_platform_data *pdata; member
1851 struct wm8903_platform_data *pdata = wm8903->pdata; in wm8903_init_gpio() local
1858 if (pdata->gpio_base) in wm8903_init_gpio()
1859 wm8903->gpio_chip.base = pdata->gpio_base; in wm8903_init_gpio()
1913 struct wm8903_platform_data *pdata) in wm8903_set_pdata_irq_trigger() argument
1931 pdata->irq_active_low = false; in wm8903_set_pdata_irq_trigger()
1934 pdata->irq_active_low = true; in wm8903_set_pdata_irq_trigger()
1942 struct wm8903_platform_data *pdata) in wm8903_set_pdata_from_of() argument
1949 pdata->micdet_cfg = val32; in wm8903_set_pdata_from_of()
1952 pdata->micdet_delay = val32; in wm8903_set_pdata_from_of()
1954 if (of_property_read_u32_array(np, "gpio-cfg", pdata->gpio_cfg, in wm8903_set_pdata_from_of()
1955 ARRAY_SIZE(pdata->gpio_cfg)) >= 0) { in wm8903_set_pdata_from_of()
1968 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) { in wm8903_set_pdata_from_of()
1969 if (pdata->gpio_cfg[i] == 0) { in wm8903_set_pdata_from_of()
1970 pdata->gpio_cfg[i] = WM8903_GPIO_CONFIG_ZERO; in wm8903_set_pdata_from_of()
1971 } else if (pdata->gpio_cfg[i] == 0xffffffff) { in wm8903_set_pdata_from_of()
1972 pdata->gpio_cfg[i] = 0; in wm8903_set_pdata_from_of()
1973 } else if (pdata->gpio_cfg[i] > 0x7fff) { in wm8903_set_pdata_from_of()
1975 i, pdata->gpio_cfg[i]); in wm8903_set_pdata_from_of()
1987 struct wm8903_platform_data *pdata = dev_get_platdata(&i2c->dev); in wm8903_i2c_probe() local
2012 if (pdata) { in wm8903_i2c_probe()
2013 wm8903->pdata = pdata; in wm8903_i2c_probe()
2015 wm8903->pdata = devm_kzalloc(&i2c->dev, sizeof(*wm8903->pdata), in wm8903_i2c_probe()
2017 if (!wm8903->pdata) in wm8903_i2c_probe()
2021 ret = wm8903_set_pdata_irq_trigger(i2c, wm8903->pdata); in wm8903_i2c_probe()
2027 ret = wm8903_set_pdata_from_of(i2c, wm8903->pdata); in wm8903_i2c_probe()
2033 pdata = wm8903->pdata; in wm8903_i2c_probe()
2077 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) { in wm8903_i2c_probe()
2078 if ((!pdata->gpio_cfg[i]) || in wm8903_i2c_probe()
2079 (pdata->gpio_cfg[i] > WM8903_GPIO_CONFIG_ZERO)) in wm8903_i2c_probe()
2083 pdata->gpio_cfg[i] & 0x7fff); in wm8903_i2c_probe()
2085 val = (pdata->gpio_cfg[i] & WM8903_GP1_FN_MASK) in wm8903_i2c_probe()
2100 pdata->micdet_cfg); in wm8903_i2c_probe()
2103 if (pdata->micdet_cfg) in wm8903_i2c_probe()
2113 WARN_ON(!mic_gpio && (pdata->micdet_cfg & WM8903_MICDET_ENA)); in wm8903_i2c_probe()
2115 wm8903->mic_delay = pdata->micdet_delay; in wm8903_i2c_probe()
2118 if (pdata->irq_active_low) { in wm8903_i2c_probe()