Lines Matching refs:i2c_priv
24 struct atmel_i2c_client_priv *i2c_priv = work_data->ctx; in atmel_sha204a_rng_done() local
28 dev_warn_ratelimited(&i2c_priv->client->dev, in atmel_sha204a_rng_done()
33 atomic_dec(&i2c_priv->tfm_count); in atmel_sha204a_rng_done()
39 struct atmel_i2c_client_priv *i2c_priv; in atmel_sha204a_rng_read_nonblocking() local
42 i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); in atmel_sha204a_rng_read_nonblocking()
45 if (!atomic_add_unless(&i2c_priv->tfm_count, 1, 1)) in atmel_sha204a_rng_read_nonblocking()
58 work_data->ctx = i2c_priv; in atmel_sha204a_rng_read_nonblocking()
59 work_data->client = i2c_priv->client; in atmel_sha204a_rng_read_nonblocking()
73 struct atmel_i2c_client_priv *i2c_priv; in atmel_sha204a_rng_read() local
80 i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); in atmel_sha204a_rng_read()
84 ret = atmel_i2c_send_receive(i2c_priv->client, &cmd); in atmel_sha204a_rng_read()
97 struct atmel_i2c_client_priv *i2c_priv; in atmel_sha204a_probe() local
104 i2c_priv = i2c_get_clientdata(client); in atmel_sha204a_probe()
106 memset(&i2c_priv->hwrng, 0, sizeof(i2c_priv->hwrng)); in atmel_sha204a_probe()
108 i2c_priv->hwrng.name = dev_name(&client->dev); in atmel_sha204a_probe()
109 i2c_priv->hwrng.read = atmel_sha204a_rng_read; in atmel_sha204a_probe()
110 i2c_priv->hwrng.quality = 1024; in atmel_sha204a_probe()
112 ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng); in atmel_sha204a_probe()
121 struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client); in atmel_sha204a_remove() local
123 if (atomic_read(&i2c_priv->tfm_count)) { in atmel_sha204a_remove()
128 kfree((void *)i2c_priv->hwrng.priv); in atmel_sha204a_remove()