Lines Matching refs:priv

19 static bool acpi_i2c_add_gpios_to_crs(struct acpi_i2c_priv *priv)  in acpi_i2c_add_gpios_to_crs()  argument
26 if (priv->disable_gpio_export_in_crs || in acpi_i2c_add_gpios_to_crs()
27 (!dm_gpio_is_valid(&priv->reset_gpio) && in acpi_i2c_add_gpios_to_crs()
28 !dm_gpio_is_valid(&priv->enable_gpio))) in acpi_i2c_add_gpios_to_crs()
53 struct acpi_i2c_priv *priv = dev_get_priv(dev); in acpi_i2c_fill_ssdt() local
78 acpigen_write_name_string(ctx, "_HID", priv->hid); in acpi_i2c_fill_ssdt()
81 acpigen_write_name_integer(ctx, "_UID", priv->uid); in acpi_i2c_fill_ssdt()
82 acpigen_write_name_string(ctx, "_DDN", priv->desc); in acpi_i2c_fill_ssdt()
91 if (dm_gpio_is_valid(&priv->irq_gpio)) { in acpi_i2c_fill_ssdt()
92 irq_gpio_index = acpi_i2c_write_gpio(ctx, &priv->irq_gpio, in acpi_i2c_fill_ssdt()
95 ret = acpi_device_write_interrupt_irq(ctx, &priv->irq); in acpi_i2c_fill_ssdt()
100 if (acpi_i2c_add_gpios_to_crs(priv)) { in acpi_i2c_fill_ssdt()
101 reset_gpio_index = acpi_i2c_write_gpio(ctx, &priv->reset_gpio, in acpi_i2c_fill_ssdt()
103 enable_gpio_index = acpi_i2c_write_gpio(ctx, &priv->enable_gpio, in acpi_i2c_fill_ssdt()
109 if (priv->wake) { in acpi_i2c_fill_ssdt()
111 acpigen_write_prw(ctx, priv->wake, 3); in acpi_i2c_fill_ssdt()
115 if (priv->probed || priv->property_count || priv->compat_string || in acpi_i2c_fill_ssdt()
125 if (priv->compat_string) in acpi_i2c_fill_ssdt()
127 priv->compat_string); in acpi_i2c_fill_ssdt()
128 if (priv->probed) in acpi_i2c_fill_ssdt()
133 priv->irq_gpio.flags & in acpi_i2c_fill_ssdt()
139 priv->reset_gpio.flags & in acpi_i2c_fill_ssdt()
145 priv->enable_gpio.flags & in acpi_i2c_fill_ssdt()
153 if (priv->has_power_resource) { in acpi_i2c_fill_ssdt()
156 &priv->reset_gpio, priv->reset_delay_ms, in acpi_i2c_fill_ssdt()
157 priv->reset_off_delay_ms, &priv->enable_gpio, in acpi_i2c_fill_ssdt()
158 priv->enable_delay_ms, priv->enable_off_delay_ms, in acpi_i2c_fill_ssdt()
159 &priv->stop_gpio, priv->stop_delay_ms, in acpi_i2c_fill_ssdt()
160 priv->stop_off_delay_ms); in acpi_i2c_fill_ssdt()
164 if (priv->hid_desc_reg_offset) { in acpi_i2c_fill_ssdt()
166 priv->hid_desc_reg_offset); in acpi_i2c_fill_ssdt()
179 struct acpi_i2c_priv *priv = dev_get_priv(dev); in acpi_i2c_of_to_plat() local
181 gpio_request_by_name(dev, "reset-gpios", 0, &priv->reset_gpio, in acpi_i2c_of_to_plat()
183 gpio_request_by_name(dev, "enable-gpios", 0, &priv->enable_gpio, in acpi_i2c_of_to_plat()
185 gpio_request_by_name(dev, "irq-gpios", 0, &priv->irq_gpio, GPIOD_IS_IN); in acpi_i2c_of_to_plat()
186 gpio_request_by_name(dev, "stop-gpios", 0, &priv->stop_gpio, in acpi_i2c_of_to_plat()
188 irq_get_by_index(dev, 0, &priv->irq); in acpi_i2c_of_to_plat()
189 priv->hid = dev_read_string(dev, "acpi,hid"); in acpi_i2c_of_to_plat()
190 if (!priv->hid) in acpi_i2c_of_to_plat()
192 dev_read_u32(dev, "acpi,uid", &priv->uid); in acpi_i2c_of_to_plat()
193 priv->desc = dev_read_string(dev, "acpi,ddn"); in acpi_i2c_of_to_plat()
194 dev_read_u32(dev, "acpi,wake", &priv->wake); in acpi_i2c_of_to_plat()
195 priv->probed = dev_read_bool(dev, "linux,probed"); in acpi_i2c_of_to_plat()
196 priv->compat_string = dev_read_string(dev, "acpi,compatible"); in acpi_i2c_of_to_plat()
197 priv->has_power_resource = dev_read_bool(dev, in acpi_i2c_of_to_plat()
199 dev_read_u32(dev, "hid-descr-addr", &priv->hid_desc_reg_offset); in acpi_i2c_of_to_plat()
200 dev_read_u32(dev, "reset-delay-ms", &priv->reset_delay_ms); in acpi_i2c_of_to_plat()
201 dev_read_u32(dev, "reset-off-delay-ms", &priv->reset_off_delay_ms); in acpi_i2c_of_to_plat()
202 dev_read_u32(dev, "enable-delay-ms", &priv->enable_delay_ms); in acpi_i2c_of_to_plat()
203 dev_read_u32(dev, "enable-off-delay-ms", &priv->enable_off_delay_ms); in acpi_i2c_of_to_plat()
204 dev_read_u32(dev, "stop-delay-ms", &priv->stop_delay_ms); in acpi_i2c_of_to_plat()
205 dev_read_u32(dev, "stop-off-delay-ms", &priv->stop_off_delay_ms); in acpi_i2c_of_to_plat()
214 struct acpi_i2c_priv *priv = dev_get_priv(dev); in acpi_i2c_get_name() local
217 priv->hid_desc_reg_offset ? "H%03X" : "D%03X", in acpi_i2c_get_name()